PlaceSalesTransactionExecutor Class
Contains methods to place a sales transaction with details of the graph request, pricing preferences, and configuration options.
-
PlaceSalesTransactionExecutor Methods
Learn more about the methods available with the
PlaceSalesTransactionExecutorclass. -
PlaceSalesTransactionExecutor Example Implementation
To place a sales transaction from Apex, refer to the example implementation of the
PlaceSalesTransactionExecutorclass.
Learn more about the methods available with the PlaceSalesTransactionExecutor class.
The PlaceSalesTransactionExecutor class includes these methods.
-
Use the method in the
PlaceSalesTransactionExecutorclass to execute the Place Sales Transaction Apex API request by assigning the properties for graph request, pricing references, and configurator options. -
Use the method in the
PlaceSalesTransactionExecutorclass to execute the Place Sales Transaction Apex API request by assigning the properties for graph request, pricing references, configurator options, and catalog rates. -
Use the method in the
PlaceSalesTransactionExecutorclass to execute the Place Sales Transaction Apex API request by assigning the properties for graph request, pricing and tax preferences, configurator options, and catalog rates. -
Use the method in the
PlaceSalesTransactionExecutorclass to execute the Place Sales Transaction Apex API request by assigning the properties for graph request, pricing and tax preferences, configurator options, persist preference, and group ramp action. -
Use the method in the
PlaceSalesTransactionExecutorclass to execute the Place Sales Transaction Apex API request by assigning the properties for graph request, pricing and tax preferences, configurator options, catalog rates, persist preference, and group ramp action.
Use the method in the PlaceSalesTransactionExecutor class to execute the Place Sales Transaction Apex API request by assigning the properties for graph request, pricing references, and configurator options.
public static revsalestrxn.PlaceSalesTransactionResponse execute(revsalestrxn.GraphRequest graphRequest, revsalestrxn.PricingPreferenceEnum pricingPreferenceEnum, revsalestrxn.ConfigurationExecutionEnum configurationExecutionEnum, revsalestrxn.ConfiguratorOptions configuratorOptions, revsalestrxn.ContextId contextId)
graphRequest
Type: revsalestrxn.GraphRequest
The sObject graph values of the order payload to be ingested.
pricingPreferenceEnum
Type: revsalestrxn.PricingPreferenceEnum
Pricing preference during the sales transaction process.
configurationExecutionEnum
Type: revsalestrxn.ConfigurationExecutionEnum
Configuration method for the sales transaction request.
configuratorOptions
Type: revsalestrxn.ConfigurationOptionsInput
Configuration options during the creation of the sales transaction.
contextId
Type: String
Context ID to assign to the sales transaction.
Type: revsalestrxn.PlaceSalesTransactionResponse
Use the method in the PlaceSalesTransactionExecutor class to execute the Place Sales Transaction Apex API request by assigning the properties for graph request, pricing references, configurator options, and catalog rates.
Usage Selling must be enabled to use this signature.
public static revsalestrxn.PlaceSalesTransactionResponse execute(revsalestrxn.GraphRequest graphRequest, revsalestrxn.PricingPreferenceEnum pricingPreferenceEnum, revsalestrxn.ConfigurationExecutionEnum configurationExecutionEnum, revsalestrxn.ConfiguratorOptions configuratorOptions, revsalestrxn.ContextId contextId, revsalestrxn.CatalogRatesPreferenceEnum catalogRatesPreferenceEnum)
graphRequest
Type: revsalestrxn.GraphRequest
The sObject graph values of the order payload to be ingested.
pricingPreferenceEnum
Type: revsalestrxn.PricingPreferenceEnum
Pricing preference during the sales transaction process.
configurationExecutionEnum
Type: revsalestrxn.ConfigurationExecutionEnum
Configuration method for the sales transaction request.
configuratorOptions
Type: revsalestrxn.ConfigurationOptionsInput
Configuration options during the creation of the sales transaction.
contextId
Type: String
Context ID to assign to the sales transaction.
catalogRatesPreferenceEnum
Type: revsalestrxn.CatalogRatesPreferenceEnum
Rate card entries defined in the catalog that must be fetched for quote line items, with usage-based selling during the place sales transaction process.
Type: revsalestrxn.PlaceSalesTransactionResponse
Use the method in the PlaceSalesTransactionExecutor class to execute the Place Sales Transaction Apex API request by assigning the properties for graph request, pricing and tax preferences, configurator options, and catalog rates.
Usage Selling must be enabled to use this signature.
public static revsalestrxn.PlaceSalesTransactionResponse execute(revsalestrxn.GraphRequest graphRequest, revsalestrxn.PricingPreferenceEnum pricingPreferenceEnum, revsalestrxn.ConfigurationExecutionEnum configurationExecutionEnum, revsalestrxn.ConfiguratorOptions configuratorOptions, revsalestrxn.ContextId contextId, revsalestrxn.CatalogRatesPreferenceEnum catalogRatesPreferenceEnum, revsalestrxn.TaxPreferenceEnum taxPreferenceEnum, revsalestrxn.PersistPreferenceEnum persistPreferenceEnum)
graphRequest
Type: revsalestrxn.GraphRequest
The sObject graph values of the order payload to be ingested.
pricingPreferenceEnum
Type: revsalestrxn.PricingPreferenceEnum
Pricing preference during the sales transaction process.
configurationExecutionEnum
Type: revsalestrxn.ConfigurationExecutionEnum
Configuration method for the sales transaction request.
configuratorOptions
Type: revsalestrxn.ConfigurationOptionsInput
Configuration options during the creation of the sales transaction.
contextId
Type: String
Context ID to assign to the sales transaction.
catalogRatesPreferenceEnum
Type: revsalestrxn.CatalogRatesPreferenceEnum
Rate card entries defined in the catalog that must be fetched for quote line items, with usage-based selling during the place sales transaction process.
taxPreferenceEnum
Type: revsalestrxn.taxPreferenceEnum
Tax preference during the sales transaction process. Available in API version 65.0 and later.
persistPreferenceEnum
Type: revsalestrxn.persistPreferenceEnum
Persist preference during the sales transaction process. Available in API version 65.0 and later.
Type: revsalestrxn.PlaceSalesTransactionResponse
Use the method in the PlaceSalesTransactionExecutor class to execute the Place Sales Transaction Apex API request by assigning the properties for graph request, pricing and tax preferences, configurator options, persist preference, and group ramp action.
public static revsalestrxn.PlaceSalesTransactionResponse execute(revsalestrxn.GraphRequest graphRequest, revsalestrxn.PricingPreferenceEnum pricingPreferenceEnum, revsalestrxn.ConfigurationExecutionEnum configurationExecutionEnum, revsalestrxn.ConfiguratorOptions configuratorOptions, revsalestrxn.ContextId contextId, revsalestrxn.TaxPreferenceEnum taxPreferenceEnum, revsalestrxn.PersistPreferenceEnum persistPreferenceEnum, revsalestrxn.GroupRampActionEnum groupRampActionEnum)
graphRequest
Type: revsalestrxn.GraphRequest
The sObject graph values of the order payload to be ingested.
pricingPreferenceEnum
Type: revsalestrxn.PricingPreferenceEnum
Pricing preference during the sales transaction process.
configurationExecutionEnum
Type: revsalestrxn.ConfigurationExecutionEnum
Configuration method for the sales transaction request.
configuratorOptions
Type: revsalestrxn.ConfigurationOptionsInput
Configuration options during the creation of the sales transaction.
contextId
Type: String
Context ID to assign to the sales transaction.
taxPreferenceEnum
Type: revsalestrxn.taxPreferenceEnum
Tax preference during the sales transaction process. Available in API version 65.0 and later.
persistPreferenceEnum
Type: revsalestrxn.persistPreferenceEnum
Persist preference during the sales transaction process. Available in API version 65.0 and later.
groupRampActionEnum
Type: revsalestrxn.GroupRampActionEnum
Specifies the action that you want to perform on group ramp segments.
Type: revsalestrxn.PlaceSalesTransactionResponse
Use the method in the PlaceSalesTransactionExecutor class to execute the Place Sales Transaction Apex API request by assigning the properties for graph request, pricing and tax preferences, configurator options, catalog rates, persist preference, and group ramp action.
Usage Selling must be enabled to use this signature.
public static revsalestrxn.PlaceSalesTransactionResponse execute(revsalestrxn.GraphRequest graphRequest, revsalestrxn.PricingPreferenceEnum pricingPreferenceEnum, revsalestrxn.ConfigurationExecutionEnum configurationExecutionEnum, revsalestrxn.ConfiguratorOptions configuratorOptions, revsalestrxn.ContextId contextId, revsalestrxn.CatalogRatesPreferenceEnum catalogRatesPreferenceEnum, revsalestrxn.TaxPreferenceEnum taxPreferenceEnum, revsalestrxn.PersistPreferenceEnum persistPreferenceEnum, revsalestrxn.GroupRampActionEnum groupRampActionEnum)
graphRequest
Type: revsalestrxn.GraphRequest
The sObject graph values of the order payload to be ingested.
pricingPreferenceEnum
Type: revsalestrxn.PricingPreferenceEnum
Pricing preference during the sales transaction process.
configurationExecutionEnum
Type: revsalestrxn.ConfigurationExecutionEnum
Configuration method for the sales transaction request.
configuratorOptions
Type: revsalestrxn.ConfigurationOptionsInput
Configuration options during the creation of the sales transaction.
contextId
Type: String
Context ID to assign to the sales transaction.
catalogRatesPreferenceEnum
Type: revsalestrxn.CatalogRatesPreferenceEnum
Rate card entries defined in the catalog that must be fetched for quote line items, with usage-based selling during the place sales transaction process.
taxPreferenceEnum
Type: revsalestrxn.taxPreferenceEnum
Tax preference during the sales transaction process. Available in API version 65.0 and later.
persistPreferenceEnum
Type: revsalestrxn.persistPreferenceEnum
Persist preference during the sales transaction process. Available in API version 65.0 and later.
groupRampActionEnum
Type: revsalestrxn.GroupRampActionEnum
Specifies the action that you want to perform on group ramp segments.
Type: revsalestrxn.PlaceSalesTransactionResponse
To place a sales transaction from Apex, refer to the example implementation of the PlaceSalesTransactionExecutor class.
Customize this example to suit your requirements. Create the list of records to be ingested by using these steps. Replace the respective IDs with the values that are present in your org. For example, replace the value of ${Pricebook2Id} field with the price book ID that’s present in the org.
This example shows a sample request to create a sales transaction, update a quote with a quote line item, delete a quote line item, or skip or persist pricing changes. It includes these steps.
- Set up a quote and quote line item.
- To create a quote line relationship, create an instance of the
RecordResourceclass. To create an object with its fields, specify the object that you want to create by using POST method. Create a map of the fields and its values by using put(key, value) operation. Assign this field map to the record object. - To update an object’s specific fields, specify the object you want to update by using the PATCH method along with the ID of the object. Create a map of the fields and its values by using put(key, value) operation. Only certain fields on an object can be updated. Add the fields that you want to update to the map. Assign this field map to the record object.
- To associate the Record object with a reference identifier, create an instance of the
RecordWithReferenceRequestclass. - To contain all record objects, create an instance of the
GraphRequestclass.