Salesforce actions
Let the agent look up contacts, create leads and open cases in Salesforce after you connect your org, and control which actions are allowed.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
Salesforce actions let the agent read and write records in your Salesforce org during a conversation. Use them to log a new lead, find the customer's record or open a case when something needs follow-up.
Before you start
- A Salesforce admin account that can approve a connection.
- The Salesforce integration connected in Workspace Settings > Integrations. See Salesforce.
- An agent that handles sales or support conversations.
Available actions
| Action | What the agent does |
|---|---|
| Look up contact | Finds a contact by email and uses the result in its reply. |
| Create lead | Adds a lead with the details collected in the chat. |
| Create case | Opens a case with a subject, description and the customer's email. |
| Update record | Changes a field on a record you allow. |
Each one is switched on separately, so you can start with read-only lookups.
Turn actions on
- Open the agent and select Actions.
- Select Add action and choose Salesforce.
- Choose the actions to allow, for example Look up contact and Create lead.
- For each one, write a description that says when it applies: "Use this when a visitor shares their email and asks for a quote."
- Map the fields. For example, map Email to the lead's email and Message summary to the description.
- Turn the actions on and select Save.
You should see each enabled action listed under the Salesforce group.
Collect first, then create
Records need clean data. Pair Create lead with Collect leads so the agent has a name and a valid email before it writes anything. For cases, ask for the details your team needs with Collect data.
Test it
- Open Test > Playground and ask for a quote using a test email.
- Check the trace for the Salesforce action and the values it sent.
- In Salesforce, find the test record and delete it.
Warning: Actions that write to Salesforce create real records, including from the Playground. Use a sandbox org or a test email while you set up.
Troubleshooting
- The action fails with an error. Disconnect and reconnect Salesforce, then check that the connected user can create that record type.
- Fields are empty. Check the field mapping and that the agent collects the value first.
- Duplicates appear. Add a procedure step: "Look up the contact first. Create a lead only if none exists."