Loading
Feature degradation | Gmail Email delivery failureRead More
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Generate Invoice Previews with the Invoice Preview API

          Generate Invoice Previews with the Invoice Preview API

          To generate preview invoices by using the Invoice Preview API, create and activate a custom procedure plan definition for the object that you want to preview invoices for. The Invoice Preview API uses the procedure plan to generate invoice previews.

          Required Editions

          Available in: Lightning Experience
          Available in: Enterprise, Performance, Unlimited, and Developer Editions with the Revenue Cloud Advanced license or the Revenue Cloud Billing license
          User Permissions Needed
          To create and update custom procedure plan definitions: Context Service Admin permission set
          To generate invoice previews by using the API:

          You must have one of these permission sets:

          • Billing Admin
          • Billing Operations User
          • Billing Customer Service
          Important
          Important

          From Summer ’25 and onwards, you will not be able to sync existing context definitions that were either cloned or extended from the standard BillingContext context definition. To fix this issue, use the Context Attribute Mapping API to delete duplicate BSGEntitiesMapping attribute mappings.

          • BillingTransactionSource attribute of the BillingSchedule node to Reference attribute of the BillingSchedule object.
          • BillingTransactionItemSource attribute of the BillingSchedule node to the ReferenceItem attribute of the BillingSchedule object.

          Create a Custom Procedure Plan

          1. Create a custom procedure plan definition.
            1. Select Billing as the process type.
            2. Select the object that you want to preview invoices for as the primary object.
            3. Select the extended BillingContext context definition as the context definition.
          2. Update and activate the procedure plan definition.
            1. Open the procedure plan definition and select a read context mapping for the primary object.
            2. Activate the procedure plan definition.
          3. To generate invoice previews for any billing transaction, use the Invoice Preview API.

          Preview Invoices for Quotes

          To use the standalone Billing Schedules API and Invoice API for quotes, create context definition, a context mapping and a procedure plan.

          1. Extend the BillingContext Context Definition.
          2. Map the Billing Transaction, Billing Transaction Item, Billing Transaction Item Detail, and Billing Transaction Item Relationship nodes and fields to Quote, Quote Line, Quote Line Detail, and Quote Line Relationship objects and fields.
          3. Activate the context definition.
          4. Create a custom procedure plan.
          5. To generate invoice previews for quotes, use the Invoice Preview API.
           
          Loading
          Salesforce Help | Article