Import Groweo® contacts into Salesforce via API

Groweo’s GET API lets you import contacts stored in Groweo® Contacts into Salesforce and create or update the corresponding Contact or Lead records.

The integration works by making GET requests from Salesforce to Groweo. Groweo does not push contacts to Salesforce, and the API cannot be used to create, edit or delete contacts in Groweo.

This guide covers one way to build the integration using Salesforce External Credentials, Named Credentials and Apex.

Note: Salesforce environments and configurations vary. We recommend having the implementation reviewed by your Salesforce administrator or developer.

Before you start

You will need:

  • a Groweo API token
  • permission to configure External Credentials and Named Credentials in Salesforce
  • permission to create a Permission Set
  • Apex development permissions if you are implementing the API call in Apex.

1. Get your Groweo API token

Ask your Groweo contact person or Groweo Customer Support for your API token.

The contacts endpoint is:

GET https://engine.groweo.com/engine/api/client-api/contacts

For example, you can request the first 50 contacts with:

?page=1&limit=50&populateModuleData=true

The API token is passed in the HTTP header:

x-client-api-token: <API_TOKEN>

Test the request before configuring Salesforce, for example with Postman or cURL:

curl --location \
'https://engine.groweo.com/engine/api/client-api/contacts?page=1&limit=50&populateModuleData=true' \
--header 'x-client-api-token: YOUR_TOKEN'

Do not store the API token directly in Apex or source code.

2. Create an External Credential in Salesforce

In Salesforce, go to:

Setup
→ Named Credentials
→ External Credentials
→ New

For example:

Label: Groweo API Credential
Name: Groweo_API_Credential
Authentication Protocol: Custom

Create a Principal, for example:

Parameter Name: Groweo
Identity Type: Named Principal

Then add an authentication parameter:

Name: ApiToken
Value: <GROWEO API TOKEN>

3. Add the required Groweo HTTP header

Configure a custom header with:

Header name:
x-client-api-token

and the credential value:

{!$Credential.Groweo_API_Credential.ApiToken}

Use the actual API names of your External Credential and authentication parameter if they differ from the examples above.

4. Create a Named Credential for the Groweo API

Go to:

Setup
→ Named Credentials
→ Named Credentials
→ New

For example:

Label: Groweo API
Name: Groweo_API
URL: https://engine.groweo.com
External Credential: Groweo API Credential

Disable Generate Authorization Header, as Groweo uses the x-client-api-token header for authentication.

5. Grant access to the integration user

Create a Permission Set, for example:

Groweo API Access

Grant access to the Principal configured for the Groweo External Credential and assign the Permission Set to the user running the integration.

Additional credential-related permissions may be required depending on your Salesforce configuration.

6. Test the API call with Apex

With the Named Credential configured, the endpoint can be referenced as:

callout:Groweo_API/engine/api/client-api/contacts

For example:

public with sharing class GroweoApiService {
    public static String getContacts(Integer pageNumber) {
        HttpRequest req = new HttpRequest();
        req.setEndpoint(
            'callout:Groweo_API' +
            '/engine/api/client-api/contacts' +
            '?page=' + pageNumber +
            '&limit=50' +
            '&populateModuleData=true'
        );
        req.setMethod('GET');
        req.setTimeout(120000);

        Http http = new Http();
        HttpResponse res = http.send(req);

        if (res.getStatusCode() >= 200 &&
            res.getStatusCode() < 300) {
            return res.getBody();
        }

        throw new CalloutException(
            'Groweo API error: ' +
            res.getStatusCode() +
            ' ' +
            res.getBody()
        );
    }
}

The API token does not need to be included in the Apex code. Salesforce adds the configured header through the External Credential.

7. Check the JSON response and define your field mapping

Start by inspecting the response returned by your Groweo environment:

String jsonBody = GroweoApiService.getContacts(1);
Object response = JSON.deserializeUntyped(jsonBody);
System.debug(response);

Then define which Groweo data should be stored in Salesforce.

A mapping could include, for example:

Groweo dataSalesforce
unique contact identifierGroweo ID
first nameFirst Name
last nameLast Name
email addressEmail
phone numberPhone

This table is an example of a possible mapping, not documentation of Groweo’s API response schema.

Check the actual field names and JSON structure returned by your Groweo environment before implementing the mapping.

8. Store the Groweo identifier in Salesforce

If the Groweo response contains a stable unique contact identifier, create a Salesforce field such as:

Groweo_ID__c

Configure it as:

Type: Text
Unique: true
External ID: true

This lets you use Salesforce upsert to update an existing record or create a new one:

upsert contactsToSave Groweo_ID__c;

Do not automatically use the email address as the permanent integration identifier, as email addresses can change.

9. Handle pagination

The Groweo API uses pagination:

?page=1&limit=50

The integration therefore needs to process all relevant pages, not just page 1.

For example:

Groweo
  ↓
GET page=1
  ↓
process and upsert
  ↓
GET page=2
  ↓
process and upsert
  ↓
...

Determine the exact end condition from the actual API response returned by Groweo.

10. Schedule the synchronisation

If contacts should be imported automatically, you can use Scheduled Apex together with Queueable Apex.

A typical flow is:

Scheduled Apex
      ↓
Queueable Apex
      ↓
Groweo GET API
      ↓
JSON processing
      ↓
field mapping
      ↓
Salesforce upsert

Choose the schedule based on how quickly new Groweo contacts need to appear in Salesforce.

How the integration works

GROWEO®
   │
   │ GET
   ▼
Contacts API
   │
x-client-api-token
   │
   ▼
Salesforce External Credential
   │
   ▼
Salesforce Named Credential
   │
   ▼
Apex
   │
field mapping
   ▼
Contact / Lead
   │
External ID
   ▼
upsert

Groweo acts as the source of contact data. Salesforce initiates the request and creates or updates its own records based on the integration logic.

The Groweo GET API cannot be used to create, edit or delete contacts in Groweo.