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
          Configure Agent Context Variables, Filters, and Mappings

          Configure Agent Context Variables, Filters, and Mappings

          To ensure the agent acts consistently, set up its context variables, filters, and map them to the appropriate actions within each topic.

          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 configure agent context and filters View Setup and Configuration

          In the Agentforce Builder interface, begin by selecting the agent you created.

          1. From Setup, in the Quick Find box, enter Agentforce Agents, and then select Agentforce Agents.
          2. Select TPM KAM Agent.
          3. Click Open in Builder.
          4. Create the Agent Context Variables.
            1. In the Agentforce Builder, on the left sidebar, click Context.
            2. For each variable in the following table, click New Variable, fill in the properties, and click Save. For all variables, select Allow value to be set by API and Allow LLM to use value.
              Name / API Name Data Type Description
              TPMContextAccountId Text Account Id to use on TPM Context
              TPMContextAccountReadAccess Boolean If true, user has read access to the current context account
              TPMContextAccountReadWriteAccess Boolean If true, user has read and write access to the current context account
              TPMSalesOrg Text Sales Organization value of the current user
          5. Create the Agent Filters.
            1. Navigate to the Filters tab.
            2. For each filter, click New, fill in the properties, and click Save.
              Filter Name / API Name Conditions
              TPMAccountHasReadAccess TPMContextAccountId Is Not Empty AND TPMContextAccountReadAccess Equals true
              TPMSalesOrgLoaded TPMSalesOrg Is Not Empty
          6. Configure filters and mappings for the TPM Measures Account topic.
            1. Click the topic name, then click the This Topic’s Actions tab.
            2. For the Validate TPM Account action, map the outputs:
              • Map the Output AccountId variable to TPMContextAccountId.
              • Map the Output HasReadAccess variable to TPMContextAccountReadAccess.
              • Map the Output HasReadWriteAccess variable to TPMContextAccountReadWriteAccess.
            3. For the Retrieve Account Measures action, apply a filter and map the input:
              • Click the Filter icon and add the TPMAccountHasReadAccess filter.
              • Map the Input AccountId variable to TPMContextAccountId.
          7. Configure filters and mappings for the TPM Measures Promotion topic.
            1. Click the topic name, then click the This Topic’s Actions tab.
            2. For the Read User Sales Organization action, map the output:
              • Map the Output SalesOrg variable to TPMSalesOrg.
            3. For the QueryRecords action, apply a filter:
              • Click the Filter icon and add the TPMSalesOrgLoaded filter.
          8. Configure filters and mappings for the TPM Measures Promotions topic.
            1. Click the topic name, then click the This Topic’s Actions tab.
            2. For the Validate TPM Account action, map the outputs:
              • Map the Output AccountId variable to TPMContextAccountId.
              • Map the Output HasReadAccess variable to TPMContextAccountReadAccess.
              • Map the Output HasReadWriteAccess variable to TPMContextAccountReadWriteAccess.
            3. For the Read User Sales Organization action, map the output:
              • Map the Output SalesOrg variable to TPMSalesOrg.
            4. For the Retrieve Promotions Measures action, apply a filter and map the input:
              • Click the Filter icon and add the TPMAccountHasReadAccess filter.
              • Map the Input AccountId variable to TPMContextAccountId.
            5. For the QueryRecords action, apply the TPMSalesOrgLoaded filter.
          9. Configure filters for the TPM BOAPI Promotion topic.
            1. Click the topic name, then click the This Topic’s Actions tab.
            2. For the Read User Sales Organization action, map the SalesOrg output to TPMSalesOrg.
            3. For the QueryRecords action, apply the TPMSalesOrgLoaded filter.
           
          Loading
          Salesforce Help | Article