Create the Retrieve Promotion Measures Action
Create a custom action that gets all measures for a promotion across its products. This lets the agent give performance data for a promotion.
Required Editions
Available in: Lightning Experience Available in: Agentforce 1, Einstein 1, Enterprise and Unlimited Editions with Consumer Goods Cloud Retail Execution and Agentforce for Consumer Goods Cloud add-on licenses |
| User Permissions Needed | |
|---|---|
| To create custom agent actions for TPM Agent: | View Setup and Configuration |
- From Setup, in the Quick Find box, enter Agentforce Assets, and then select Agentforce Assets.
- Click Actions.
- Click New Agent Action.
- From the Reference Action Type dropdown, select Flow.
- From the Reference Action dropdown, select CGCloud: Get Promotion Measures.
-
Enter
Retrieve Promotion Measuresfor the Agent Action Label field andRetrieve_Promotion_Measuresfor the Agent Action API Name field. - Click Next.
-
Configure the action's instructions and variables:
- In the Agent Action Instructions field, enter Retrieves all measures for a single promotion for all its Products and product levels.
- In the Loading Text field, enter Retrieving measures.
-
Under Input, for PromotionId:
- In the Instructions field, enter Id of the Promotion.
- Select the Require Input checkbox.
- Clear the Collect data from user checkbox.
-
Under Output, configure the following:
- For PromotionId:
- In the Instructions field, enter Id of the Promotion.
- Clear the Filter from Agent Action and Show in conversation checkboxes.
- From the Output Rendering dropdown, select Text.
- For ResultMeasures:
- In the Instructions field, enter Retrieved measures for the promotion. This response will contain up to 5000 data points. If this limit is exceeded a message will be set to inform. Measure data is returned on a tree like structure with root level being the Total Product aggregation. Below levels follow the Product hierarchy levels (product groups) while the last level contains the value for each of the measures.
- Clear the Filter from Agent Action checkbox.
- Select the Show in conversation checkbox.
- From the Output Rendering dropdown, select Rich Text.
- For PromotionId:
- Click Finish.
Did this article solve your issue?
Let us know so we can improve!

