How do I use Manage CB Products in a Salesforce Screen Flow?
Problem Statement
You want to add Chargebee products to a Salesforce opportunity from a Screen Flow, using Manage CB Products, instead of the standard Salesforce Add Products button.
Related Scenarios
- How do I add the CB Managed products component to a Salesforce Screen Flow?
- How do I pass an existing subscription into that screen component?
Solution
Manage CB Products is available in a Screen Flow as the custom screen component CB Managed products. It is not an Apex action. You need permission to create and edit Flows in Salesforce, and the Chargebee managed package must be installed in the org.
The same steps are documented in Chargebee Actions in Salesforce and How to create/update subscription using Salesforce Flow Builder?.
- Go to Setup.
- In Quick Find, search for Flows, then open Flows.
- Click New Flow, select Screen Flow, and continue.
- Add a Screen element.
- In the screen editor, under Custom, add CB Managed products.
- Set Opportunity SF-Id to the Salesforce opportunity Id, and set Site or Domain Name to the Chargebee site. Both are required.
- For an existing subscription, also set Subscription SF-Id. Leave Subscription SF-Id blank when the opportunity is for a new subscription.
- Save and activate the flow, then run it.
- In the component, choose New Subscription or the existing subscription, add the plan and products, and click Add Products.
The products are added to the opportunity. Confirm them on the opportunity under Related > Products.
Important Notes
- Change Subscription is a separate screen component. Use CB Managed products for Manage CB Products.
- Business Entity SF-Id is optional. Set it when the opportunity is tied to a business entity.
- The same action from an opportunity page is documented in Chargebee Actions in Salesforce.