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 Account Measures Action

          Create the Retrieve Account Measures Action

          Create a custom action that and gets account measures. The agent can then answer questions about account performance. It can filter data based on business year and products.

          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 Flow.
          5. From the Reference Action dropdown, select CGCloud: Get Account Measures.
          6. Enter Retrieve Account Measures for the Agent Action Label field and Retrieve_Account_Measures for the Agent Action API Name field.
          7. Click Next.
          8. Configure the action's instructions and variables:
            • In the Agent Action Instructions field, enter Finds and retrieves the request Account related measures for the given filters and products or product levels.
            • In the Loading Text field, enter Retrieving measures.
          9. Under Input, configure the following:
            • For AccountId:
              • In the Instructions field, enter 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.
            • For BusinessYear:
              • In the Instructions field, enter The business year for which the measure details for accounts and products are requested.
              • Select the Require Input checkbox.
              • Clear the Collect data from user checkbox.
            • For IncludeMonthlyValues:
              • In the Instructions field, enter When true, monthly data is returned as part of the response.
              • Clear the Require Input and Collect data from user checkboxes.
            • For MeasureNames:
              • In the Instructions field, enter 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.
            • For ProductIds:
              • In the Instructions field, enter 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.
          10. Under Output, configure the following:
            • For AccountId:
              • In the Instructions field, enter Id of the account the measures have been retrieved.
              • Clear the Filter from Agent Action and Show in conversation checkboxes.
              • From the Output Rendering dropdown, select Text.
            • For BusinessYear:
              • In the Instructions field, enter Business year the measures are for.
              • Clear the Filter from Agent Action and Show in conversation checkboxes.
              • From the Output Rendering dropdown, select Decimal.
            • For IncludeMonthlyValues:
              • In the Instructions field, enter If monthly values were requested.
              • Clear the Filter from Agent Action and Show in conversation checkboxes.
              • From the Output Rendering dropdown, select Boolean.
            • For MeasureNames:
              • In the Instructions field, enter Measures requested.
              • Clear the Filter from Agent Action and Show in conversation checkboxes.
              • From the Output Rendering dropdown, select Text.
            • For ProductIds:
              • In the Instructions field, enter Products requested.
              • 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 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 time period for the measure value (total, month or year).
              • Clear the Filter from Agent Action checkbox.
              • Select the Show in conversation checkbox.
              • From the Output Rendering dropdown, select Rich Text.
          11. Click Finish.
           
          Loading
          Salesforce Help | Article