How to integrate Salesforce

Learn how to connect Salesforce to B2CORE

Use integration with Salesforce to automatically sync client data from B2CORE to Salesforce. This integration helps centralize client information, streamline internal processes, and support sales and marketing workflows within your Salesforce environment.

This integration currently supports one-way data transfer from B2CORE to Salesforce; reverse syncing isn’t available.

Before proceeding with the instructions, you must sign up for Salesforce and create an External client app, which enables external services to interact with the Salesforce API. If you have any questions, consult the official Salesforce Help Center or contact their support team.

Create an External client app in Salesforce

To create an External client app in Salesforce:

1

In Salesforce, go to Settings > Setup.

2

In the Setup section, enter App Manager in the search box, and then click it in the search results.

3

Click New External Client App.

4

In the Basic Information section, fill in the following fields:

  • External client app name — specify the name of your B2CORE instance. If you have several instances, use different names when configuring External client apps for each one in Salesforce.

  • API name — auto-filled based on the app name.

  • Contact email — enter the email address of the contact user.

  • Distribution site — select Local. This setting determines who can view and authorize in the created External client app. Local means that it's accessible only within your organization.

5

Expand the API (Enable OAuth Settings) section and select the Enable OAuth checkbox.

  • In the Callback URL, specify https://login.salesforce.com/services/oauth2/success.

  • In the OAuth scopes, select the required permissions. The minimum set for API access is:

    • Manage user data via APIs (api)

    • Perform requests at any time (refresh_token, offline_access)

    • Access the Salesforce API Platform (sfap_api)

  • Select the Introspect all tokens checkbox (recommended). This allows the resource server to validate access tokens without calling Salesforce for every request.

6

In the Flow Enablement section, select Enable Client Credentials Flow.

7

In the Security section, select the following:

  • Enable Client Credentials Flow

  • Require secret for Web Server Flow

  • Require secret for Refresh Token Flow

  • Require Proof Key for Code Exchange (PKCE) extension for Supported Authorization Flows

  • Issue JWT Web Token (JWT)-based access tokens for named users

8

Click Save to create the app.

After creating the app, Salesforce generates the Consumer key and Consumer secret, which serve as the app’s identifier and secret key. You can find them by opening the app card, navigating to Settings > OAuth Settings, and clicking the Consumer Key and Secret button.

The Consumer key and Consumer secret are required for configuring the connection to Salesforce in the B2CORE Back Office.

Further External client app configuration

After creating your External client app, proceed with the additional configuration steps:

1

In Salesforce, go to Setup > Users > Users and find the contact user specified during your External client app registration.

2

Open the user’s card and in the Permission set assignments section, add the API Enabled permission.

3

Copy the name from the Username field.

4

Go to Setup > External Client Apps > External Client App Manager, and open your app card.

5

In the app card, go to Policies > OAuth Policies > OAuth Flows and External Client App Enhancements, select the checkbox Enable Client Credentials Flow and enter the previously copied username.

6

In Policies > OAuth Policies > App Authorization, select Expire refresh token after specific time and fill in the following parameters:

  • Refresh Token Validity Period — set to 365.

  • Refresh Token Validity Unit — select Days.

  • IP Relaxation — select Enforce IP restrictions.

  • Named User JWT-Based Access Token Settings — select Set app-specific token timeout (1 Hour).

7

Click Save to apply the changes.

Get your Salesforce domain

1

In Salesforce, go to Setup > Settings > Company Settings > My Domain.

2

Copy the value from the Current My Domain URL field.

The Salesforce domain is required for configuring the connection to Salesforce in the B2CORE Back Office.

How to configure a connection to Salesforce in the B2CORE Back Office

To configure a connection to Salesforce in the B2CORE Back Office:

1

Navigate to System > External connections.

2

Click +Create in the upper-right page corner.

3

On the Create connection page, fill in the following fields:

  • In the Name field, enter a name for the connection. The name must be unique.

  • In the Caption field, enter a caption that will be applied to the connection in the Back Office.

  • In the Provider dropdown, select Salesforce.

4

Click Save to create the connection.

The Salesforce connection will appear in the list of external connections.

5

Click Edit to enter the connection details and complete the following fields:

  • In the Domain URL field, provide the URL of your Salesforce instance, such as:

    https://{your-domain}.my.salesforce.com

    The domain URL can be found in Salesforce by navigating to Setup > Settings > Company Settings > My Domain.

  • In the Consumer key field, specify the consumer key generated by Salesforce after creating your External client app.

  • In the Consumer secret field, specify the consumer secret generated in the same Salesforce Connected App. The secret is used together with the Consumer Key to authenticate API requests.

    Both the Consumer key and Consumer secret can be found in the Salesforce app card by navigating to Settings > OAuth Settings and clicking the Consumer Key and Secret button.

  • In the Company (applied to all new leads) field, enter the company name that should appear in Salesforce when creating new lead records, which are the Salesforce records created for each client synced from B2CORE. This field is required for Salesforce.

6

Check the connection status.

If the connection is inactive (No is displayed in the Enabled field), activate it by setting the Enabled dropdown to Yes.

7

Click Save to apply the changes.

After configuring the connection, all clients listed under Clients > General in the B2CORE Back Office will be automatically synced with Salesforce, where each client is added as a separate lead record. Any further updates to client personal details will also be synced with Salesforce.

Overview of client data synced with Salesforce

The following required and optional client fields are synced from B2CORE to Salesforce in lead records:

Required fields

The following required client fields are always synced from B2CORE to Salesforce:

  • Last name — if not specified, Undefined is sent to Salesforce.

  • Company — the company name specified in the Company (applied to all new leads) field of the external connection configured in the B2CORE Back Office is sent to Salesforce.

Optional fields

The following optional fields, which can be useful for business processes, are synced from B2CORE to Salesforce if they are specified in the client details in the B2CORE Back Office:

  • First name

  • Middle name

  • Email

  • City

  • State

  • Address

  • Postal code

  • Country and Country code (ISO)

  • Phone — if multiple phone numbers are specified for a client in the B2CORE Back Office, the confirmed number is sent to Salesforce; if none is confirmed, the most recently updated number is used.

How to add custom fields for syncing from B2CORE to Salesforce

You can sync additional fields from B2CORE to Salesforce, such as a client’s Status, Verification level, and Client type to reflect them in lead records in Salesforce.

In Salesforce, add these fields:

1

Sign in to Salesforce.

2

Go to Setup > Object Manger.

3

Select the Lead object.

4

In the object details, select Fields & Relationships and click New.

5

Select the filed type, such as Text.

6

Enter the Field Label. The Field Name will be auto-filled based on the label.

If needed, you can specify additional field parameters. Refer to the Salesforce Help Center for more information.

7

Save the changes to add the new field to the object.

In the B2CORE Back Office, set up field mapping:

1

Navigate to System > External connections.

2

Find the connection configured for Salesforce and click Edit to open the connection details.

3

Set up the field mapping by selecting the corresponding fields created in Salesforce for Status, Client type, and Verification level.

Set up field mapping
Set up field mapping
4

Click Save to apply the changes.

Once the fields are added and mapped, the client’s Status, Client type, and Verification level are automatically synced from B2CORE and displayed in lead records in Salesforce. If one or more fields aren't mapped, they won't be synced to Salesforce.

Last updated

Was this helpful?