Getting Started

Product Catalog

Customers

Subscriptions

Invoices, Credit Notes, and Quotes

Taxes

Payments

Site Configuration

Data Privacy & Security

Data Operations

Reports and Analytics

Integrations

Field-Mapping 

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.

Warning

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 [email protected]  to perform the migration.

Object-Level Mapping 

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
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*

Field-Level Mapping for Standard Objects 

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 .

Account 

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

Customer.company

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

Contact 

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

Email

Customer.email
Name (composite field) Customer.first_nameCustomer.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.

Price Book 

A single Price Book record is created for all the Chargebee sites that are connected to the Salesforce org.

Note: 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

CB Price Book prefixed with the Chargebee site domain name.

Price Book Entry 

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, Addon.id or Charge.id
List Price Item.price(Plan.price, Addon.price or Charge.price) The value is set to 0 when the Recurring charge model is volume, tiered or stairstep.
Active Item.status(Plan.status, Addon.status or Charge.status) If Plan.status , Addon.status  or Charge.statusis active then true else false.
Use Standard Price Deprecated. Not in use for 1.38 and later versions.
Currency (chargebeeapps__Currency__c) Deprecated Deprecated
Currency (CurrencyIsoCode) Plan.currency_code, Addon.currency_code or Charge.currency_code
Setup Cost* 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

Salesforce Field

(* indicates custom field)

Chargebee Field / Data Comments
Product Code Plan.id, Addon.id or Charge.id
List Price Item.price(Plan.price, Addon.price or Charge.price) The value is set to 0 when the Recurring charge model is volume, tiered or stairstep.
Active Item.status(Plan.status, Addon.status or Charge.status) If Plan.status , Addon.status  or Charge.statusis active then true else false.
Use Standard Price Deprecated. If Plan.status , Addon.status  or Charge.statusis active then true else false.
Currency (chargebeeapps__Currency__c) Deprecated
Currency (CurrencyIsoCode) Plan.currency_code, Addon.currency_code or Charge.currency_code
Setup Cost* Deprecated
Trial Period Unit* Deprecated Deprecated
Trial Period Unit* Deprecated Deprecated
Bill Every* Deprecated
Bill Every Unit* Deprecated
Billing Cycles* Deprecated
Free Quantity* Deprecated Deprecated
Recurring charge model* Deprecated Deprecated
Pricing Model* Deprecated
Invoice Name* Deprecated
Chargebee Modified Time* Deprecated
Addon Applicability* Deprecated Deprecated

Product 

Each plan and addon is synced into Salesforce as a Product record.

CB Item Family

Salesforce Field

(* indicates custom field)

Chargebee Field / Data
External ID (Not used)
CB_Item_Family
Active (Not used)
Product Name Plan.name, Addon.name or Charge.name
Product Code Plan.id, Addon.id or Charge.id
Product Currency Plan.currency_code  Addon.currency_codeCharge.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 

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:

Salesforce Field

(* indicates custom field)

Chargebee Field/Data
Amount Sum of Totals of the Opportunity Products.
Close Date Subscription.activated_at
Opportunity Currency Subscription.currency_code
Opportunity Name This field is set to the company name of the customer record.
Price book The Id of the price book for the Chargebee site.
Stage The stage of the opportunity may be set via the integration if configured accordingly.
CB Opportunity Type*

Indicates the opportunity type in relation to Chargebee. This field is set by Chargebee and can have one of the following values:

  • New subscription: indicates that the opportunity is for creating a new subscription.
Subscription Id* The id of the subscription in Chargebee that the opportunity is linked to.
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.

Opportunity Product 

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 CB_Item_Price
Total (Sales Price - Sales Price x Discount) x Quantity
Quantity

Subscription.plan_quantity

or

Subscription.addons.quantity

Price Book Entry Lookup(Price Book Entry)
List price List Price from Price Book Entry
Sales Price

Subscription.plan_unit_price

or

Subscription.addons.unit_price

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 [email protected].

Service Period (days)*

Subscription.event_based_addons.service_period_in_days

Billing Cycles*

Subscription.remaining_billing_cycles or Subscription.addons.remaining_billing_cycles

Apply Charges* Subscription.event_based_addons.charge_once
Addon Event* Subscription.event_based_addons.on_event

Field-Level Mapping for Custom Objects 

Here we look at how fields in custom Salesforce objects are mapped to data in Chargebee. The notation used to represent Chargebee data is as seen in the Chargebee backend API.

CB Item Price 




Salesforce Field

(* indicates custom field)

Chargebee Field/Data
Trial Period Unit tial_period_unit.
Trial Period trial_period
Status 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

price

Period Unit period_unit
Period period
Free Quantity free_quantity
External Id

id

Currency

currency_code

CB Item Price Name

name

Billing Cycles

billing_cycles


Was this article helpful?
Loading…