Bots – Advanced

Course Exercise: How to Build an AI Help Bot with Salesforce Integration

Learn how to build a website help bot using Noca AI that answers visitor questions using your website’s content and automatically creates leads in Salesforce when prospects show interest.

Prerequisites

  • A Noca AI account

  • Access to your company website URL

  • A connected Salesforce CRM instance

Step 1: Set Up Your Bot

  1. Log in to Noca AI and start with a blank bot.

  2. Give your bot a clear name (e.g., Help Bot).

Step 2: Add Web Context

To allow your bot to answer questions about your company, give it access to your website source:

  1. Navigate to Sources and select Web Source.

  2. Enter your primary website URL (e.g., [https://noca.ai](https://noca.ai)).

  3. Save the source so the bot ingests your site’s content.

Step 3: Define Bot Instructions

Set the clear rules and personality for your helper:

  1. Open the Instructions panel.

  2. Enter your prompt to define its role and objective:

    “You are a Noca helper. Provide details about Noca. When the client seems interested, collect lead details and create a lead for me in Salesforce.”

Step 4: Configure the Salesforce Lead Automation

Now, set up the action that allows the bot to push data into Salesforce:

  1. Go to Automations and click + Create New Source.

  2. Define the automation prompt:

    “You will receive details such as name, email, and phone number. Create a lead in Salesforce.”

  3. Insert the node. Noca will automatically generate the integration layout.

Step 5: Map Fields and Handle API Responses

  1. Map Autonomous Values: Ensure the following fields are mapped to collect user inputs:

    • First Name

    • Last Name

    • Email

    • Phone

    • Company

  2. Set API Response Handling: Pass back status values so the bot receives confirmation:

    • Map Lead ID for successful submissions.

    • Map Error Response to capture and display any connection issues.

  3. Rename this action node to Create Lead in Salesforce.

  4. Click Go Live to publish the automation.

Step 6: Enable and Test Your Bot

  1. Return to your Bot Configuration page and refresh.

  2. Enable the Create Lead in Salesforce automation.

  3. Open the chat test window and test the workflow:

    • Ask standard questions (e.g., “What is Noca?”) to test knowledge retrieval.

    • Express interest (e.g., “Sounds great!”) to trigger the lead capture form.

    • Submit test details to verify the lead is successfully created in your Salesforce CRM.