Appearance
Salesforce CRM Integration β
Let your MyChatBot agent create and manage leads, deals, and contacts directly in Salesforce β no human in the loop. This connects your AI assistant to Salesforce CRM so it can run sales operations automatically as it chats with customers.
At a glance β
| You need | Where | Result |
|---|---|---|
| A Connected App (Consumer Key + Secret) | Salesforce β Setup β App Manager | OAuth credentials for MyChatBot |
| Callback URLs + OAuth scopes set | Connected App β OAuth Settings | App can request api + refresh_token access |
| Token Exchange Flow + IP relaxation enabled | Connected App β Settings | Connection succeeds |
| Domain + Client ID + Client Secret | MyChatBot β Integrations β Salesforce | Integration connected to your agent |
| Entities & fields toggled | Entities & Data Fields Configuration | Agent can create/update leads, create deals, and add contacts |
Connect in 3 steps: create a Salesforce Connected App β paste Domain / Client ID / Client Secret into MyChatBot β configure entities & fields.
1. Create a Connected App in Salesforce β
- Log in to Salesforce as an administrator.
- Navigate to Setup β App Manager.

- Click New Connected App.
- Fill in the required information:
- Connected App Name: MyChatBot Integration
- API Name: MyChatBot_Integration_API
- Contact Email: Your email address
- Enable OAuth Settings: Check this box
- Callback URL:
https://app.mychatbot.appandhttps://app.mychatbot.app/integration
- Selected OAuth Scopes:
- Access and manage your data (
api) - Perform requests at any time (
refresh_token,offline_access)
- Access and manage your data (
- Click Save and wait for the app to be created.
- After creation, click Manage Consumer Details.

- Note your Consumer Key (Client ID) and Consumer Secret (Client Secret).

- For security, set IP relaxation to Relax IP restrictions and check Enable Token Exchange Flow.

WARNING
The connection will not complete unless Enable Token Exchange Flow is checked and IP relaxation is set to Relax IP restrictions on the Connected App. Set both before submitting credentials on MyChatBot.
2. Create the integration on MyChatBot β
In the app
Go to Integrations and open the Salesforce card: https://app.mychatbot.app/integration?integration=Salesforce. Pick the agent you want to connect, then click Connect and paste in your credentials.
- Open the Integrations tab in your MyChatBot dashboard.
- Select the agent you want to connect to Salesforce.

- Scroll down to find Salesforce CRM in the integrations list.
- Click Connect.
- Provide the following credentials:
- Domain: Your Salesforce domain (e.g.,
your-company.my.salesforce.com) - Client ID: The Consumer Key from your Salesforce Connected App
- Client Secret: The Consumer Secret from your Salesforce Connected App


- Domain: Your Salesforce domain (e.g.,
- Click Submit to save your integration.
3. Configure entities & data fields β
Once Salesforce is connected, the Entities & Data Fields Configuration section appears β "Select the entities and their fields you want the assistant to fill." This is where you choose exactly what your agent is allowed to read and write.

- In the Entities & Data Fields Configuration section you can:
- Toggle Use Leads to enable lead management.
- Toggle Use Deals to enable deal management.
- For each enabled entity, pick which fields the agent may fill:
- Standard fields for Leads / Deals β the default Salesforce fields.
- Most used custom fields and Other custom fields β the custom fields that exist in your CRM.
- Select Pipeline β where relevant, choose the pipeline the entity should land in.
- Under Phone Lead/Deal/Entity Settings you can mark phone as required per entity (Lead Phone Required, Deal Phone Required, Entity Phone Required).
- Click Apply fields to save your configuration.
Only the fields you enable here are ever offered to the agent, so this section doubles as a guardrail on what it can touch.
Entity types β
The Salesforce integration works with four entity types:
- Leads: Potential sales opportunities.
- Deals: Sales transactions (called Orders in Salesforce).
- Contacts: Individual client information.
- Accounts: Organizations that contacts belong to.
Field types β
Each entity has two kinds of fields:
- Standard Fields: Default fields provided by Salesforce.
- Custom Fields: Fields specific to your own CRM setup.
Special fields β
A few fields need extra attention:
- Status
- For leads: the current stage in the lead pipeline.
- Common values include "New", "Working", "Qualified", "Converted".
- Must match exactly the statuses defined in your Salesforce account.
- LeadSource
- Identifies where the lead originated.
- Automatically set to
AI-+ the name of your assistant, so you can tell at a glance which leads came from your AI assistant.
- Order Start Date
- Required when creating a deal (order).
- Specifies when the order begins.
- Products
- Used in deal creation to specify products to add to the order.
- Each product needs a name, a quantity, and optionally a price.
WARNING
Status values must match the statuses defined in your Salesforce account exactly, and any product referenced in a deal must already exist in your Salesforce Pricebook β otherwise the order will not be created.
Working with products β
Deals in Salesforce can include products as order items. When your agent creates a deal, each product it adds should include:
- name: Product name (required).
- quantity: Number of items (required).
- price: Unit price (optional; the standard Pricebook price is used if you don't specify one).
Products must already exist in your Salesforce Pricebook for the order to be created successfully.
What your agent can do in Salesforce β
Once connected, your agent can act in Salesforce on its own as it talks to customers. It can use whatever fields you enabled under Entities & Data Fields Configuration.
| Capability | What the agent does | Typical trigger |
|---|---|---|
| Create a lead | Adds a new lead, plus the contact and account behind it | A customer shows interest |
| Update a lead | Changes an existing lead's status, name, phone, or other fields | A lead progresses (e.g. requests a call back, confirms interest) |
| Create a deal | Creates an order, links it to the contact/account, and adds products | A customer confirms they want to buy |
| Add a contact | Creates or updates a client contact record | You want a new customer on file |
Create a lead β
Captures a new lead using the name, phone, status, and any custom fields you enabled. When a lead is created:
- A contact and account are automatically created or matched from the full name and phone number.
- The lead is linked to that contact.
- The source is stamped to identify your AI assistant.
Update a lead β
Updates an existing lead β its status/stage, the contact's name or phone, or any other enabled field.
Create a deal β
Creates a new deal (order). It needs the customer's full name, phone, and an Order Start Date; Status defaults to "Draft" if you don't set one, and you can pass a list of products. When a deal is created:
- A contact and account are automatically created or matched from the full name and phone number.
- The order is linked to that contact and account.
- Products are added to the order (when specified and found in the Pricebook).
- MyChatBot also records the order against the client's chat record so you can see it in your dashboard.
Add a contact β
Creates or updates a contact from a full name and phone number. When a contact is added:
- If a lead already exists for that client, it's updated with this contact information.
- A new contact record is created in Salesforce.
- The client's details in MyChatBot are updated to match, so the two stay in sync.
Guiding the agent with instructions β
Your agent decides when to act based on its instructions. Add plain-language rules like the ones below to your agent's instructions so it knows when to create or update records β no function names needed, just describe the business action.
Creating leads or deals β
When a customer expresses interest in our services, create a new lead in Salesforce:
- Use their name as the full name
- Include their phone number
- Set Status to "New"
- Fill in any other relevant fieldsFor deals:
When a customer confirms they want to buy, create a deal (order) in Salesforce:
- Use their full name and phone number
- Set the Order Start Date to today's date in YYYY-MM-DD format
- Add the products they're interested in (name, quantity, and price if it differs
from the standard price)
- Set Status to "Draft"Updating lead status β
When a customer requests a call back, update their lead's Status to "Working"
and note any important details in the relevant fields.
When a customer confirms interest, update their lead's Status to "Qualified"
and refresh their contact information if needed.Adding contacts β
When you start talking with a new customer, add them as a contact in Salesforce
with their full name and phone number, let them know they've been registered,
and continue the conversation.