Docs

Intercom 

Intercom is one of the sophisticated applications in customer engagement industry. It offers services on personalized business messaging, product tours and helps engage with your customers the modern way.

Integrating Chargebee with Intercom enables syncing your customer and subscription data such as emails, card expiration dates, unpaid invoice information, MRR (Monthly Recurring Revenue) from Chargebee to your Intercom account. This empowers you to engage better with your customers and provide a personalized support experience.

Ideally, using the data available from Chargebee through the integration, you can:

  • Convey information on the type, subscription, MRR and more about the customer to your support executive.

  • Send targeted campaigns — emails, push messages and in-app campaigns.

  • Customize and automate the Intercom Bot.

  • Route customers to the right support executives.

Note

This is a one-way sync – subscription information will be synced from Chargebee to Intercom.

Integrating Intercom 

There are two workflow models to choose from, either of which you can adapt based on your user base.

1. For B2B SaaS businesses 

Following is the recommended workflow of Chargebee-Intercom integration for B2B SaaS businesses.

  1. Create an unique identifier on your side, say company_id, for each enterprise customer signing up on your website.
  2. Use the company_id to create a company record in Intercom by setting it as the Company ID.
  3. When the same enterprise customer subscribes to a product on your site, create a subscription in Chargebee by passing the company_id to a Chargebee Customer Custom Field (name it as cf_company_id).
  4. For members of that company who sign up for your product, create a user record in Intercom, against the Company ID to link them.
  5. Integrate Chargebee with Intercom by selecting Company ID as the matching identifier.
  6. If there is a match, the company record in Intercom gets updated with the subscription details from the corresponding customer record in Chargebee. If there is no match, Chargebee takes an action based on your configuration.

With this approach, Chargebee accurately syncs your subscription data against the Company record in Intercom. Therefore, if you have to set up a customer engagement automation through a customized Intercom bot or send a push notification or run an email marketing campaign, it is possible for all the users linked with the company record, using Intercom's workflows.

Alternatively, you can also send the Intercom Company ID against Chargebee Customer ID while creating the subscription in Chargebee. Follow that by choosing the configuration to map Chargebee Customer ID with Company ID in Intercom.


2. For B2C businesses 

Following are the two recommended workflows of Chargebee-Intercom integration for B2C businesses.



a) Email based flow

The workflow uses email of the user to standardize the integration.

  1. When a user signs-up on your site, create a user account using their email.
  2. Create a corresponding user record in Intercom for that user, using their email.
  3. When the user subscribes to your product, a subscription is created in Chargebee with all the user details.
  4. Integrate Chargebee and Intercom with email as the matching identifier.
  5. If there is a match, the corresponding user record in Intercom gets updated with the subscription details in Chargebee. If there is no match, Chargebee takes an action based on your configuration.



b) User_id based flow

The workflow uses user_id (custom identifier) of the user to standardize the integration.

  1. When a user signs-up on your site, create a user account and generate a unique identifier user_id for that account.
  2. Create a corresponding user record in Intercom by setting the user_id as User ID in Intercom.
  3. When the user subscribes to your product, a subscription is created in Chargebee with all the user details. The user_id should be passed as Customer Custom Field (name it as cf_user_id), while creating the subscription in Chargebee.
  4. Integrate Chargebee and Intercom with User ID as the matching identifier against Chargebee Custom Field (cf_user_id).
  5. If there is a match, the user record in Intercom gets updated with the subscription details in Chargebee. If there is no match, Chargebee takes an action based on your configuration.

Alternatively, you could also pass the Intercom User ID against the Customer ID, while creating the subscription in Chargebee. Follow that by choosing the configuration to map Chargebee Customer ID with User ID in Intercom.

Authorizing Intercom 

Read through the previous section before proceeding to understand the sync model that fits you based on your customer base. Post that, follow the steps below to integrate Intercom.

In your Chargebee application, click Apps> Marketplace > Customer Support & Engagement > Intercom Subscriptions Sync. In the Intercom Integration page, click Proceed.

Follow that by authorizing access to your Intercom account to permit data sync from Chargebee.

The integration process is split into three steps:

  1. Configuring Sync Preferences
  2. Data Validation
  3. Running Initial Sync

1. Configuring Sync Preferences 

a) Selecting the Sync Model 

This configuration is critical for Intercom to understand incoming syncs from Chargebee.

Customer records in Chargebee can be synced to Intercom in one of the following ways:


As Users - select this if you are a B2C company, with end users as customers. This setting allows customer records in Chargebee to be synced as user records in Intercom.

Say, if you are a company like Netflix or Facebook, the right approach is to sync your Chargebee customer records with Intercom user records.

As Companies - select this if you are a B2B company, with companies as customers. This setting allows Customers in Chargebee to be synced as Companies in Intercom.

Say, if you are a company like Salesforce, the right approach is to sync your Chargebee customer records with Intercom company records.

b) Selecting the Matching Identifier 

You need to choose the unique identifier to map user/company records in Intercom to customer records in Chargebee. Based on the matching identifier, Chargebee tries to find a matching record in Intercom. This ensures the sync from Chargebee reaches the right record in Intercom.

If user model is selected, you have the following options to map:

  • Emails of Customers in Chargebee → emails of Users in Intercom.
  • Customer ID in Chargebee → User IDs of Users in Intercom
  • Custom fields of Customers in Chargebee → User IDs of Users in Intercom.

If company model is selected, you have the following options to map:

  • Company name of Customers in Chargebee → Company name of Users in Intercom.
  • Custom fields of Customers in Chargebee → Company name of Users in Intercom.
  • Customer ID of Customers in Chargebee → Company ID of Users in Intercom


    The above information is represented in a table format as well for reference:
Sync Model Customer field in Chargebee  Corresponding User/
Company field in Intercom
User Model Email Email
Customer ID User ID
Custom fields User ID
Company Model Company Name Company Name
Customer ID Company ID
Custom fields Company Name


c) Action for Matched Records 

Select the action to follow when a matching user/company record is found in Intercom.

  • Update Chargebee Fields Only - This updates only the fields created by Chargebee in Intercom.

  • Update All Fields - This updates all the fields in Intercom using customer and subscription data from Chargebee.


d) Action for Unmatched Records 

Choose the action to follow when there are no matching records.

  • Create a User/Company in Intercom - A user/company record would be created in Intercom based on the model you have selected (user model or company model).

  • Do nothing - Ignores records without a match.


e) Allowing Canceled Subscriptions as Users 

Enable this option if you want customer records with canceled subscriptions in Chargebee to be created as user/company records in Intercom.

f) Syncing More Fields 

Chargebee by default, syncs over 25+ customer, subscription and invoice fields to Intercom. You can find the default synced fields here.

Enable this to create customer and subscription specific custom fields in Intercom, other than the default set.

When you are done configuring, click Proceed.

2. Data Validation 

Data validation looks for matching Intercom user/company records using the matching identifier.

Following validation, all the unmatched and matched records are made available as a CSV.

Note

Validation happens with Chargebee data as reference.

To view the unmatched records click the Download CSV option to download and check the Chargebee and Intercom entries.

Information

If you have already synced some of your records to Intercom through your custom code, where Chargebee's Customer ID is not associated with User ID or Company ID in Intercom, such records would also be present in the unmatched records. It is recommended that you archive those records in Intercom.
This is to avoid duplicates as we would be creating records depending on your configuration for such scenarios.

On reviewing and making appropriate changes, click Retry Data Validation to rerun validation.

Based on your configuration for matched and unmatched records, when you click Proceed,

  • For each unmatched record, either new records are created in Intercom and Chargebee fields are synced to it, or no action is taken.

  • For matched records, either only the fields created by Chargebee in each Intercom record would be updated or all the fields in each Intercom record are updated using Chargebee data.

3. Run Initial Sync 

Post successful data validation, perform the trial run by syncing the first 10 customers created in Chargebee.

After sync, check the data in Intercom for the 10 customers in your Intercom account.

If you find any discrepancy, modify that specific configuration and rerun initial sync.

When you have validated the initial sync and verified that the fields are synced as expected in Intercom, click Sync all records to sync the remaining records.

You can use the Sync now option to run sync whenever you need. Alternatively, you can also make use of the Auto sync option to automatically sync data once in every six hours.

Click Unlink Integration on the Intercom integration page to disable the integration.

Unlink the integration to stop data sync from Chargebee to Intercom.

Do note that all the configurations are deleted when you disable the integration. When you try to integrate again, you would have to start fresh as configurations are not cached.

Fields mapped by default 


Chargebee  module Chargebee field Field description Intercom field
Customer

Created by (True or False)
True - if the customer was created in Intercom by Chargebee
False - if the customer was not created in Intercom by Chargebee
Cb created by
created_at Customer signed up date Cb signed up at
Customer status (Active or deleted)
Active - if customer is still active in Chargebee
Deleted - if customer is deleted in Chargebee
Cb cust status
auto_collection Customer auto collection (ON or OFF) Cb cust auto collect
card[expiry_month] , card[expiry_year]  Customer's card expiry date Cb card expired at
payment_method[type] Customer's payment type Cb payment type
Customer MRR Computed - Sum of MRRs across all the subscriptions of a given customer is computed and synced Cb cust mrr
Customer unpaid amount
Computed - Sum of all the invoices that are in unpaid state for a given customer Cb cust unpaid amt
company Customer company name Cb company name
Subscription Subscription.currency_code Subscription plan currency Cb sub plan currency
Subscription.created_at Subscription created date  Cb sub created at
Subscription.next_billing_at Subscription next billing date  Cb sub next bill at

Subscription.plan_id

Subscription plan name Cb sub plan name
Subscription.billing_period Subscription plan interval Cb sub plan interval
Subscription.plan_amount Subscription plan price Cb sub plan price
Subscription.plan_quantity Subscription plan quantity Cb sub plan quantity
Subscription.status Subscription status Cb sub status
Subscription.trial_end Subscription trial end date Cb sub trial end at
Subscription.trial_start Subscription trial start date Cb sub trial start at
Subscription. current_term_start Subscription current term started at Cb sub cur term start at
Subscription. current_term_end Subscription current term ends at Cb sub cur term end at
Subscription.cancel_reason Subscription cancellation reason Cb sub cancel reason
Subscription.cancelled_at Subscription cancelled date Cb sub cancelled at
Subscription.activated_at Subscription activated at Cb sub activated at
Invoice Invoice first recurring amount Computed - Value of the first recurring invoice is synced Cb first rec inv amt
Invoice first recurring currency Computed - Currency of the first recurring invoice is synced Cb first rec inv cur
Invoice first recurring date Computed - Date on which the first recurring invoice was created is synced Cb first rec inv at
Invoice latest recurring amount Computed - Value of the latest recurring invoice is synced Cb latest rec inv amt
Invoice latest recurring currency Computed - Currency of the latest recurring invoice is synced Cb latest rec inv cur
Invoice latest recurring date Computed - Date on which the latest recurring invoice was created is synced Cb latest rec inv at

FAQs 

1) What if a customer has two subscriptions in Chargebee, would two user records be created in Intercom?

Only one user record would be created in Intercom. This is because only customer level fields such as email or Customer ID are used as the unique identifier.

  • If one of the subscription is canceled and other is active, user record would be created for the active subscription.
  • If both the subscriptions are active, user record would be created for the last updated subscription .

2) Will Chargebee create duplicate records in Intercom?

Chargebee will never create duplicate records in Intercom.

When you set up the integration, Chargebee prompts with a list of :

  • Matched customer records
  • Unmatched customer records

This is to ensure there are no unnecessary records that will be created by Chargebee in Intercom by mistake.

This also applies for cases when you have synced some of your users to Intercom through your custom code, where Chargebee's Customer ID is not associated with User ID or Company ID in Intercom. For such cases, download the CSV post Data Validation, find the unmatched records which fit the above scenario and archive those records in Intercom.

For any customer record in Chargebee, which is not available in Intercom, if you have enabled the [create configuration], Chargebee would attempt to create a user/company record in Intercom. While doing so, Chargebee verifies once more to see if there is an existing user/company record in Intercom for the same Customer ID in Chargebee. This double check ensures no duplicates are created by Chargebee in Intercom.

Was this article helpful?
Loading…