Comment créer des leads ou des cas dans Salesforce avec Flow Builder

Oiseau

2 déc. 2021

Constructeur de flux

1 min read

Comment créer des leads ou des cas dans Salesforce avec Flow Builder

Points Clés

    • Bird’s Flow Builder allows seamless integration with Salesforce, enabling automated lead and case creation across multiple communication channels.

    • The integration supports WhatsApp, Instagram, Telegram, WeChat, LINE, Messenger, Google Business Chat, Viber, and more.

    • With Salesforce connectivity, businesses can enrich CRM records, centralize support conversations, and build automated end-to-end funnel logic.

    • Key use cases include:

      • Creating Salesforce leads directly from messaging channels

      • Creating Salesforce cases for support teams

      • Routing, tagging, and enriching customer data in flows

    • Integration requires:

      • A Bird administrator account

      • A Salesforce org with administrator access

    • Setup begins by configuring a Salesforce Connected App with OAuth enabled, appropriate scopes, and relaxed permission settings.

    • Required OAuth scopes include:

      • Access and manage your data (api)

      • Web access (web)

      • Refresh tokens (offline_access)

    • After creating the Connected App, users must retrieve their Consumer Key and Consumer Secret for Flow Builder credentials.

    • OAuth tokens are generated through Salesforce using a browser authorization step, followed by retrieving the access and refresh tokens via cURL or Postman.

    • The refresh token ensures continuous authentication even when access tokens expire.

    • A common integration error — “REST API is not enabled for this Organization” — can be resolved by enabling API access under a user profile’s administrative permissions.

    • Once Salesforce credentials are configured, users can import a Flow Builder template to create leads or cases via WhatsApp, Viber, SMS, and other channels.

    • API endpoints allow Flow Builder to push data into Salesforce objects such as Lead or Case using field mappings defined in Salesforce’s Object Manager.

    • Users can customize flows to trigger Salesforce actions based on channel behavior, customer replies, tags, or funnel stages.

    • The flow returns Salesforce record IDs (e.g., Case ID) for follow-up, reporting, or routing.

    • After configuration, businesses can automatically generate Salesforce entries in real time from any supported Bird-powered channel.

Points forts des Q&A

  • What does the Salesforce integration with Flow Builder allow you to do?

    It enables automatic creation of leads and cases in Salesforce from any supported communication channel connected to Bird.

  • Which channels can push data into Salesforce?

    WhatsApp, Instagram, Telegram, WeChat, LINE, Messenger, Google Business Chat, Viber, SMS and more.

  • What are the main use cases?

    Creating Salesforce leads, creating support cases, enriching profiles, and building automated CRM-connected sales funnels.

  • What Salesforce permissions are required?

    Administrator access, along with a Connected App configured with OAuth, API access, and relaxed IP/token restrictions.

  • Which OAuth scopes must be added?

    API access, web access, and refresh_token/offline_access.

  • What credentials does Bird need to authenticate with Salesforce?

    The Connected App’s Consumer Key and Consumer Secret, plus an access token and refresh token.

  • Why is a refresh token required?

    Because Salesforce access tokens expire, and the refresh token is used to obtain new ones automatically.

  • What causes the error “REST API is not enabled for this Organization”?

    API access is disabled in the user’s Salesforce profile. Enabling API Enabled resolves it.

  • How are Salesforce objects like Lead or Case mapped in Flow Builder?

    By referencing field names from Salesforce’s Object Manager (e.g., LastName, Phone, Company).

  • Can you use WhatsApp to create Salesforce leads?

    Yes — WhatsApp can feed structured data into Salesforce Lead fields through Flow Builder.

  • Can Viber be used to create Salesforce cases?

    Yes — Viber messages can trigger case creation with details sent via Salesforce APIs.

  • Does the flow return Salesforce IDs?

    Yes — Salesforce responds with object IDs (e.g., Case ID), which can be stored or used in further automation.

Bird offre de nombreuses intégrations directes qui vous permettent de connecter vos communications aux outils et plateformes déjà utilisés dans votre entreprise.

En utilisant les intégrations natives de Flow Builder, des connexions personnalisées via des requêtes HTTP et des webhooks, vous pouvez facilement enrichir les profils clients, permettre un engagement rapide des ventes et générer plus de prospects qualifiés.

Aujourd'hui, nous allons discuter de notre intégration avec Salesforce. 

Avec cette intégration, vous pouvez :

  • Ajouter des prospects dans Salesforce depuis différents canaux de communication : WhatsApp, Instagram, Telegram, WeChat, LINE, Messenger, Google Business Chat, Viber, etc. Lors de l'utilisation de WhatsApp pour la génération de leads, l'implémentation des solutions de repli par SMS assure qu'aucun prospect potentiel n'est perdu en raison d'échecs de livraison.

  • Créer des dossiers dans Salesforce pour conserver des enregistrements et stocker des données clés dans les dossiers de tous vos canaux

  • Mettre en œuvre la flexibilité et l'automatisation de la création de leads/dossiers à n'importe quel point de votre entonnoir de vente

Dans ce guide, vous apprendrez à :

  1. Configurer correctement votre Salesforce

  2. Connecter Salesforce avec Bird

  3. Résoudre les erreurs lors de la connexion à Salesforce

  4. Créer un flux dans Flow Builder qui poussera les données dans Salesforce

  5. Connecter WhatsApp à Salesforce pour envoyer vos leads

  6. Connecter Viber à Salesforce pour envoyer vos dossiers

Exigences pour l'intégration Salesforce

Avant de commencer à concevoir la logique dans Flow Builder, vous devez avoir les exigences suivantes prêtes :

  • Un compte Bird : Assurez-vous d'avoir l'accès en tant qu'administrateur.

  • Un compte Salesforce : Vous avez besoin d'un « accès administrateur »

Étape 1 : Allez dans Connected Apps dans Salesforce pour intégrer avec Bird

To access the Connected Apps section in Salesforce (Lighting Experience), follow these steps:

  1. Login to Salesforce as an administrator

  2. Select Setup in the drop-down list of the account (in the upper-right corner)

  3. On the left-hand pane, go to App Manager > New Connected App

Please note: if you face the viewing issue below, please click “Click here to open this page in Salesforce Classic.”

App Manager setup

On the New Connected App page, fill the following required fields under Basic Information:

  • Connected App Name, e.g. Bird Integration.

  • API name, e.g. Bird_Integration

  • Contact Email, e.g. xxx@contactemail.com

  1. Go to API (Enable OAuth Settings), and select Enable OAuth Settings.

  • In the Callback URL field, enter https://login.salesforce.com/

  • In the Selected OAuth Scopes field, select Access and manage your data (api)

  • Provide access to your data via the Web (web)

  • Perform requests on your behalf at any time (refresh_token, offline_access)

  • Click Add

  1. Click the Save button to save the new Connected App.

New Connected App page


  1. In the Connected Apps (Apps > App Manager) list, find the App that you just created, and then click Manage.

  2. On the page that opens, click the Edit button. 

  • Under OAuth policies, select All users may self-authorize in the Permitted Users list

  • In the IP Relaxation, select Relax IP restrictions 

  • In the Refresh Token Policy, click Refresh token is valid until revoked. Under Session Policies, Select Timeout value (24 hours), click the Save button

New Connected App page


  1. Go back to the Connected Apps (Apps > App Manager) list, and click the App that you just created, and then click on View.

  2. Go to API (Enable OAuth Settings) and note down the Consumer Key and Consumer Secret. You need this key and secret for the configuration of credentials in MessageBird’s Salesforce integration.

Étape 2 : Obtenir des tokens de Salesforce pour autoriser l'accès

In Salesforce, access tokens have a limited lifetime specified by the session timeout. If an application uses an expired access token, a “Session expired or invalid” error will be shown. 

Use a refresh token during the authorization process to get a new access token. Using a new token will ensure that the access token is always live.

  1. Get your instance URL. Send the following curl request to obtain the instance URL. 

  • client_id = Consumer Key

  • client_secret = Consumer Secret

  • username = Salesforce login username

  • password = Salesforce login password

Terminal window showing a curl command to request an OAuth2 token


If you are not familiar with curl you can use Postman to send the request. Follow these steps:

Postman dashboard


  1. Get your code. Use your favorite browser, then enter the following request URL in a new tab to get the code. 

  • <CONSUMER_KEY> should be replaced with the obtained Consumer Key in the above step

  • <YOUR_INSTANCE> should be replaced with your instance name


Terminal window displaying a Salesforce OAuth 2.0 authorization URL template


Request URL in the browser

Next, enter your request URL in the browser. Allow access if any alerts popup. You will then see the browser redirected to a URL like the one below. You can obtain the code using that same URL.

  • https://login.salesforce.com/?code=XXXX

  1. Get access token & refresh token: Send the following curl request to obtain the tokens. 

  • <CODE> should be replaced with the code you obtained in the above step. 

  • <CONSUMER_KEY>

  • <CONSUMER_SECRET> should be replaced with obtained keys with the created Connected App

Terminal screenshot showing a curl command to request an OAuth 2.0 access token


You can obtain the access_token and refresh_token from the response.

Screenshot of a JSON response from a Salesforce OAuth token request


If you are not familiar with curl you can use Postman to send the request. Follow these steps:

Screenshot of a successful Salesforce OAuth 2.0 token request made using Postman

In Salesforce, access tokens have a limited lifetime specified by the session timeout. If an application uses an expired access token, a “Session expired or invalid” error will be shown. 

Use a refresh token during the authorization process to get a new access token. Using a new token will ensure that the access token is always live.

  1. Get your instance URL. Send the following curl request to obtain the instance URL. 

  • client_id = Consumer Key

  • client_secret = Consumer Secret

  • username = Salesforce login username

  • password = Salesforce login password

Terminal window showing a curl command to request an OAuth2 token


If you are not familiar with curl you can use Postman to send the request. Follow these steps:

Postman dashboard


  1. Get your code. Use your favorite browser, then enter the following request URL in a new tab to get the code. 

  • <CONSUMER_KEY> should be replaced with the obtained Consumer Key in the above step

  • <YOUR_INSTANCE> should be replaced with your instance name


Terminal window displaying a Salesforce OAuth 2.0 authorization URL template


Request URL in the browser

Next, enter your request URL in the browser. Allow access if any alerts popup. You will then see the browser redirected to a URL like the one below. You can obtain the code using that same URL.

  • https://login.salesforce.com/?code=XXXX

  1. Get access token & refresh token: Send the following curl request to obtain the tokens. 

  • <CODE> should be replaced with the code you obtained in the above step. 

  • <CONSUMER_KEY>

  • <CONSUMER_SECRET> should be replaced with obtained keys with the created Connected App

Terminal screenshot showing a curl command to request an OAuth 2.0 access token


You can obtain the access_token and refresh_token from the response.

Screenshot of a JSON response from a Salesforce OAuth token request


If you are not familiar with curl you can use Postman to send the request. Follow these steps:

Screenshot of a successful Salesforce OAuth 2.0 token request made using Postman

In Salesforce, access tokens have a limited lifetime specified by the session timeout. If an application uses an expired access token, a “Session expired or invalid” error will be shown. 

Use a refresh token during the authorization process to get a new access token. Using a new token will ensure that the access token is always live.

  1. Get your instance URL. Send the following curl request to obtain the instance URL. 

  • client_id = Consumer Key

  • client_secret = Consumer Secret

  • username = Salesforce login username

  • password = Salesforce login password

Terminal window showing a curl command to request an OAuth2 token


If you are not familiar with curl you can use Postman to send the request. Follow these steps:

Postman dashboard


  1. Get your code. Use your favorite browser, then enter the following request URL in a new tab to get the code. 

  • <CONSUMER_KEY> should be replaced with the obtained Consumer Key in the above step

  • <YOUR_INSTANCE> should be replaced with your instance name


Terminal window displaying a Salesforce OAuth 2.0 authorization URL template


Request URL in the browser

Next, enter your request URL in the browser. Allow access if any alerts popup. You will then see the browser redirected to a URL like the one below. You can obtain the code using that same URL.

  • https://login.salesforce.com/?code=XXXX

  1. Get access token & refresh token: Send the following curl request to obtain the tokens. 

  • <CODE> should be replaced with the code you obtained in the above step. 

  • <CONSUMER_KEY>

  • <CONSUMER_SECRET> should be replaced with obtained keys with the created Connected App

Terminal screenshot showing a curl command to request an OAuth 2.0 access token


You can obtain the access_token and refresh_token from the response.

Screenshot of a JSON response from a Salesforce OAuth token request


If you are not familiar with curl you can use Postman to send the request. Follow these steps:

Screenshot of a successful Salesforce OAuth 2.0 token request made using Postman

Dépannage de votre connexion Salesforce

The most common error encountered when integrating Salesforce with Bird and how to fix it:

  1. ‘REST API is not enabled for this Organization’ Issue

When you are trying to send a request to the salesforce API using the above credentials, sometimes you will get this error.

  • REST API is not enabled for this Organization.

You can resolve this error by following the below steps.

Click on Setup in the right top corner.

Setup menu highlighted


Go to ADMINISTRATION > Manage Users and click on Profiles.

Profiles view


Click Edit on the specific profile you want to update.

Scroll down and go to Administrative Permissions and check the API Enabled checkbox.

Administrative permissions view

Don't forget to go down the page and click Save.

Étape 3 : Créez un nouveau flow dans Flow Builder pour créer des leads ou des cas

The configuration of Salesforce is done. Now, let’s start a new flow. This template will help you connect your favorite communication channel with Salesforce and push new leads or cases for your team to follow up:

  1. Log in to your Bird Dashboard and go to Flow Builder

  2. Download the sample flow that you will be using.

  3. Import the flow with the import function. 


Import flow screen

Attach the channels you want to use to create leads/cases into Salesforce. Then, you can publish this flow. 

Utiliser Salesforce avec WhatsApp et Viber

This template flow will allow you to connect your favorite channels (WhatsApp, Viber, SMS, etc.) with Salesforce. The following examples, will show how to connect Salesforce to create leads on:

  • WhatsApp

  • Viber

Keep in mind that you can change the channel or use case depending on your needs.

Import a flow view


You should be able to see your flow on your screen.

Flow illustration


Fetch your access token before activating your flow. 

API endpoint is as follows:

  • client_id = Consumer Key

  • client_secret = Consumer Secret, 

  • For the refresh_token, please refer to step 2.3.

Screenshot of a URL used to request a new Salesforce access token using a refresh token


Flow illustration

Créer un Lead dans Salesforce avec WhatsApp

Replace https://XXXX.my.salesforce.com with your instance URL. Phone, LastName, Company, LeadSource, Description are the field names from Salesforce. 

You can find them under Setup > Object manager > Lead > Fields & Relationship. 


Screenshot of a JSON payload for creating a Salesforce Lead using the REST API.


Create a Lead into SF

Créer un Cas dans Salesforce avec Viber

Remplacez https://XXXX.my.salesforce.com par votre URL d'instance. Phone, LastName, Company, LeadSource, Description sont les noms de champs de Salesforce. Vous pouvez les trouver à partir de Configuration > Gestionnaire d'objets > Lead > Champs & Relations.

La variable de sortie ID est le cas ID retourné par Salesforce.  

Screenshot of a JSON payload for creating a new Salesforce Case via REST API

Félicitations! 

Vous venez de connecter avec succès Salesforce à WhatsApp et/ou Viber pour créer des prospects et des cas pour votre équipe afin de permettre un engagement plus rapide et de générer plus de prospects qualifiés.

Si vous avez des questions sur votre nouveau flux ou notre intégration Salesforce, veuillez nous contacter à notre email de support.

Autres news

Lire la suite de cette catégorie

A person is standing at a desk while typing on a laptop.

La plateforme native AI complète qui évolue avec votre business.

A person is standing at a desk while typing on a laptop.

La plateforme native AI complète qui évolue avec votre business.