Docs
Important
This page pertains to v1.37 of the Salesforce integration. If you last installed the Salesforce integration before 6th Jan 2020, it is likely that you are using a deprecated version of the integration (package v1.31 and below) that performs a contact-based mapping. To migrate to the current version, contact support .
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 | |
Plan/Addon |
Product |
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 | Customer.phone |
Auto Collection* | Customer.auto_collection |
Billing Street | Customer.billing_address.line1 + line2 + line3 (the field values are concatenated, separated by commas) |
Billing City | Customer.billing_address.city |
Billing Zip/Postal Code | Customer.billing_address. zip |
Billing State/Province | Customer.billing_address. state |
Billing Country | Customer.billing_address. country |
Chargebee Email* | Customer.email |
Chargebee First Name* | Customer.first_name |
Chargebee Id* | Customer.id |
Chargebee Last Name* | Customer.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 that the record has been mapped to Chargebee. |
Locale* | Customer.locale |
Net Term Days* | Customer.net_term_days |
Payment Method Status* | Customer.payment_method.status |
Payment Method Type* | Customer.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* | Customer.taxability |
VAT Number* | Customer.vat_number |
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* | (Deprecated) |
Payment Method Status* | (Deprecated) |
Payment Method Type* | (Deprecated) |
Net Term Days* | (Deprecated) |
Chargebee_Modified_Time* | (Deprecated) |
Auto collection* | (Deprecated) |
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 Price Book record is created for each Chargebee site that is connected to the Salesforce org. 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 |
Product Code | Plan.id or Addon.id |
|
List Price | Plan.price or Addon.price |
The value is set to 0 when the Recurring charge model is volume , tiered or stairstep . |
Active | Plan.status or Addon.status |
If Plan.status or Addon.status is active then true else false . |
Use Standard Price | Always set to false . |
|
Currency ( chargebeeapps__Currency__c ) |
Plan. currency_code or Addon.currency_code |
|
Currency ( CurrencyIsoCode ) |
(Not used) | |
Setup Cost* | Plan.setup_cost |
|
Trial Period Unit* | Plan.trial_period |
Only applicable for plans. |
Trial Period Unit* | Plan. trial_period_unit |
Only applicable for plans. |
Bill Every* | Plan.period or Addon.period |
|
Bill Every Unit* | Plan.period_unit or Addon.period_unit |
|
Billing Cycles* | Plan.billing_cycles or Addon.billing_cycles |
|
Free Quantity* | Plan.free_quantity |
Only applicable for plans. |
Recurring charge model* | Addon.charge_type |
Only applicable for addons. |
Pricing Model* | Plan. or addon.pricing_model |
|
Invoice Name* | Plan.invoice_name or Addon.invoice_name |
|
Chargebee Modified Time* | Time when changes to the plan/addon record were last synced to Salesforce. | |
Addon Applicability* | Plan.addon_applicability |
Only applicable for plans and not for addons. |
Each plan and addon is synced into Salesforce as a Product record.
Salesforce Field (* indicates custom field) |
Chargebee Field / Data |
External ID | (Not used) |
Active | (Not used) |
Product Name | Plan.name or Addon.name |
Product Code | Plan.id or Addon.id |
Product Currency | Plan. currency_code or Addon.currency_code |
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 PLAN for plans and ADDON for addons. |
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:
<table
class="wrapped relative-table cbDocsTable"
style="width: 100%"
resolved=""
>
<colgroup>
<col style="width: 20.279%" />
<col style="width: 79.721%" />
</colgroup>
<tbody>
<tr>
<td class="highlight-grey cbDocsTd" data-highlight-colour="grey">
<p>
<strong>Salesforce Field</strong>
</p>
<p>(* indicates custom field)</p>
</td>
<td class="highlight-grey cbDocsTd" data-highlight-colour="grey">
<strong>Chargebee Field/Data</strong>
</td>
</tr>
<tr>
<td colspan="1" class="cbDocsTd">
<span style="color: rgb(0, 0, 0)">Amount</span>
</td>
<td colspan="1" class="cbDocsTd">
Sum of Totals of the Opportunity Products.
</td>
</tr>
<tr>
<td class="cbDocsTd">
<span style="color: rgb(9, 30, 66)">Close Date</span>
</td>
<td class="cbDocsTd">
<code>
<span style="color: rgb(27, 39, 51)">
Subscription.activated_at
</span>
</code>
</td>
</tr>
<tr>
<td class="cbDocsTd">
<span style="color: rgb(9, 30, 66)">Opportunity Currency</span>
</td>
<td class="cbDocsTd">
<code>
<span style="color: rgb(27, 39, 51)">
Subscription.currency_code
</span>
</code>
</td>
</tr>
<tr>
<td class="cbDocsTd">
<span style="color: rgb(9, 30, 66)">Opportunity Name</span>
</td>
<td class="cbDocsTd">
This field is set to the
<span style="color: rgb(0, 0, 0)">company name</span> of the
customer record.
</td>
</tr>
<tr>
<td class="cbDocsTd">Price book</td>
<td class="cbDocsTd">
The Id of the price book for the Chargebee site.
</td>
</tr>
<tr>
<td class="cbDocsTd">
<span style="color: rgb(9, 30, 66)">Stage</span>
</td>
<td class="cbDocsTd">
The stage of the opportunity may be set via the integration if
configured accordingly.
</td>
</tr>
<tr>
<td colspan="1" class="cbDocsTd">
<span class="uiOutputText">CB Opportunity Type*</span>
</td>
<td colspan="1" class="cbDocsTd">
<p>
<span style="color: rgb(0, 0, 0)">
Indicates the opportunity type in relation to Chargebee. This
field is set by Chargebee and can have one of the following
values:
</span>
</p>
<ul style="list-style-type: square">
<li>
<span style="color: rgb(0, 0, 0)">
<code>New subscription</code>: indicates that the opportunity
is for creating a new subscription.
</span>
</li>
<li>
<span style="color: rgb(0, 0, 0)">
<code>Renewal</code>: indicates that the opportunity has been
created via <strong>setting 4.1</strong> for subscriptions
with finite billing cycles, for the renewal of their terms.
<br />
</span>
</li>
<li>
<span style="color: rgb(0, 0, 0)">
<code>Upgrade/Downgrade</code>: indicates that the opportunity
has been updated using the
<strong>Manage CB Products</strong> action to update an
existing subscription.
</span>
</li>
</ul>
</td>
</tr>
<tr>
<td colspan="1" class="cbDocsTd">
<span class="uiOutputText">Subscription Id*</span>
</td>
<td colspan="1" class="cbDocsTd">
The id of the subscription in Chargebee that the opportunity is
linked to.
</td>
</tr>
<tr>
<td colspan="1" class="cbDocsTd">
<span class="uiOutputText">Update Chargebee*</span>
</td>
<td colspan="1" class="cbDocsTd">
Checkbox which determines whether a subscription should be created
or updated in Chargebee when the opportunity is won.
</td>
</tr>
<tr>
<td colspan="1" class="cbDocsTd">
Coupon*
</td>
<td colspan="1" class="cbDocsTd">
<span style="color: rgb(0, 0, 0)">
Deprecated field. The attached coupons can now be found in the
<strong>CB Coupon</strong> related list for the opportunity.
</span>
</td>
</tr>
</tbody>
</table>
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:
<table
class="wrapped relative-table cbDocsTable"
style="width: 93.8907%"
resolved=""
>
<colgroup>
<col style="width: 20.9143%" />
<col style="width: 79.0857%" />
</colgroup>
<tbody>
<tr>
<td class="highlight-grey cbDocsTd" data-highlight-colour="grey">
<p>
<strong>Salesforce Field</strong>
</p>
<p>(* indicates custom field)</p>
</td>
<td class="highlight-grey cbDocsTd" data-highlight-colour="grey">
<strong>Chargebee Field/Data</strong>
</td>
</tr>
<tr>
<td colspan="1" class="cbDocsTd">
<span class="uiOutputText">Subtotal</span>
</td>
<td colspan="1" class="cbDocsTd">
Sales Price x Quantity
</td>
</tr>
<tr>
<td colspan="1" class="cbDocsTd">
Total
</td>
<td colspan="1" class="cbDocsTd">
<span style="color: rgb(9, 30, 66)">
(Sales Price - Sales Price x Discount) x Quantity
</span>
</td>
</tr>
<tr>
<td class="cbDocsTd">
<span style="color: rgb(9, 30, 66)">Quantity</span>
</td>
<td class="cbDocsTd">
<p>
<code>
<span style="color: rgb(9, 30, 66)">
Subscription.plan_quantity
</span>
</code>
</p>
<p>
<span style="color: rgb(9, 30, 66)">or</span>
</p>
<p>
<code>
<span style="color: rgb(9, 30, 66)">
<span style="color: rgb(9, 30, 66)">
Subscription.addons.quantity
</span>
</span>
</code>
</p>
</td>
</tr>
<tr>
<td colspan="1" class="cbDocsTd">
Price Book Entry
</td>
<td colspan="1" class="cbDocsTd">
Lookup(Price Book Entry)
</td>
</tr>
<tr>
<td colspan="1" class="cbDocsTd">
List price
</td>
<td colspan="1" class="cbDocsTd">
<strong>List Price</strong> from Price Book Entry
</td>
</tr>
<tr>
<td colspan="1" class="cbDocsTd">
<span style="color: rgb(9, 30, 66)">Sales Price</span>
</td>
<td colspan="1" class="cbDocsTd">
<p style="text-align: left">
<code>
<span>Subscription.plan_unit_price</span>
</code>
</p>
<p style="text-align: left">
<span>or</span>
</p>
<p style="text-align: left">
<code>
<span>Subscription.addons.unit_price</span>
</code>
</p>
</td>
</tr>
<tr>
<td colspan="1" class="cbDocsTd">
<span style="color: rgb(9, 30, 66)">Discount</span>
</td>
<td colspan="1" class="cbDocsTd">
<p style="text-align: left">
<span style="color: rgb(0, 0, 0)">
<strong>For Chargebee plans:</strong> the discount percentage is
calculated based on the plan free quantity and the coupon
discount.
</span>
</p>
<p style="text-align: left">
<span style="color: rgb(0, 0, 0)">
<strong>For Chargebee addons:</strong> the discount percentage
is calculated based on the coupon discount.
</span>
</p>
<p style="text-align: left">
<span style="color: rgb(0, 0, 0)">
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 <a mid="link_doc" href="coupons.html#do-coupons-have-a-recurring-option">limited period
or one-time coupons</a> while calculating Discount, contact
<a
href="mailto:support@chargebee.com"
class="external-link"
rel="nofollow"
>
support@chargebee.com
</a>
.
</span>
</p>
</td>
</tr>
<tr>
<td colspan="1" class="cbDocsTd">
Service Period (days)*
</td>
<td colspan="1" class="cbDocsTd">
<p>
<code>
<span style="color: rgb(0, 0, 0)">
<span class="text-muted">
Subscription.event_based_addons.
</span>
service_period_in_days
</span>
</code>
</p>
</td>
</tr>
<tr>
<td colspan="1" class="cbDocsTd">
Billing Cycles*
</td>
<td colspan="1" class="cbDocsTd">
<p>
<code>
Subscription.<span>remaining_billing_cycles</span>
</code>
<span> or </span>
<code>
<span>
Subscription.addons.<span>remaining_billing_cycles</span>
</span>
</code>
</p>
</td>
</tr>
<tr>
<td colspan="1" class="cbDocsTd">
Apply Charges*
</td>
<td colspan="1" class="cbDocsTd">
<span class="text-muted">
<code>Subscription.event_based_addons.</code>
</span>
<code>charge_once</code>
</td>
</tr>
<tr>
<td colspan="1" class="cbDocsTd">
Addon Event*
</td>
<td colspan="1" class="cbDocsTd">
<code>
Subscription.
<span>
event_based_addons.<span>on_event</span>
</span>
</code>
</td>
</tr>
</tbody>
</table>