Get Started with Consumer Goods Cloud
Derive and Copy Promotions with MetadataWizard and Business Object API
Process Configuration Settings
Configuration Entities
Implementing Workflow Steps
API End-of-Life Policy
Previous Versions
Business Object API is a feature designed to facilitate integrations of external systems and processes with TPM related SObjects.
SObjects are complex in nature as they require specific attributes and processes to be executed when manipulating them to ensure data is consistent and correctly calculated. Business Object API acts as a middle layer transforming simplified payloads into the required SObject records.
Business Object API features are:
In order to install base Business Object API configurations in an org for a Sales Organization, execute the following APEX snippet:
1cgcloud.TPMSetupData.setupBOApi('<sales org>');You can track the install progress through the related Batch Run Status record.
When a Business Object API request is received, the following steps are executed in order to process the request for each input:
Spawn a Queueable job for each input record.
Input validation: Based on the workflow configuration records, the received input is validated against the expected schema. If the validation fails, an error is emitted and the process stops
Transformation phase: At this point, all the Workflow Steps defined for the Workflow start executing in the defined order:
For each Workflow Step:
After all Workflow Steps are executed, the output object is completed
Business Logic Save: The generated output object is passed to the relevant Business Logic save function. This will generate all the required SObject DML operations
Database Commit: After all the Steps are executed, data is committed to the Database
If the system detects any DML Row Lock exception during steps 3, 4 or 5, the operation will be retried.
All Business Object API requests are logged into the Business Object API Transaction Log SObject for traceability.
Process Configuration Settings
When executing BO API process, the system reads the following configuration values from System Setting Custom setting in order to define it’s behavior.
Business Object API records contains Workflows and Output Entities.
Workflow Steps are implemented as APEX classes that are used in implementing the System.Callable interface.
This section describes the base configuration provided for the Promotion Business Object.