Create the Execute Promotion BO API Workflow Action
Create a custom action that runs a promotion business object (BO) API workflow. This action lets the agent update a promotion record for the user.
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 Apex.
- From the Reference Action Category dropdown, select Invocable Method.
- From the Reference Action dropdown, select Execute Promotion BO API Workflow.
-
Enter
Execute Promotion BO API Workflowfor the Agent Action Label field andExecute_Promotion_BO_API_Workflowfor the Agent Action API Name field. - Click Next.
-
Configure the action's instructions and variables:
- In the Agent Action Instructions field, enter Executes the given Promotion BO API Workflow for the given Promotion Payload.
- In the Loading Text field, enter Working...
-
Under Input, for workflowActionParameters:
- In the Instructions field, enter Promotion JSON payload. This attribute contains a serialized JSON payload that must be a JSON string respecting the workflow schema.
- Select the Require Input checkbox.
- Clear the Collect data from user checkbox.
-
Under Input, for workflowActionName:
- In the Instructions field, enter Name of the workflow to execute. This attribute contains the name of the workflow to execute.
- Select the Require Input checkbox.
- Clear the Collect data from user checkbox.
-
Under Output, for promotion:
- In the Instructions field, enter Created or updated record.
- Clear the Filter from Agent Action checkbox.
- Select the Show in conversation checkbox.
- From the Output Rendering dropdown, select Object.
-
Under Output, for isError:
- In the Instructions field, enter If true, the request finished with error.
- Clear the Filter from Agent Action and Show in conversation checkboxes.
- From the Output Rendering dropdown, select Boolean.
-
Under Output, for errorMessage:
- In the Instructions field, enter In case of error, the error message.
- Clear the Filter from Agent Action and Show in conversation checkboxes.
- From the Output Rendering dropdown, select Text.
- Click Finish.
Did this article solve your issue?
Let us know so we can improve!

