Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
PromotionPushRemoteActionExtension Class
- readLOExtChildPromotions
- pushBOPromotion
- synchronizeBOPromotion
Sample Code Snippet
1String parentPromotionId = '<FILLHERE>';
2String readParams = '{"promotionId":"' + parentPromotionId + '"}';
3String txid = cgcloud.TransactionHandler.getTransactionIdentifier();
4cgcloud.PromotionPushRemoteActionExtension.pushBOPromotion(txid, readParams);readLOExtChildPromotions (txId, readParams)
Reads the list of child promotions available for a parent promotion.
- API Version
- 65.0 and later
- Signature
-
1global static List<cgcloud__Promotion__c> readLOExtChildPromotions(String txId, String 2 readParams) - Signature Parameters
-
- txId: Enter the GUID of the transaction that is used to log and track the status of promotions that were pushed. It is also used to find status details in push related to the Batch Run Status record and the Promotion Push Status record.
- readParams: A JSON snippet that contains the parent promotion ID within the parentId property.
pushBOPromotion (txId, readParams)
Triggers the push process for the parent promotion ID provided as an input. Trigger error is thrown as an exception.
- API Version
- 65.0 and later
- Signature
-
1global static void pushBOPromotion(String txId, String readParams) - Signature Parameters
-
- txId: Enter the GUID of the transaction that is used to log and track the status of promotions that were pushed. It is also used to find status details in push related to the Batch Run Status record and the Promotion Push Status record.
- readParams: A JSON snippet that contains the parent promotion ID within the parentId property.
synchronizeBOPromotion (txId, readParams)
Synchronizes and triggers the push process for the parent promotion ID provided as an input. The method returns true only if the push is triggered successfully. The method returns false in case of a push trigger error. For example, when the scheduling threshold limit is reached or if push is already in progress. The push trigger error is sent as a notification to the user who is calling the method.
- API Version
- 65.0 and later
- Signature
-
1global static Boolean synchronizeBOPromotion(String txId, String readParams) - Signature Parameters
-
- txId: Enter the GUID of the transaction that is used to log and track the status of promotions that were pushed. It is also used to find status details in push related to the Batch Run Status record and the Promotion Push Status record.
- readParams: A JSON snippet that contains the parent promotion ID within the parentId property.