Loading
Set Up Trade Promotion Management
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Create the Execute Promotion BO API Workflow Action

          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
          1. From Setup, in the Quick Find box, enter Agentforce Assets, and then select Agentforce Assets.
          2. Click Actions.
          3. Click New Agent Action.
          4. From the Reference Action Type dropdown, select Apex.
          5. From the Reference Action Category dropdown, select Invocable Method.
          6. From the Reference Action dropdown, select Execute Promotion BO API Workflow.
          7. Enter Execute Promotion BO API Workflow for the Agent Action Label field and Execute_Promotion_BO_API_Workflow for the Agent Action API Name field.
          8. Click Next.
          9. 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...
          10. 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.
          11. 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.
          12. 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.
          13. 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.
          14. 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.
          15. Click Finish.
           
          Loading
          Salesforce Help | Article