Learn Basic Concepts

Familiarize yourself with these Salesforce technologies before using the Subscription Management API.

Many Subscription Management REST API endpoints are asynchronous, meaning that the request initiates a process in Salesforce and then returns before the process is complete. For example, when you request /actions/standard/createBillingScheduleFromOrderItem, the response returns before Salesforce finishes creating the billing schedules. When the process is complete, it publishes a platform event containing status information and the ID of any records that were created. You can retrieve this information by subscribing to the platform event published by the Salesforce process. For more information about subscribing to platform events, see Subscribing to Platform Events.

A request for an asynchronous process can return a success response, even if the Salesforce process it starts isn’t successful. To learn whether the Salesforce process is successful, write code to parse the platform event that is published by the Salesforce process.

Asynchronous Subscription Management API endpoints publish platform events containing information about the success or failure of a request, along with other information. Because platform events are only stored for a few days, any error information they contain is persisted in RevenueTransactionErrorLog records so you can access the information at a later date. You can use a SOQL query to retrieve these records, and they can be added to pages in Lightning Experience. To learn more about revenue transaction error log records, see RevenueTransactionErrorLog.

To build Subscription Management solutions without code, use Salesforce Flows. We've created the Buy Now flow template to help you get started.