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 |
- From Setup, in the Quick Find box, enter Agentforce Assets, and then select Agentforce Assets.
- Click Actions.
- Click New Agent Action.
- From the Reference Action Type dropdown, select Apex.
- From the Reference Action Category dropdown, select Invocable Method.
- From the Reference Action dropdown, select Get Business Year Timeframe.
-
Enter
Get Business Year Timeframefor the Agent Action Label field andGet_Business_Year_Timeframefor the Agent Action API Name field. - Click Next.
-
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.
-
Under Input, for businessYear:
- In the Instructions field, enter Business Year.
- Select the Require Input and Collect data from user checkboxes.
-
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.
- For dateFrom:
- Click Finish.
Did this article solve your issue?
Let us know so we can improve!

