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 [email protected] .
Add Chargebee UI elements manually
The following user interface items need to be added to the Page Layouts of various Salesforce objects first:
Editing fields on pages
If you edit fields on Salesforce pages, the changes are not synced to Chargebee. The only exception is the Account object whose data can be pushed using the Create/Update Chargebee Customer action.
Available under: Account
Description
Pushes the account information into a Chargebee customer record as explained here. If the account has not been mapped to a customer in Chargebee then a new customer record is created in Chargebee first. You can also automate this process for any account by checking the Sync with Chargebee field on its page layout. Checking the box immediately triggers this operation and also triggers it for every update made to the account thereafter. Uncheck the box to stop the triggers from firing.
Unconditional overwriting
Observe caution when using Create/Update Chargebee Customer, as data is overwritten for the customer record in Chargebee even if it is more recent than that in the Salesforce contact.
Multiple Chargebee sites
If multiple Chargebee sites have been connected to Salesforce, then on clicking Create/Update Chargebee Customer, you will be prompted to choose one of them to sync to.
Available under: Account
Account hierarchy must be enabled in Chargebee for this action to work.
This action sets the account hierarchy in Chargebee for a pair of customers, in accordance with how it has been set for the accounts in Salesforce. If any of the pair of accounts have not been synced to Chargebee before, this action syncs them first before setting the hierarchy. You must invoke this action from the child account. If you want to set a hierarchy in Chargebee that involves multiple customer records, you must build it from the bottom, linking one parent after another.
Viewing the Hierarchy
If the account hierarchy has already been set in Chargebee, the action displays the currently set hierarchy in Chargebee.
When setting the hierarchy in Chargebee as described above, you must also choose the invoice owner and payment owner for the subscriptions created for the child account. The following options are available:
If a hierarchy is already set in Chargebee you can also use this feature to unlink it.
Available under: Account
Sends an email via Chargebee to the account prompting them to update their payment method. The email contains a link that the customer can follow to enter their payment method details which is then stored by Chargebee for later payments.
When multiple Chargebee sites are connected…
This operation will be invoked for the Chargebee site that the account has been mapped to.
Using Account Hierarchy in Chargebee
If payments for the customer are made by another in Chargebee, ensure that this action is invoked in Salesforce from the account which corresponds to the paying customer.
Available under: Account
This action, allows a Salesforce user to directly update the payment method on behalf of the customer in Chargebee. The payment method is captured in a PCI DSS compliant modal or page.
When multiple Chargebee sites are connected…
This operation will be invoked for the Chargebee site that the account has been mapped to.
Using Account Hierarchy in Chargebee
If payments for the customer are made by another in Chargebee, ensure that this action is invoked in Salesforce from the account which corresponds to the paying customer.
Available under: Account
This operation is used to invoice any unbilled charges that may be present for the Chargebee customer record mapped to the account.
When multiple Chargebee sites are connected…
This operation will be invoked for the Chargebee site that the account has been mapped to.
Available under: Opportunity
This action is used to add Chargebee products (plan and addons) and coupons to the opportunity.
Caution
Do not use Add Products or Edit Products in Salesforce to insert Chargebee products into opportunities as it is incompatible with certain Chargebee features such as:
Use Manage CB Products always.
The opportunities can be for creating new subscriptions or for changing existing ones. Manage CB Products enables you in either situation.
If the opportunity is for a new subscription, then add products as follows:
If the opportunity is intended to make changes to an existing subscription, then proceed as follows:
Available under: Account
This action creates a subscription against the Chargebee customer mapped to the account. Subscriptions can also be created from quotes directly by converting them.
When multiple Chargebee sites are connected…
This operation will be invoked for the Chargebee site that the account has been mapped to.
Once the subscription is created in Chargebee, it is immediately synced back into Salesforce as a record under the CB Subscription custom object. This sync can take a few minutes. The opportunity – if one is chosen in step 3 above – is also updated.
Using Account Hierarchy in Chargebee
If the customer record linked to the contact is part of a hierarchical account relationship in Chargebee, then using this action will cause erroneous behavior. Always use the Create Subscription action for such cases.
When on the Create Subscription page, you have the alternative of enabling the customer to checkout and pay for the subscription themselves. This is done via the Send Checkout Link button.
Fill the create subscription form and click the Send Checkout Link button at the bottom.
Edit the subject and the body of the email. Note that the checkout link is inserted into the body of the email.
Click Send. Sent emails can be seen on the Activity tab for the opportunity, contact and account in Salesforce.
The customer can now click on the checkout link and pay for the subscription. The shipping address specified in the Create Subscription page is prefilled for the customer on the checkout page. When the subscription is created in Chargebee on checkout, the address is attached to it.
The subscription once created, is reflected in Salesforce when the next sync is run.
No offline payments
The Send Checkout Link workflow signs up the customer using Chargebee Checkout. The subscription is created once the payment is made successfully. There is no option for the customer to defer payments and make them offline later.
If you wish to keep charges unbilled for the customer then instead of using Send Checkout Link, select the Add to unbilled charges option on the Create Subscription form instead and click on Create New Subscription.
Available under: Opportunity
This action allows you to create/change a subscription from an opportunity. You can have this operation trigger automatically for won opportunities by using setting 1.3 for Opportunities and Subscriptions.
Caution
To add/edit opportunity products before performing this action, always use Manage CB Products and not the standard Add Products or Edit Products buttons as the they're incompatible with certain Chargebee features such as:
When multiple Chargebee sites are connected…
This operation will be invoked for the Chargebee site that the account has been mapped to.
Once the subscription is created/updated in Chargebee, it is immediately synced back into Salesforce as a record under the CB Subscription custom object. This sync can take a few minutes.
If the opportunity is intended for creating a new subscription, then follow the steps below:
Use Manage CB Products to add Chargebee products and coupons to the opportunity.
Click Create/Change Subscription.
Under Create/Change Subscription for, chose New Subscription.
Click Next.
The products and coupons selected in step 1 are seen prefilled in the form that appears.
Proceed to create a subscription using the form.
Click Create New Subscription. If you'd rather have the customer subscribe themselves, click Send Checkout Link instead.
If the opportunity is intended for changing an existing subscription, then follow the steps below:
Use Manage CB Products to add Chargebee products and coupons to the opportunity. - While doing so choose Existing Subscription under Manage Products for and choose the subscription this opportunity is for.
Click Create/Change Subscription.
Complete the Change Subscription form.
For Non-recurring addons specify:
For recurring addons: if billing cycles for addons is enabled in Chargebee, you can set the number of billing cycles.
Click Update.
Available under: CB Subscription
This operation makes changes to a subscription in Chargebee through Salesforce and then syncs it back to Salesforce. You can make any combination of the following changes to a Chargebee subscription using this action:
Upgrade/downgrade the plan
Add/remove addons
Change the price
Add coupon discounts
Change the PO Number
Change the number of billing cycles
Furthermore, these changes can be applied immediately or on the next renewal. When changes are applied immediately, you can choose whether or not to raise any prorated charges/credits for them. Moreover, when charges are raised for the changes, they can either be invoiced immediately or added to unbilled charges.
For Non-recurring addons specify:
For recurring addons: if billing cycles for addons is enabled in Chargebee, you can set the number of billing cycles.
Available under: CB Subscription
This action cancels the subscription.
A subscription can be canceled immediately or at the end of the current term.
Cancellation impacts
While canceling subscriptions, considerations such as whether to raise prorated credits for the unused period or how unbilled charges are handled, are dealt with as per the subscription cancellation settings configured for the Chargebee site.
Upon canceling a subscription, the change is only reflected in Salesforce on the next sync.
You cannot delete a subscription directly from within Salesforce.
A quote in Chargebee is a document used to let a potential buyer know how much the goods or services will cost before they commit to the purchase. You can create and work with Chargebee quotes from within Salesforce. The following operations are available.
Available under: Opportunity
This action creates a new subscription quote for a customer in Chargebee. The opportunity must be linked to an account.
When multiple Chargebee sites are connected…
This operation will be invoked for the Chargebee site that the account has been mapped to.
Once created, the quote is visible under the CB Quotes related list for the opportunity.
Quote line items
The video below describes how a Chargebee quote is created in Salesforce.
Quote notes
While creating a quote, you can add a note to it. You can even have a note configured in your Chargebee site to be applied to all quotes automatically. These notes are imprinted on the quote PDF and can also be seen in the Notes & Attachment related list for the quote.
Available under: CB Quote
Once a quote has been created and for as long as it is open, you can send the quote to the customer so that they may review it. The Send Email option does just that. It launches an email composer with the quote PDF attached. The body of the email, by default, also has a quote acceptance link which the customer can follow to pay and subscribe themselves. The quote acceptance link can also be found in the CB Acceptance Link field of the CB Quotes object. The shipping address details used while creating the quote are prefilled for the customer on the checkout page. When the subscription is created in Chargebee on checkout, the address is attached to it.
The subscription once created, is reflected in Salesforce when the next sync is run. Also, the opportunity is updated if setting 1.1 and 1.2 are configured appropriately.
Salesforce Approvals
This operation is subject to any Salesforce approval workflows when the appropriate setting is enabled in Chargebee.
Here's a video explaining the Chargebee quote email workflow for Salesforce:
Available under: CB Quote
This operation bills the quote and completes the purchase of the items in the quote.
The charges raised can be invoiced immediately or left as unbilled charges. If you turn Auto collection on then the charges for the next renewal will be collected automatically at the time of renewal. You can also specify the Subscription Id and the PO Number for the subscription that will be created. The former is auto-generated to a random value if not specified. The created subscription is reflected in Salesforce on the next sync.
Available under: CB Quote
A Chargebee quote cannot be invoiced once expired. This action extends the expiration date of the quote. Click on Extend Expiry, select the new expiration date from the options available and click Save. A new quote PDF is immediately generated with the updated expiration date and made available under the Notes & Attachments related list of the CB Quote record.
Available under: CB Quote
You may have extended the expiry of a quote in Chargebee. This information is reflected in Salesforce in the next sync. However, a new PDF is not generated automatically.
Available under: CB Quote
This updates the products and value of the linked opportunity with those on the quote. When you have created multiple quotes for an opportunity, the products and value on the opportunity match those of the last quote created. If your client decides to go with a different quote than the one last created, you can go that quote and invoke this action so that the opportunity shows the accurate picture of the deal.
The following message appears when you click on the Sync to Opportunity button.
Click on Sync Quote to update the linked opportunity.
Available under: CB Subscription
This action changes the time/date the next renewal of the subscription happens.
Choosing to prorate will raise prorated charges or credits against the customer record depending on whether the renewal date is postponed or advanced respectively. If prorate is unchecked then no charges or credits are raised for changing the next billing date.
Further, on choosing to prorate, if charges are raised, they may be invoiced immediately or added to unbilled charges, depending on what's chosen under Invoicing Options.
Change next billing date help page.
Available under: CB Subscription
This action adds a one-time charge to the subscription. This option can be quite useful, especially when you come across scenarios where you have to collect payments from customers for goods or services that are not normally included as a part of their subscription model.
Available under: CB Subscription
The Sync Due Invoice Count updates the Due Invoice Count field to the current value.
The Due Invoices Count field in the CB Subscription object shows the total number of invoices that are yet unpaid against the subscription. This field, however, is not updated on any given sync unless the subscription itself has undergone a change since the last sync. So occasionally, invoices may get paid without the field getting updated automatically. Sync Due Invoice Count helps by fetching the current value of the Due Invoice Count field from Chargebee.