I am currently evaluating the performance of our Salesforce Data Actions for a new Agent Assist deployment. We are seeing significant latency (over two seconds) when the bot flow tries to pull customer account details from Salesforce during peak hours. I suspect we are hitting the Salesforce ‘Concurrent Request Limit’. Is there a way to optimize the Data Action configuration to reduce the overhead on the Salesforce side, or should we be looking at a middleware solution like MuleSoft?
Hello Ter46. I am an admin for a German company and we have a similar high-volume Salesforce integration. You should definitely check your ‘SOQL’ query efficiency. If your Data Action is performing a full object search instead of a targeted lookup by Id or a indexed field, it will take much longer. Also, try to limit the number of fields you are returning in your ‘Output Contract’. Returning the entire Contact object when you only need the first name is a waste of resources and adds unnecessary latency to the API call.
I manage our managed package integration. Ter46, you should also ensure that you are using the ‘Bulk’ version of the Salesforce API if your bot is doing many lookups in a short window. However, for a single interaction, the standard REST API is usually fine. Another thing to check is your ‘OAuth Token’ caching. If your Data Action is requesting a new Salesforce token for every single lookup, it will double your latency!
Greetings! I am an API power user and I want to add that you should also implement a ‘Caching’ layer within your bot flow. If the same customer is interacting with the bot multiple times, you should store their account details in a flow variable instead of hitting Salesforce every time. This reduces the total number of API calls and provides a much faster experience for the customer. We use this strategy for our VIP routing and it works like a charm!