AI Agent Management
Salesforce Actions: create cases and hand off to live agents
Open Salesforce cases and connect customers to live agents in Salesforce when your AI agent needs to escalate
Salesforce Actions let your QwryAI agent pass on what it can't resolve to a team that works in Salesforce, in two ways: open a case for follow-up (Create ticket), or hand the customer to a live Salesforce agent in the chat (Salesforce live chat). Pick the one that fits how urgent the issue is, or use both.
Available Salesforce Actions
| Action | What it does |
|---|---|
| Create ticket | Opens a case in Salesforce for an issue your team can follow up later |
| Salesforce live chat | Connects the customer to a human agent in Salesforce in real time |
How to create a Salesforce Action
Both Actions start the same way. The Action sections below cover only what differs.
- Open Create Action
Open your agent, go to Build › Actions and select the Create Action tab. Type
Salesforcein Search to find the card.Search Create Action for Salesforce. - Pick the Action
For a case, select Escalations. For live chat, select Salesforce live chat. If Salesforce isn't connected yet, the Salesforce live chat dialog offers Connect Salesforce, which sends you to Salesforce to authorize access.
Create Action › Salesforce live chat.
- Configure General
Give the Action an Action name and a When to use that says when the agent should use it. Each Action's section below suggests what to write.
To run the Action only from a Procedure step, turn on Only use in Procedures. When to use is then hidden.
- Add the Action's own settings
Create ticket needs Ticket Platform set to Salesforce. Salesforce live chat needs your Salesforce org set up and three values from it.
- Choose channels
Turn the Action on or off for each configured channel. Create ticket works on most channels, including messaging, email and Phone. Salesforce live chat works only on the Chat bubble and the Help page. See Channels.
- Enable and test
Select Enable, then test with the check listed in the Action's section.
Actions
1. Create ticket
Open a case in Salesforce when the agent can't solve the customer's problem and it doesn't need a person right away. The customer gets a follow-up from your team without waiting in the chat.
Best for: non-urgent issues your team can handle asynchronously, and making sure every request is logged in Salesforce.
Common use cases:
- "The agent couldn't answer my billing question"
- "I want to report a bug"
- "Can someone follow up with me about this?"
Settings
Action: Escalations.
Ticket Platform: Salesforce. The dropdown lists QwryAI and every helpdesk you've connected, so Salesforce appears once it's connected.
When to use: when the agent should open a case. For example:
- Use this action when you cannot answer the user's question or solve their problem
- Use this action when the user explicitly asks for a ticket or case
- Use this action for non-urgent issues that don't need immediate human help
- Do not use this action if the user needs help right now or says it's urgentWhat the case contains
The case fields are fixed:
| Case field | Value |
|---|---|
| Subject | Written by the agent from the customer's issue |
| Description | A first-person summary of the conversation |
| Case Origin | Web |
| Web Email | The customer's email. The agent asks for it if it doesn't know it. |
| Web Name | The customer's name. The agent asks for it if it doesn't know it. |
QwryAI also adds a private case comment linking to the conversation in QwryAI.
2. Salesforce live chat
Connect the customer to a human agent in Salesforce when the agent can't solve the problem and it needs a person now.
Best for: urgent issues, problems that need real-time troubleshooting, and frustrated customers who want a person straight away.
Common use cases:
- "I need to speak to a human right now"
- "This is urgent"
- "The bot isn't helping, connect me to support"
Configure your Salesforce org
Set up your org for Enhanced Chat before you create the Action. Do these in order, in Salesforce Setup.
- Turn on Messaging
In Quick Find, search for Messaging Settings and turn messaging on.
- Set up Omni-Channel
Search for Omni-Channel and follow the setup to configure:
- Service Presence: your agents' statuses, such as Available and Busy
- Routing Configurations: how chats are routed to agents
- Service Channels: the channel Omni-Channel routes chats through
- Agent Workload: how many chats each agent takes at once
- Add a JSON Web Keyset for user verification
QwryAI signs each customer in to Salesforce with a short-lived token, and Salesforce checks it against your agent's public keys.
- Search for Enhanced Chat User Verification and open JSON Web Keysets.
- Select New and choose Endpoint as the type.
- Paste the JSON Web Keyset URL from your Salesforce live chat Action (copy it with Copy in the editor) as the Endpoint URL, and enter the same URL as the JSON Web Key Issuer.
- Save.
- Create a messaging channel
- Back in Messaging Settings, select New Channel, choose Enhanced Chat, then Mobile as the deployment type.
- Set routing from your Omni-Channel setup and save.
- Select Add User Verification and save again.
- Open the new channel, find User Verification Configuration, select New, pick the keyset from step 3, name it, keep Active on and save.
- Create an Embedded Service Deployment
- Search for Embedded Service Deployments and select New Deployment.
- Choose Enhanced Chat, then Custom Client.
- Name it, for example
QwryAI, and pick the messaging channel from step 4. Save. - Select Publish and check the deployment is Active.
- Select Install Code Snippet and note the OrganizationId, DeveloperName and Url values. You need them for the Action.
Settings
Action: Salesforce live chat. The Action name starts as
Salesforce_Live_Chat.When to use: when the agent should bring in a live agent. For example:
- Use this action when you cannot solve the user's problem and they need help right now - Use this action when the user explicitly asks to speak with a person - Use this action for urgent, time-sensitive issues or when the user is frustrated - Do not use this action for non-urgent issues that a support ticket can handleSalesforce Live Chat API URL: the Url value from Install Code Snippet, for example
https://yourcompany.my.salesforce-scrt.com. QwryAI shows Invalid URL if it isn't a valid web address.Developer Name: the DeveloperName value.
Org ID: the OrganizationId value.
JSON Web Keyset URL: read-only. Copy it into the keyset from step 3.
What the customer sees
- When the agent starts the handoff, the Salesforce agent receives a summary of the customer's request as the first message.
- The customer sees Waiting for support agent to join with a spinner above the message box, until a Salesforce agent replies.
- The customer and the Salesforce agent chat in real time in the widget.
- When the Salesforce agent ends the session, the chat notes Salesforce live chat ended. and your QwryAI agent answers the customer's next message again.
QwryAI sets no waiting timeout. What happens when nobody is available depends on your Omni-Channel routing. If Salesforce refuses the handoff, for example because a value is wrong or the keyset isn't registered, no live chat starts and the agent keeps the conversation.
Best practices
Clear escalation criteria
Use When to use to separate the two paths: a case for issues that can wait, live chat for issues that can't.
Complete case information
Let the agent collect the customer's name and email before it opens a case, so your team can reply.
Test both paths
Try urgent and non-urgent requests before going live, and check each lands where you expect.
Match Actions to channels
Turn live chat off on channels or at times when nobody covers Salesforce, so the agent doesn't offer what it can't deliver.
Limitations
- Case fields are fixed. Create ticket always fills the same five fields plus a private comment.
- No waiting timeout in QwryAI. Live chat waits until a Salesforce agent joins; routing is up to Salesforce.
- Live chat is browser-only. It runs on the Chat bubble and the Help page, not on messaging or email channels.
Frequently asked questions
Should I use Create ticket or Salesforce live chat?
Use Create ticket for issues your team can follow up later. Use Salesforce live chat when the customer needs a person now and you have agents available. You can enable both and describe the difference in each When to use.
Which fields does the Salesforce case get?
Subject, Description (a summary of the conversation), Case Origin set to Web, Web Email and Web Name, plus a private comment linking to the conversation.
What does the customer see while waiting?
Waiting for support agent to join with a spinner, until the Salesforce agent's first message arrives.
Does the agent take over after the Salesforce agent ends the chat?
Yes. The chat shows Salesforce live chat ended. and the agent answers the customer's next message.
Which Salesforce values does live chat need?
Salesforce Live Chat API URL, Developer Name and Org ID, from Install Code Snippet on your Embedded Service Deployment. Salesforce in turn needs the JSON Web Keyset URL shown in the Action.