Salesforce integration

How to use the Salesforce integration in my chatbot?

We will develop bubbles in order to use as simple as possible your Salesforce integration.
For now, I will explain you how to add contacts to your CRM with your chatbot.

First of all, when you make your integration, three bot data keys will be created:

Note that access tokens work only one hour. Using your refresh token you will be able to refresh your access to the Salesforce API.

To refresh your access token, you first need to create a conversation data object as below:

Once created, you will use an API bubble during your process, and collect your refreshed access by doing this request:

GET{your refresh token}

You can then create bubbles asking your bot users their names and their phone numbers.

Once you collected the information needed, make this POST request:

Note that the lastname parameter is the only parameter to know the name of your client, you can for example use the format “Fisrtname LASTNAME” for each contact you create.

POST {your instance URL}/services/data/v53.0/sobjects/Contact

Body example:
{“lastname” : “Badr VANCAUWENBERGHE”,“Phone” : “06060606”}