Understanding the Limitations of Agentforce
With Agentforce, instructions can be added at the topic level, but this can lead to inconsistencies and duplication of effort. For example, if you want to instruct your agents to treat “client” or “consignor” as referring to the contact object, you would need to add this instruction to each relevant topic.
The root cause of this issue is the lack of a global instructions file in Agentforce, which leads to inconsistencies and duplication of effort.
Creating Consistent Instructions
To create consistent instructions, you can add a prompt to the topic where this instruction is required. For example, you can say “always treat client as Contact”. This will help to ensure that your agents understand the instruction and apply it consistently.
However, as one community member found, this approach may not always work 100% of the time. The agent may not always interpret the instruction correctly, leading to inconsistent results.
Using Custom Actions to Improve Consistency
To improve consistency, you can use custom actions in Flow or Apex to pull the required information. For example, you can create a custom “Find Consignors” action that guarantees you only search for Contact records, taking away one possible failure point.
Example Apex Code
public class FindConsignors {
public List<Contact> findConsignors(String searchTerm) {
// Custom logic to find consignors
return consignors;
}
}
This approach also makes it easier to formulate synonyms, as you can simply say “when the user searches for x, y, or z use the Find Consignors action”.
Best Practices for Creating Consistent Instructions
Heads up: when creating custom actions, make sure to test them thoroughly to ensure they work as expected.
Checklist for Creating Consistent Instructions
- Add instructions at the topic level or use Agent Script (beta) for agent system level instructions
- Use custom actions in Flow or Apex to pull the required information
- Test custom actions thoroughly to ensure they work as expected
- Use synonyms to formulate alternative search terms
- Document instructions clearly and consistently
- Review and update instructions regularly to ensure they remain relevant
Frequently Asked Questions
What is the best way to create consistent instructions for Agentforce employees?
The best way to create consistent instructions is to add instructions at the topic level or use Agent Script (beta) for agent system level instructions.
How can I improve the consistency of my Agentforce agents?
You can improve the consistency of your Agentforce agents by using custom actions in Flow or Apex to pull the required information.
What are the benefits of using custom actions in Agentforce?
The benefits of using custom actions in Agentforce include improved consistency, reduced errors, and increased efficiency.
How can I formulate synonyms for my Agentforce agents?
You can formulate synonyms by using custom actions in Flow or Apex to pull the required information, and then using synonyms to formulate alternative search terms.
What is the importance of documenting instructions clearly and consistently?
Documenting instructions clearly and consistently is important to ensure that your Agentforce agents understand the instructions and apply them correctly.
Need help shipping this in production?
Genetrix builds and untangles Salesforce Marketing Cloud and Agentforce setups for teams that want it done right the first time. If anything in this post sounds familiar, talk to us before it ships.