This document describes the relationship between the various Chargebee and Salesforce fields. Field mapping is one of the most important steps as it creates a bidirectional linkage between the two systems and thereby gives greater control on the implications of the native salesforce settings.
Migration
If you are migrating your Chargebee site from Product Catalog 1.0 to 2.0, the Salesforce integration package cannot be readily migrated. Contact support to perform the migration.
Chargebee objects are mapped to standard as well as custom objects in Salesforce . The latter are created by Chargebee. The table below shows the relationship between objects in either systems in terms of data flow.
Chargebee Object/Data |
Salesforce Object (* indicates custom object) |
---|---|
Customer |
Account |
Contact | |
Item (Plan/Addon/Charge) |
Product |
Item Price |
CB Item Price* |
CB Pricing Tier* | |
Price Book Entry | |
Quote |
CB Quote* |
CB Quote Line Item* | |
CB Quote Product* | |
CB Quote Coupon* | |
Subscription |
Opportunity |
Opportunity Product | |
CB Opportunity Product* | |
CB Opportunity Coupon* | |
CB Subscription* | |
Subscription Addon* | |
Coupon Line Items* | |
Invoice |
CB Invoice* |
CB Invoice Line Item* | |
Coupon |
CB Coupon* |
Credit Note |
CB Credit Note* |
CB Credit Note Allocation* | |
Chargebee site domain name |
CB Site* |
Here we look at how fields in standard Salesforce objects are mapped to data in Chargebee. The notation used to represent Chargebee data is as seen in the Chargebee backend API .
Accounts in Salesforce are mapped to customers in Chargebee. Given below is the default field-mapping.
Salesforce Field (* indicates custom field) |
Chargebee Field / Data |
Account Name |
|
Phone |
|
Auto Collection* |
|
Billing Street |
|
Billing City |
|
Billing Zip/Postal Code |
|
Billing State/Province |
|
Billing Country |
|
Chargebee Billing Contact* |
Lookup to a contact that is used to populate billing contact details in sales driven automations. |
Chargebee Email* |
|
Chargebee First Name* |
|
Chargebee Id* |
|
Chargebee Last Name* |
|
Chargebee Site* |
Lookup to CB Site object which in turn stores the domain name of the Chargebee site this account belongs to |
Is Synced* |
Indicates whether the record has been mapped to Chargebee. |
Locale* |
|
Net Term Days* |
|
Payment Method Status* |
|
Payment Method Type* |
|
Sync with Chargebee* |
Checkbox that automates data sync from the account to Chargebee whenever a change is made to the account. |
Taxability* |
|
VAT Number* |
|
Business Entity* |
|
The Contact object is mapped to fields in the Customer object in Chargebee. The default mapping is given below.
Salesforce Field (* indicates custom field) |
Chargebee Field / Data |
Customer.email |
|
Name (composite field) | Customer.first_name , Customer.last_name |
Phone | Customer.phone |
Preferred currency* | |
Payment Method Status* | |
Payment Method Type* | |
Net Term Days* | |
Chargebee_Modified_Time* | |
Auto collection* | |
Sync with Chargebee* | Checkbox that marks the contact – while it is attached to an account – as the one to consider for syncing with Chargebee. |
A single Price Book record is created for all the Chargebee sites that are connected to the Salesforce org.
Regardless of the number of connected sites and number of currency/frequency combinations configured in your Chargebee site for a particular plan, there can be only one Price Book created for all the connected Chargebee sites where only one billing frequency and currency combination for a particular plan is recorded. For example, an ‘Advanced' plan supports three currencies - USD, EUR, and AUD and 2 billing frequencies - annual and monthly). Out of the two billing frequencies, only one can be stored in a single standard or custom pricebook. The integration however relies primarily on the Item Price (custom object) for a specific price point associated with a product.
The fields used by the integration are as follows:
Salesforce Field (* indicates custom field) |
Chargebee Field / Data |
CB Site* | Lookup to CB Site object which in turn stores the domain name of the Chargebee site this price book belongs to. |
Price Book Name |
|
A price book entry record is created for each Chargebee plan and addon.
Salesforce Field (* indicates custom field) |
Chargebee Field / Data |
Comments |
---|---|---|
Salesforce Field (* indicates custom field) |
Chargebee Field / Data |
Comments |
Product Code |
Plan.id or Addon.id or Charge.id |
|
List Price |
|
The value is set to |
Use Standard Price |
(Deprecated) |
Not in use for v1.38 and later versions |
Currency ( |
(Deprecated) |
(Deprecated) |
Currency ( |
|
|
Setup Cost* |
(Deprecated) |
(Deprecated) |
Trial Period Unit* |
(Deprecated) |
(Deprecated) |
Trial Period Unit* |
(Deprecated) |
(Deprecated) |
Bill Every* |
(Deprecated) |
(Deprecated) |
Bill Every Unit* |
(Deprecated) |
(Deprecated) |
Billing Cycles* |
(Deprecated) |
(Deprecated) |
Free Quantity* |
(Deprecated) |
(Deprecated) |
Recurring charge model* |
(Deprecated) |
(Deprecated) |
Pricing Model* |
(Deprecated) |
(Deprecated) |
Invoice Name* |
(Deprecated) |
(Deprecated) |
Chargebee Modified Time* |
(Deprecated) |
(Deprecated) |
Addon Applicability* |
(Deprecated) |
(Deprecated) |
Resource Version* |
(Deprecated) |
(Deprecated) |
Site* |
(Deprecated) |
(Deprecated) |
Each plan and addon is synced into Salesforce as a Product record.
Salesforce Field (* indicates custom field) |
Chargebee Field / Data |
---|---|
External ID |
(Not used) |
CB Item Family* |
|
Active |
(Not used) |
Product Name |
|
Product Description |
|
Product Code |
|
Product Currency |
|
Metered* |
|
Trial Period* |
(Deprecated) |
Trial Period Unit* |
(Deprecated) |
Bill Every* |
(Deprecated) |
Bill Every Unit* |
(Deprecated) |
Billing Cycles* |
(Deprecated) |
Free Quantity* |
(Deprecated) |
Recurring charge model* |
(Deprecated) |
Price* |
(Deprecated) |
Set Up Fee* |
(Deprecated) |
Status* |
(Deprecated) |
Product Type* |
The value is |
Invoice Name* |
(Deprecated) |
Currency* |
(Deprecated) |
ChargeBee Modified Time* |
(Deprecated) |
Addon Type* |
(Deprecated) |
Addon Applicability* |
(Deprecated) |
Opportunity records are only created or modified by the integration when some form of opportunity handling has been configured. The following opportunity fields are updated by the integration:
CB Subscription Id* |
(Deprecated) |
Update Chargebee* |
Checkbox which determines whether a subscription should be created or updated in Chargebee when the opportunity is won. |
Coupon* |
Deprecated field. The attached coupons can now be found in the CB Coupon related list for the opportunity. |
CB Opportunity Type* |
Indicates the opportunity type in relation to Chargebee. This field is set by Chargebee and can have the following value:
|
Close Date |
|
Contract term Id* |
|
Opportunity Currency |
|
Amount |
Sum of Totals of the Opportunity Products. |
Price book |
The Id of the price book for the Chargebee site. |
Subscription Id* |
The id of the subscription in Chargebee that the opportunity is linked to. |
Stage |
The stage of the opportunity may be set via the integration if configured accordingly. |
Opportunity Name |
This field is set to the company name of the customer record. |
Business Entity* |
Lookup(CB Business Entity) |
Opportunity Product records are only created or modified by the integration when some form of opportunity handling has been configured. The following opportunity product fields are updated by the integration:
Salesforce Field (* indicates custom field) |
Chargebee Field/Data |
---|---|
Subtotal |
Sales Price x Quantity |
CB Item Price* |
|
Total |
(Sales Price - Sales Price x Discount) x Quantity |
Quantity |
or
|
Price Book Entry |
Lookup(Price Book Entry) |
List price |
List Price from Price Book Entry |
Sales Price |
or
|
Discount |
For Chargebee plans: the discount percentage is calculated based on the plan free quantity and the coupon discount. For Chargebee addons and charges: the discount percentage is calculated based on the coupon discount. By default, the integration considers all types of Chargebee coupons in the Discount calculation. However, for a given Chargebee site, if you want to exclude limited period or one-time coupons while calculating Discount, contact support@chargebee.com. |
Service Period (days)* |
|
Billing Cycles* |
|
Apply Charges* |
|
Addon Event* |
|
In this section, custom objects created by Chargebee in Salesforce are listed. The tables provide a field-level mapping between those objects and Chargebee entities. The Chargebee fields mentioned in the tables are attributes of resources available in Chargebee APIv2 .
CB Item Price in Salesforce is mapped to the Item Price resource in Chargebee.
Salesforce Field (* indicates custom field) |
Chargebee Field/Data |
Trial Period Unit | tial_period_unit . |
Trial Period |
|
Status |
|
Resource version | resource_version |
Product | name |
Pricing Model | pricing_model |
Price Book | Lookup to a Price Book record corresponding to the Chargebee site that the Item Price belongs to. |
Price |
|
Period Unit | period_unit |
Period | period |
Free Quantity | free_quantity |
External Id |
|
Currency |
|
CB Item Price Name |
|
Billing Cycles |
|
CB Subscription in Salesforce is mapped to the Subscription resource in Chargebee.
Account |
Master-Detail(Account) |
Action at term end |
|
Address Line 1 |
|
Address Line 2 |
|
Address Line 3 |
|
Business Entity |
Lookup(CB Business Entity) |
CB Customer Id |
|
CB Id |
|
CB Plan Id |
|
CB Site |
Lookup(CB Site) |
CB Subscription Id |
|
CB Subscription Name |
|
Chargebee Modified Time |
|
City |
|
Company |
|
Contact |
Lookup(Contact) |
Country |
|
Created By |
User who triggers the sync or turns on auto sync. |
Currency |
|
Current Term End |
|
Current Term Start |
|
Due Invoices Count |
|
Due Since |
|
|
|
First Name |
|
Last Modified By |
User who triggers the sync or turns on auto sync. |
Last Name |
|
MRR |
|
Next billing Amount |
|
Next billing at |
|
Opportunity |
Lookup(Opportunity) |
Phone |
|
Plan Amount |
|
Plan Quantity |
|
Plan Unit Price |
|
.PO Number |
|
Product |
Lookup(Product) |
Reason for cancellation |
|
Cancellation Reason Code |
|
Remaining Billing Cycles |
|
Resource Version |
|
Site |
(Deprecated) |
State/ County/ Province |
|
Subscription Activated At |
|
Subscription Cancelled At |
|
Subscription Created At |
|
Subscription Id |
|
Subscription Started At |
|
Subscription status |
|
Total Dues |
|
Trial End |
|
Trial Start |
|
Zip/ Postal Code |
|
The CB Invoice in Salesforce is mapped to the Invoices resource in Chargebee.
Account |
Lookup(Account) |
Amount |
|
Business Entity |
|
CB Customer CB Id |
|
CB Id |
"<domain name of the Chargebee site>"_" |
CB Invoice Id |
|
CB Invoice Name |
|
CB Site |
Lookup(CB Site) |
CB Subscription |
Lookup(CB Subscription) |
CB Subscription CB Id |
|
Chargebee Modified Time |
|
Created By |
Lookup(User) |
Due Amount |
|
Due Date |
|
Invoice Date |
|
Invoice ID |
|
Last Modified By |
Lookup(User) |
Next Retry |
|
Owner |
|
Paid On |
|
PO Number |
|
Price Type |
|
Recurring |
|
Resource Version |
|
Status |
|
SubTotal |
|
Tax |
|
Vat Number |
|
The CB Invoice Line Item in Salesforce is mapped to the Invoices resource in Chargebee.
Amount |
|
CB Invoice |
Master-Detail(CB Invoice) |
CB Invoice CB Id |
|
CB Invoice Line Item CB Id |
|
CB Item Price |
Lookup(CB Item Price) |
Created By |
Lookup(User) |
Discount Amount |
|
End Date |
|
Invoice Line Items Name |
|
Last Modified By |
Lookup(User) |
Price |
invoice.line_items.unit_amount |
Product |
Lookup(Product) |
Quantity |
|
Reason for tax exemption |
|
Start Date |
|
Tax Amount |
|
Total amount |
|
The CB Credit Note in Salesforce is mapped to the Credit notes resource in Chargebee.
Account |
Lookup(Account) |
Allocated Amount |
|
Available Amount |
|
Business Entity |
|
CB Credit Note Name |
|
CB Invoice |
Master-Detail(CB Invoice) |
CB Invoice Id |
|
CB Site |
Lookup(CB Site) |
Contact |
Lookup(Contact) |
Created By |
Lookup(User) |
CreditNote CB Id |
|
Customer CB Id |
|
Issued Date |
|
Last Modified By |
Lookup(User) |
Price Type |
|
Reason |
|
Refunded Amount |
|
Refunded At |
|
Resource Version |
|
Round-Off Amount |
|
Status |
|
Sub Total |
|
Total |
|
Type |
|
Voided At |
|
The CB coupon in Salesforce is mapped to the Coupons resource in Chargebee.
Addon Id |
|
Apply On |
|
CB Coupon Id |
|
CB Id |
"<domain name of the Chargebee site>"_" |
CB Site |
Lookup(CB Site) |
Charge Constraint |
|
Charge Id |
|
Chargebee Modified Time |
|
Coupon Created At |
|
Coupon Id |
|
Coupon Name |
|
Created By |
Lookup(User) |
Discount Amount |
|
Discount Percentage |
|
Discount Type |
|
Duration Month |
|
Duration Type |
|
Invoice Name |
|
Last Modified By |
Lookup(User) |
Max Redemptions |
|
Owner |
Lookup(User,Group) |
Plan Constraint |
|
Plan Id |
|
Redemptions |
|
Resource Version |
|
Status |
|
Valid Till |
|