The steps are the same for both Lightning and Classic.
- Step 1: Create a new user for the bot in Salesforce
- Step 2: Login as the bot and reset security token
- Step 3: Create connected app
- Step 4: Prepare routing configuration
- Step 5: Create a new queue
- Step 6: Create a new button
- Step 7: Obtain Chat API Endpoint
- Step 8: Allow OAuth Username-Password Flows
- Step 9: Create Chat Deployment
- Step 10: User Authentication on Ultimate
- Step 11: Configure integration parameters
- Step 12: Turn on Automation Engine
Step 1: Create a new user for the bot in Salesforce
It is important to create a new user on your Salesforce account for the bot, this account should not be shared with human agents.
Note - Ensure you add a email address that you have access to, for example your.name+bot@company.com (if your company uses gmail) or a group email like support@company.com
To create a new user in Salesforce:
- Login to Salesforce using a system administrator account
- Go to Setup > Users > Users, click New User
- Under General Information, fill in the fields of required information highlighted in red
- Last name: Use the bot's name. e.g. Bot EN. (This name is going to be used in Step 4 and Step 5 during setup so keep it handy.)
- Alias: Auto-filled by Salesforce once Last Name is entered
- Email: Email account of the bot
- Username: use the bot email
- Nickname: Auto-filled by Salesforce once Username is entered
- Role: Leave it as is
- User License: Select Salesforce
- Profile: Create a profile for the bot
-
Enable the settings below by checking the box:
-
Service Cloud User
-
Chat User
-
- Under Locale Settings, select Time Zone, Locale, and Language according to your needs.
- Click Save
Profile configuration
After the new user has been created, check the settings of the profile selected above:
- Go to Setup > Users > Profiles and select the profile used above in the new user and check the following settings:
-
-
- Ensure Omni-Channel is enabled within your organization
-
Scroll to the bottom, under Enabled Service Presence Status Access, select the status that is configured as the online status. For example:
If a Presence Status has not been created, please create at least an online status for the bot. -
Scroll back to the top and click Edit to enable the setting below:
-
Under Standard Object Permissions > Chat Transcripts, enable everything
-
Under Administrative Permissions > API enabled
-
Under Password Policies, set User passwords expire in to Never Expire
-
-
- Click Save
The below information needs to be saved for later in the process
Keep the information below for Step 4 and Step 5:
- Last name
Keep the information below for Step 8 User authentication:
- Username (Bot email)
- Password to login to the bot's email account
- Password to login to the bot's salesforce account
Step 2: Login as the bot and reset security token
Now, log out and log back into Salesforce as the bot user you just created. To reset the security token:
- Click the avatar in the top right corner.
- Click Settings, then in the left side menu, go to My Personal Information > Reset My Security Token, and click Reset Security Token
- Log out
- Further information on Security Token is available here from Salesforce
Note - The Security Token will be sent to the bot email (subject: Your new Salesforce security token). This will be used in Step 8 for user authentication.
Step 3: Create connected app
During this step, a new connected app will be created, and you'll need to collect the Consumer Key and Consumer Secret afterward
- Login to Salesforce using a system administrator account
- Go to Setup > Apps > App Manager and click New Connected App
- Under Basic Information, fill in the fields of required information highlighted in red:
- Connected App Name: Enter the name of your bot
- API Name: Auto-filled by Salesforce once Connected App Name is entered
- Contact Email: Enter the bot's email
- Under API (Enable OAuth Settings):
- Enable OAuth Settings: Enable by checking the box
- Callback URL: https://login.salesforce.com/services/oauth2/callback
- Selected OAuth Scopes > Available OAuth Scopes, Add Full access (full)
- Require Secret for Web Server Flow: Enable by checking the box
- Require Secret for Refresh Token Flow: Enable by checking the box
- Skip other fields and click Save. Salesforce will then take you to a new page after a few minutes. If not, click Continue.
- On the next page, Under API (Enable OAuth Settings):
-
- Consumer Key: Click Copy
- Consumer Secret: Click Click to reveal > Copy
Save the information above for Step 8 User Authentication:
- Consumer Key
- Consumer Secret
Step 4: Prepare routing configuration
Note: if you have a routing config in your account you can use an existing one. This routing configuration will allow us to make sure all chats assigned to the bot's queue are routed to it directly
- Create a new routing configuration by clicking New in Setup > Routing Configurations
- Under Basic Information, enter the fields below:
- Routing Configuration Name: Enter the bot's name (you can use the last name used in Step 1)
- Developer Name: Auto-filled by Salesforce once Routing Configuration Name is entered
- Under Routing Settings
- Routing Priority: Enter "1"
- Routing Model: Select Most Available
- Under Work Item Size
- Percentage of Capacity: Enter "0.01"
Step 5: Create a new queue
Creating a new queue in Salesforce enables the incoming chats to be routed to the bot and escalated to agents when needed.
To create a new queue:
- Go to Setup > Queues, click New
- Under Queue Name and Email Address
- Label: Use the bot name (you can use the last name used in Step 1)
- Queue Name: Auto-filled by Salesforce once Label is entered
- Under Configuration with Omni-Channel Routing (please contact your CSM if you don't use Omni-Channel)
-
Routing Configuration: Click the icon next to the field, a new window will open
- In the new window, select the routing configuration (created in step 4) by clicking the bot's name under Developer Name
- The new window would close once it's clicked and auto-fill the Routing Configuration filed with the bot's name
-
Routing Configuration: Click the icon next to the field, a new window will open
- Under Supported Objects, add Chat Transcript
- You can of course select any other objects that you deem necessary
- Under Queue Members, add the bot user to Selected Members
- Click Save
The queue should include only the bot user. This is to ensure all new chats are assigned to the bot. The bot user should not be part of the queue of "humans" or "agents".
Repeat the steps to create a queue for your human agents to take escalated chats from the bot if there isn't already one.Step 6: Create a new button
- Create a new button by going to Setup > Chat Buttons & Invitations, then click New
- Configure with the following settings:
- Type: Chat Button
- Name: Use the bot name (you can use the last name used in Step 1)
- Developer Name: Auto-filled by Salesforce once Name is entered
- Under Routing Information
- Routing type: Omni-Channel
-
Queue: Click the icon next to the field, a new window will open
- In the new window, select the queue created in Step 5
- The new window would close once it's selected and auto-fill the Queue filed with the bot's name
- Click Save
- You will see Chat Button Code at the button of the page after clicking Save.
Make sure to add the code to the source code of your website or application. If you're not sure how to, please contact your web or app developer.
Connect the new queue to the chat button that appears on your website or application. Human agents should be assigned to different buttons. When the bot needs to hand over a conversation, it will reassign the conversation to the human button.
Step 7: Obtain Chat API Endpoint
This is needed in our Dashboard as one of the integration parameters.
To obtain this information:
- Go to Service setup > Channels > Chat > Chat Setting
- Copy the value in the field of Chat API Endpoint
Save this information for Step 11 to configure integration parameters
Step 8: Allow OAuth Username-Password Flows
For any new org created after summer '23, OAuth Username-Password Flows are disabled by default. You will have to enable this.
- Go to Setup and navigate to Identity > OAuth and OpenID Connect Settings
- Toggle the Allow OAuth Username-Password Flows to on.
Step 9: Create Chat Deployment
- Navigate to Feature Settings > Service > Chat > Deployments.
-
Create a new deployment:
- Assign a name for the deployment e.g 'Ultimate Bot'
- In the Chat Window Title write what you want the bot's name to appear for your client. This can be your company name or bot persona.
- The rest of the settings can be customised per your needs.
- Save the deployment.
Step 10: User Authentication on Ultimate
In this step, you need to enter all the information you've collected previously to our Dashboard for User Authentication.
To do so:
- Open a new tab and login to your Ultimate dashboard
- Select your bot and add Salesforce integration (Settings > Chat Platforms > Add Integration > Salesforce)
- Click on User Authentication and enter all relevant parameters as follows:
- Username: Enter the email address of the bot user created in Step 1
- Password: Enter the Salesforce password of the bot user created in Step 1
- Security Token: Enter the bot agent's security token created in Step 2. It was sent to the bot's email
- Consumer Key: Enter the ID of the new connected app created in Step 3
- Consumer Secret: Enter the secret of the new connected app created in Step 3
- Click Check Connection to test that verification was successful
- If it is, the save button at the bottom will turn green and save the setup for you automatically if successful
- If you encounter an error message, please go through the steps above to make sure all the information is correct
Step 11: Configure integration parameters
After user authentication is successful, you'll need to configure the integration parameters.
To do so:
- Click on Integration parameters and enter all relevant information:
- API Version: Select 46 from the drop-down
- HTTP Endpoint: Paste the Chat API Endpoint collected in Step 7 and remove the "/" at the end
- Organization ID: Auto-filled if user authentication was successful. This can also be accessed via Setup > Company Settings > Company Information.
- Deployment ID (for escalation): Select from the dropdown menu
- Transfer Button ID (for escalation): Select the button ID of your human agents. Your virtual agent hands over conversations to this button ID in case of escalation.
-
Status ID
- First, enable Use Omni-Channel
- Then, select the same one under Enabled Service Presence Status Access in Step 1
- Click Save
Note - if you see free-text fields for Status ID and Development ID instead of the drop-down you will need to take the Status ID from the URL of the Presence Statuses tab which will be at the end after the %2F and the Development ID can be found after the %2F on the Chat > Deployments tab