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 Get Business Year Timeframe Action

          Create the Get Business Year Timeframe Action

          Create a custom action that returns the start and end dates for a business year. This action helps the agent filter data within the right timeframe.

          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 Get Business Year Timeframe.
          7. Enter Get Business Year Timeframe for the Agent Action Label field and Get_Business_Year_Timeframe 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 Returns the timeframe for a given Business Year.
            • In the Loading Text field, enter Reading Business Year.
          10. Under Input, for businessYear:
            • In the Instructions field, enter Business Year.
            • Select the Require Input and Collect data from user checkboxes.
          11. Under Output, configure the following:
            • For dateFrom:
              • In the Instructions field, enter Start Date of the business year.
              • Clear the Filter from Agent Action and Show in conversation checkboxes.
              • From the Output Rendering dropdown, select Date.
            • For dateThru:
              • In the Instructions field, enter End Date of the business year.
              • Clear the Filter from Agent Action and Show in conversation checkboxes.
              • From the Output Rendering dropdown, select Date.
          12. Click Finish.
           
          Loading
          Salesforce Help | Article