Skip to main content

How to create leads or cases in Salesforce with Flow Builder. Learn how to efficiently create leads and cases in Salesforce using Flow Builder, enhancing CRM workflows and data management.

How to create leads or cases in Salesforce with Flow Builder

Key Takeaways

  • 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.

Q&A Highlights

  • 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"?It occurs when API access is not enabled on the Salesforce user profile. Fix it by going to Setup > ADMINISTRATION > Manage Users > Profiles, clicking Edit on the relevant profile, and checking the API Enabled checkbox under Administrative Permissions.

Bird offers many direct integrations that allow you to plug your communications into the tools and platforms already used in your business.

Using Flow Builder’s native integrations, custom connections via HTTP requests and webhooks, you can easily enrich customer profiles, enable rapid sales engagement and drive more qualified leads.

Today, we will discuss our integration with Salesforce.

  • 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.

What this integration enables

With this integration you can:

  • Add leads into Salesforce from different communication channels: WhatsApp, Instagram, Telegram, WeChat, LINE, Messenger, Google Business Chat, Viber, etc. When using WhatsApp for lead generation, implementing SMS fallbacks ensures no potential leads are lost due to delivery failures.
  • Create cases in Salesforce to keep records, and store key data inside the cases from all your channels
  • Implement flexibility and automation of lead/case creation at any point in your sales funnel

Salesforce integration capabilities at a glance

Capability

Description

Lead creation

Create Salesforce Leads from messaging channels

Case creation

Create Salesforce Cases for support workflows

Channel support

WhatsApp, Viber, SMS, Instagram, Telegram, LINE, Messenger

Automation control

Trigger lead or case creation at any flow step

Data enrichment

Store structured channel data in Salesforce records

What you’ll build in this guide

In this guide, you will learn how to:

  • Set up your Salesforce properly
  • Connect Salesforce with Bird
  • Troubleshooting errors when connecting Salesforce
  • Create a flow in Flow Builder that will push data into Salesforce
  • Connect WhatsApp with Salesforce to send your leads
  • Connect Viber with Salesforce to send your cases

Requirements

Before you start building the logic in Flow Builder, you need to have the following requirements ready:

  • A Bird account: Make sure you have access as administrator.
  • A Salesforce Account: You need "Administrator access"

Prerequisites checklist

Requirement

Access level

Notes

Bird account

Administrator

Required to create and publish flows

Salesforce account

Administrator

Needed for Connected App and API access

Step 1: Configure a Salesforce Connected App

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

  • Login to Salesforce as an administrator
  • Select Setup in the drop-down list of the account (in the upper-right corner)
  • 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."

Create a Connected App

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

Configure OAuth settings

  • 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

OAuth scopes explained

OAuth scope

Purpose

api

Permits Bird to read and write Salesforce objects

web

Enables browser-based OAuth authorization

offline_access

Allows refresh tokens for extended access periods

App Manager setup.

Step 2: Obtaining tokens from Salesforce to authorize access

How Salesforce OAuth tokens work 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.

Salesforce OAuth artifacts

Artifact

Purpose

Lifetime

Consumer Key

Identifies your Connected App

Static

Consumer Secret

Authenticates the Connected App

Static

Access token

Authorizes Salesforce API requests

Short-lived

Refresh token

Renews access tokens

Long-lived

Instance URL

Salesforce API base URL

Static

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.

Troubleshooting your Salesforce connection

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

"REST API is not enabled for this Organization" 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.

Go to ADMINISTRATION > Manage Users and click on Profiles.

Click Edit on the specific profile you want to update.

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

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

Step 3: Create a new flow in Flow Builder to create leads or cases

Import and publish the Salesforce flow template 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:

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

Import flow screen.

Use Salesforce with WhatsApp and 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:

Channel to Salesforce object mapping

Channel

Salesforce object

Primary use case

WhatsApp

Lead

Sales engagement and inbound leads

Viber

Case

Customer support and issue tracking

SMS

Lead or Case

Fallback or entry channel

Other channels

Configurable

Depends on flow logic

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

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

**

**Prepare authentication for channel flows

**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.

Create a Lead in Salesforce with 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.

Create a Case in Salesforce with Viber

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 from Setup > Object manager > Lead > Fields & Relationship.

The output variable *ID *is the case ID returned from Salesforce.  

Congratulations! 

You have just successfully connected Salesforce with WhatsApp and/or Viber to create leads and cases for your team to enable faster engagement and drive more qualified leads.

If you have any questions about your new flow or our Salesforce integration, please reach out to us at our support email.