Salesforce Integration
Connecting Chargebee Growth to Salesforce makes it possible to personalize your customers' cancellation experience based on account information in Salesforce.
About the Salesforce integration
Chargebee Growth's Salesforce integration uses a Salesforce Connected App with OAuth authentication. This is currently a one-way sync that integrates with the Account object in Salesforce, retrieving all fields from the Account record that match the exit session's internal_id.
How and when data is synced
The Salesforce integration performs account lookups during session creation through the following process:
- Session creation: When a new session is created for one of your accounts, Chargebee Growth initiates an account lookup in Salesforce.
- Data retrieval: The integration pulls all account fields from the matching Salesforce record to set up the session.
- Metadata query: Chargebee Growth queries the Salesforce metadata API to describe the Account object in your Salesforce org. This occurs during:
- Initial integration configuration.
- When integration settings are reviewed.
- When integration settings are edited.
API queries
Chargebee Growth runs three queries on the Salesforce API:
- Get object ID: Retrieve the single ID of an object where an indexed field matches the value passed to Chargebee Growth.
- Describe Account object: Get the Account object metadata and schema.
- Get Account by ID: Retrieve a single Account object.
Query frequency
- Queries #1 and #3 run only when your customer lands on the Chargebee Growth page.
- Query #2 runs more frequently—during integration configuration and when related settings pages are loaded.
Logging syncs
The following sync information is tracked internally:
- Timestamp of the last successful sync.
- Timestamp of the last unsuccessful sync.
Chargebee Growth does not track the following:
- Detailed logs of every individual sync, beyond general server logs.
- Public-facing sync logs.
You can verify the following when needed:
- Whether data is being retrieved successfully.
- Error messages from the most recent sync attempt.
Install the Salesforce integration
Because this is an OAuth integration, whoever connects it must have the required Salesforce permission set.
You must also pass Chargebee Growth a unique ID that is present in the Account record so it can sync those customers' records. Use a field marked as an External ID before connecting Chargebee Growth.
To connect Chargebee Growth to Salesforce:
- Go to the Chargebee Growth Admin page.
- Click Settings in the lower left-hand corner.
- Click Integrations.
- Find Salesforce under Integrations and click Manage.
- In the modal that lists the benefits of connecting to Salesforce, click Connect to Salesforce.
- When prompted to allow Chargebee Growth access to Salesforce, click Allow. The Salesforce data in the Accounts table then syncs with Chargebee Growth automatically.
- After the integration is enabled, click Manage again and select the Salesforce field that Chargebee Growth uses to sync records.
- Send the ID when your customer clicks Cancel. The field you selected in step 7 is the property you pass in your pre-cancel request in the
account.internal_idfield, along with the other fields you want to send with the canceled session. For more information, see the Chargebee Growth installation guide.
{
"app_id": "APP_ID",
"account": {
"internal_id": "SFDC_EXTERNAL_ID",
"subscription_id": "SUBSCRIPTION_ID"
}
}
Was this article helpful?