Newer Version Available
Use Promotion Business Objects API
Promotion Business Object API can be accessed through REST API, Aura Components, and
Lightning Web Component.
REST API
To process records with Promotion BO API, you need to use the provided REST endpoints in the defined process:
- Initialize a transaction with the number of records to process:
-
URL: <ORG INSTANCE>/services/apexrest/cgcloud/promotions/initialize
METHOD: POST
PAYLOAD: - This request returns an import ID that should be passed to every subsequent requests.
-
- Queue the records to process in blocks of 50 records.
-
URL: <ORG INSTANCE>/services/apexrest/cgcloud/promotions/ingest
METHOD: POST
PAYLOAD: - Each call can contain up to 50 records.
- You can send as many requests to fill the “nrOfItems” defined in the request sent to initialize a transaction.
-
- Monitor the process.
-
URL: <ORG INSTANCE>/services/apexrest/cgcloud/promotions/status?importId=<import Id>
METHOD: GET
- This returns the status for all records part of the transaction.
-