Skip to main content
Back to Actions Integrations Use prebuilt Salesforce CRM action templates to auto-create dialog tasks for managing leads and opportunities. To access templates:
  1. Go to Automation AI > Use Cases > Dialogs and click Create a Dialog Task.
  2. Under Integration, select Salesforce. Integration - Salesforce
  3. If no integration is configured, click Explore Integrations to set one up. See Actions Overview.

Supported Actions

TaskDescriptionMethod
Create a LeadCreates a new marketing lead in the CRM.POST
Create an OpportunityCreates a new opportunity in the CRM.POST
Update a LeadUpdates the lead with changes.PATCH
View a Lead By IDRetrieves the lead details.GET
List All LeadsRetrieves all leads from the CRM.GET
Search LeadsSearches all leads that match a keyword.GET
Delete a LeadDeletes a lead.DELETE

Create a Lead

  1. Install the template from Salesforce Action Templates.
  2. The Create a Lead dialog task is added with the following components: createLeadService bot action component properties
    • Createlead – User intent to create a lead.
    • firstName, lastName, companyName – Entity nodes for lead details.
    • CreateLeadService – Bot action service to create a lead. Click Edit Request: Edit request Sample Request:
      {
        "attributes": {"type": "Lead"},
        "LastName": "Doe",
        "FirstName": "John",
        "Company": "ABC",
        "MobilePhone": "93445667xx",
        "Status": "Open - Not Contacted",
        "OwnerId": "0055g00000ECRvPAAX",
        "IsConverted": false
      }
      
      Click +Add Response: Add response Sample Response:
      {
        "id": "00Q5g00000DZ0d4EAD",
        "success": true,
        "errors": []
      }
      
    • subDomainService – Bot action service to fetch subdomain. subDomainService bot action component properties
    • createLeadMessage – Message node to display responses.
  3. Click Train, then Talk to Bot to test: VA prompts to create a lead
  4. Enter lead details when prompted: Enter lead details
  5. The new lead is created in Salesforce CRM: New lead created
  6. Click View Lead to see lead details: View lead details

Update a Lead

  1. Install the template from Salesforce Action Templates.
  2. The Update a Lead dialog task is added with the following components: Update a Lead dialog task is added
    • Update lead – User intent to update a lead.
    • Id, AskOptions, LeadStatus, Title, MobilePhone – Entity nodes for update details.
    • updateLeadScript – Bot action script to update a lead. updateLeadScript bot action component properties
    • updateLeadService – Bot action service to update a lead.
    • subDomainService – Bot action service to fetch subdomain.
    • updateLeadMessage – Message node to display responses.
  3. Click Train, then Talk to Bot to test. After entering lead details, the lead is updated in Salesforce CRM. Click View Lead to see updated details: View lead details

Delete a Lead

  1. Install the template from Salesforce Action Templates.
  2. The Delete Lead dialog task is added with the following components: Delete Lead dialog task is added
    • Delete Lead – User intent to delete a lead.
    • ID – Entity node for the lead ID.
    • deleteLeadService – Bot action service to delete a lead. deleteLeadService bot action component properties
    • deleteLeadMessage – Message node to display responses.
  3. Click Train, then Talk to Bot to test: VA prompt to delete a lead

List All Leads

  1. Install the template from Salesforce Action Templates.
  2. The List All Leads dialog task is added with the following components: List All Leads dialog task is added
    • List All Lead – User intent to list all leads.
    • listAllLeadsService – Bot action service to fetch all leads. Click +Add Response: listAllLeadsService bot action component properties
    • subDomainService – Bot action service to fetch subdomain.
    • listAllLeadsMessage – Message node to display responses.
  3. Click Train, then Talk to Bot to test: VA prompts to view all leads

View a Lead By ID

  1. Install the template from Salesforce Action Templates.
  2. The View Lead by Id dialog task is added with the following components: View Lead by Id dialog task is added
    • View Lead by Id – User intent to view a lead by ID.
    • ID – Entity node for the lead ID.
    • viewLeadbyIdService – Bot action service to view a lead by ID. Click +Add Response: Add response
    • subDomainService – Bot action service to fetch subdomain.
    • viewLeadbyIdMessage – Message node to display responses.
  3. Click Train, then Talk to Bot to test: VA prompts to view lead by id

Search Leads

  1. Install the template from Salesforce Action Templates.
  2. The Search Leads dialog task is added with the following components: Search Leads dialog task is added
    • Search Leads – User intent to search leads.
    • Keyword – Entity node for search keywords.
    • searchLeadsService – Bot action service to search leads. Click +Add Response: Add response
    • subDomainService – Bot action service to fetch subdomain.
    • searchLeadsMessage – Message node to display responses.
  3. Click Train, then Talk to Bot to test: VA prompt to view all leads

Create an Opportunity

  1. Install the template from Salesforce Action Templates.
  2. The Create Opportunity dialog task is added with the following components: Create Opportunity dialog task is added
    • Create Opportunity – User intent to create an opportunity.
    • Opportunity Name, Closed Date, Stage of Opportunity – Entity nodes for opportunity details.
    • CreateOpportunityService – Bot action service to create an opportunity. Click Edit Request: Edit request Sample Request:
      {
        "attributes": {"type": "Opportunity"},
        "Name": "Project Charlie",
        "CloseDate": "2022-08-31",
        "StageName": "Prospecting"
      }
      
      Click +Add Response: Add response Sample Response:
      {
        "id": "0065g00000O4bgDAAR",
        "success": true,
        "errors": []
      }
      
    • subDomainService – Bot action service to add subdomain.
    • createOpportunityMessage – Message node to display responses.
  3. Click Train, then Talk to Bot to test: VA prompts to create opportunity
  4. Click the Chevron icon to expand the new opportunity: Expand the new opportunity
  5. Click View Opportunity to see opportunity details in Salesforce CRM: View opportunity details