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 Retrieve Promotions Measures Action

          Create the Retrieve Promotions Measures Action

          Create a custom action that gets all measures for promotions associated with a specific account. This action allows the agent to filter data based on products, product levels, and other criteria to answer user questions about promotion performance.

          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, and then click New Agent Action.
          3. Set the initial attributes:
            • Reference Action Type: Flow
            • Reference Action: CGCloud: Get Promotions Measures
          4. Enter Retrieve Promotions Measures for the Agent Action Label field and Retrieve_Promotions_Measures for the Agent Action API Name field.
          5. In the Agent Action Instructions field, enter: Finds and retrieves the measure values for the promotions of the given account for the given products or product levels and filters.
          6. In the Loading Text field, enter Retrieving measures.
          7. Configure the input variables.
            AccountId
            • Instructions: Record Id of the Account to retrieve data for. Must be a user selected account from the list of managed accounts.
            • Select the Require Input checkbox.
            • Clear the Collect data from user checkbox.
            DateFrom
            • Instructions: Start of the timeframe for the requested data.
            • Select the Require Input checkbox.
            • Clear the Collect data from user checkbox.
            DateThru
            • Instructions: End of the timeframe for the requested data.
            • Select the Require Input checkbox.
            • Clear the Collect data from user checkbox.
            MeasureNames
            • Instructions: Requested Measures. The value for each of the measures of this parameter will be returned in the response. Only measures returned from the available measures list are supported.
            • Select the Require Input checkbox.
            • Clear the Collect data from user checkbox.
            ProductIds
            • Instructions: The collection of product IDs used to get the associated measures. In the absence of any input, measures for the Total product level are returned.
            • Select the Require Input checkbox.
            • Clear the Collect data from user checkbox.
            PromotionPhases
            • Instructions: List of promotion Phases to filter data. If not provided, all will be considered.
            • Clear the Require Input checkbox.
            • Clear the Collect data from user checkbox.
            PromotionTemplateIds
            • Instructions: List of promotion templates to filter data. Promotion records will be filtered according to the provided templates. If not provided, all will be considered.
            • Clear the Require Input checkbox.
            • Clear the Collect data from user checkbox.
            PromotionTimeframe
            • Instructions: Promotion timeframe. Promotion records will be filtered according to the provided timeframe. Only allowed values are "starting", "overlapping" or "including".
            • Clear the Require Input checkbox.
            • Clear the Collect data from user checkbox.
            OrderBy
            • Instructions: Sets the ordering of the Promotion entries for each measure. Allowed values are "ASC" and "DESC". By default no ordering is applied.
            • Clear the Require Input checkbox.
            • Clear the Collect data from user checkbox.
          8. Configure the output variables.
            AccountId
            • Instructions: Id of the account the measures reference
            • Clear the Filter from Agent Action and Show in conversation checkboxes.
            • Output Rendering: Text
            DateFrom
            • Instructions: Timeframe Start
            • Clear the Filter from Agent Action and Show in conversation checkboxes.
            • Output Rendering: Date
            DateThru
            • Instructions: Timeframe End
            • Clear the Filter from Agent Action and Show in conversation checkboxes.
            • Output Rendering: Date
            MeasureNames
            • Instructions: Measures retrieved on the request.
            • Clear the Filter from Agent Action and Show in conversation checkboxes.
            • Output Rendering: Text
            OrderBy
            • Instructions: Result Ordering.
            • Clear the Filter from Agent Action and Show in conversation checkboxes.
            • Output Rendering: Text
            ProductIds
            • Instructions: Product Ids requested
            • Clear the Filter from Agent Action and Show in conversation checkboxes.
            • Output Rendering: Text
            PromotionPhases
            • Instructions: Promotion Phases used to filter
            • Clear the Filter from Agent Action and Show in conversation checkboxes.
            • Output Rendering: Text
            PromotionTemplateIds
            • Instructions: Promotion Templates used to filter
            • Clear the Filter from Agent Action and Show in conversation checkboxes.
            • Output Rendering: Text
            PromotionTimeframe
            • Instructions: Timeframe used to filter
            • Clear the Filter from Agent Action and Show in conversation checkboxes.
            • Output Rendering: Text
            ResultMeasures
            • Instructions: Retrieved measures for the filters. 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 Product for which the measures are for, next level is the measure name, and the third level is the promotion record having the measure value
            • Clear the Filter from Agent Action checkbox.
            • Select the Show in conversation checkbox.
            • Output Rendering: Rich Text
          9. Click Finish.
           
          Loading
          Salesforce Help | Article