目次
- 1 What is a topic? What is an action?
- 2 Agentforce’s inference engine selects the appropriate topic and action from the input text.
- 3 Basic Steps in Topic Creation
- 4 Creating the “Action to search for the e-mail address of the person in charge of the client” flow
- 5 Basic Steps for Action Creation
- 5.1 1. Click on the topic you created (Identity Verification).
- 5.2 2. [Click the Action sub-tab for this topic.
- 5.3 3. [Click New and choose Add Action.
- 5.4 4. [Under Reference Action Type, select Flow and click Next.
- 5.5 5. [Under Browse Actions, select “Confirm mail address of the person responsible for the transaction” created above and click “Next”.
- 5.6 6. Enter a description in [Agent Action Procedure], [Input Procedure], and [Output Procedure]. (This description will be read by the inference engine, so you need to consider it carefully and enter it. I entered the following, but I am not sure if this is correct yet, just for reference!)
- 5.7 7. [Check the “Require input” and “Show in conversation” checkboxes.
- 5.8 8. Click “Done.”
- 6 Test by actually entering your email address in Agentforce
I would like to explain how to create a topic action in Agentforce.
What is a topic? What is an action?
First of all, you need to understand topics and actions in Agentforce before setting them up.
An action is a specific function that “this is what I want you to do”. For example:
- Find if the email address entered is in the email field for the person responsible for the transaction.
and so on. This action function is basically built using Salesforce flow and Apex, and if you are a Salesforce user, you will be able to imagine it immediately.
A topic, on the other hand, should be understood as a kind of category that lumps together the multiple actions mentioned above. For example, the topic of an action to find an e-mail address from the person responsible for the transaction can be categorized under the topic “Identification”. Perhaps the topic “Identity Verification” could have another action “Find if the entered phone number exists in the phone number field of the account manager”.
In other words, the topic “Identity Verification” could have multiple actions that look for email addresses and phone numbers in the contact person’s phone number field.
Agentforce’s inference engine selects the appropriate topic and action from the input text.
The above-mentioned topics and actions are prepared, and Agentforce’s inference engine decides which topic and action to execute from the input text, and the system returns a reply in a conversational style based on the result executed by the action.
For example, in the case of Agentforce, which checks whether an e-mail address exists for the responsible person of a business partner, when an e-mail address is entered, the action “Find e-mail address of responsible person of business partner” in the “Identification” topic is executed, and if the e-mail address exists, a reply such as “Registration exists” is returned. If the email address does not exist, it returns a response such as “There is no registration”.
Therefore, it is necessary to understand that Agentforce is created for a specific purpose and is not like ChatGPT, where you can ask any question! (By the way, please understand that Agentforce is not a topic or an action. (By the way, if you enter an input that has nothing to do with a topic or action, it will prompt you for the relevant input.)
When building Agentforce, I think it is quite difficult in that it is necessary to consider a wide range of inputs by what kind of people and for what kind of purpose, and to prepare multiple topics and actions in advance to respond appropriately to each of them.
Basic Steps in Topic Creation
First, let’s go through the steps for creating a topic! Please refer to the following Trailhead for agent activation, etc!
1. In the Agent Builder, click New and select New Topic.

On the modal screen, enter a description in the following fields
- Topic Display Label
- Classification Description
- Scope
- Description
Input to this item is very important. Consider carefully when entering this field!
This is because Agentforce’s inference engine determines which topic/action is appropriate based on these topic names, classification descriptions, and descriptions. If the description here is inappropriate, the inference engine will not be able to select the appropriate topic, resulting in a strange reply.
In this case, I entered the following, but I do not yet know how to best enter the information. I think this is an area that requires trial and error.

2. Leave the other settings as they are and click “Next.
3. [Click ” Finish.
Creating the “Action to search for the e-mail address of the person in charge of the client” flow
Before actually setting up the action, we need to create in advance the flow that the action will execute. In this case, we will create a flow that checks whether the email address entered exists in the contact person’s account and stores true if it exists or false if it does not exist in the Boolean variable. (As we will see later, the Boolean variable should be described in the action description so that the inference engine can properly understand it by replying “there is a registration” if it is true and “there is no registration” if it is false.)
The following flow has been created.

The flow to be used in the action is created in the “Automatic Activation Flow”. Store the entered email address in a text variable and retrieve the business partner responsible that matches the entered email address in the Get Record element.
The text variable that stores the input email address is created with the “Available for input” checked. This way, the inference engine will extract the email address and store it in this variable!

The retrieval element of the record is set as follows

The decision element is set as follows.

The assignment elements for “with mail address” and “without mail address” are set as follows respectively.


OutputEmail” is a Boolean variable. Set as follows.
Check the “Available in Output” checkbox. If it is not checked, it cannot be used in a conversation.

Now “Enable” it. If you do not enable it, you will not be able to select this flow in an action.
. Trailhead’s Agentforce environment seems to target only the person responsible for the business partner. For example, you can create an element to retrieve a case in the above flow, but Agentforce does not seem to be able to read the case flow and an error will occur. So, if you want to try this in the Trailhead environment, please create a flow that operates on the trading partner responsible person and validate it.
Basic Steps for Action Creation
Let’s take a look at the actual action creation steps.
1. Click on the topic you created (Identity Verification).
2. [Click the Action sub-tab for this topic.

3. [Click New and choose Add Action.

4. [Under Reference Action Type, select Flow and click Next.

5. [Under Browse Actions, select “Confirm mail address of the person responsible for the transaction” created above and click “Next”.

6. Enter a description in [Agent Action Procedure], [Input Procedure], and [Output Procedure]. (This description will be read by the inference engine, so you need to consider it carefully and enter it. I entered the following, but I am not sure if this is correct yet, just for reference!)

7. [Check the “Require input” and “Show in conversation” checkboxes.
8. Click “Done.”
Test by actually entering your email address in Agentforce
Now let’s actually test it! Copy the email address that exists for the business partner manager.
Enter the email address that exists in the text box in the lower right corner of the screen. It should return “Registration exists.

Yes. Looks good.
Now let’s try entering an email address that does not exist for the business partner manager.

Yes. It looks fine.
Note that in the red box on the left side of the above image, you can see what the input and output were. In this case, you can see that “test@salesforce.com” was input. And the value of “true” in the output shows that the email address exists. The inference engine understands what true and false mean in the description of this action and topic, so it is able to reply with “There is a registration.
This is how to create a topic action in Agentforce. I’m still in the process of trial and error, so I’m not sure if this is really the best way to go (especially since I think the explanation could be more plush). I don’t know, but I hope you get the big picture!