AiApps.Pro
How to get the official WhatsApp Business API via Gupshup and integrate with Bitrix24
A Step-by-Step Guide
WhatsApp Business API
In this step-by-step guide, we will describe in detail how to get the WhatsApp Business API through the official Facebook partner - the Gupshup service and integrate with the Bitrix24 CRM Open Channels.
Features of the Gupshup service
Gupshup service
You can connect any of your existing phone numbers (mobile, local, virtual). The number of connected phone numbers is not limited and does not affect the cost. That is, you can create an unlimited number of communication channels.
No monthly fees or connection fees. Within a 24-hour session window, only session incoming and outgoing messages are paid for at a price of $ 0.001 per message. Replenishment of the balance of the service from $ 10 with any bank card. The time for using funds on the balance is not limited. There is no limit on the number of dialogs and clients.
To be able to write to the user after 24 hours from the moment of the last message from him, you can prepare special templates and get their approval from WhatsApp. The total cost of sending a template message will be $ 0.001 + the cost of a message at WhatsApp rates.
When registering in the Gupshup, $ 1 is credited to the balance for free. This money can be spent on the full use of the service at the beginning of work. If, for example, send and receive only session messages, then enough for 1000 messages. The time of using the trial balance is not limited.
1. Creating an account in Facebook Business Manager
If you already have a Facebook Business Manager account, then skip this step and move on to the next.

Log in to your personal Facebook account and create a Business Manager account by following the link https://business.facebook.com/overview and clicking the "CREATE ACCOUNT" button, a window for entering company data will open.
Creating an account in Facebook Business Manager
According to the prompts above the fields, enter the company name, first and last name, e-mail and press the "Submit" button.

In the next window, enter information about the company and press the "Submit" button.
Adding company information when creating an account in Facebook Business Manager
After sending, a message will appear that the account has been created and you need to confirm your email address.
Email verification required when creating an account with Facebook Business Manager
Let's go to the mail and click on the "Confirm Now" button from the letter.
Confirming your email address when creating an account with Facebook Business Manager
2. Activating the "Start Verification" button in Facebook Business Manager
If you already have this button active or your business has already been verified in Facebook Business Manager, then skip this step and proceed to the next step.

By default, the button for starting business verification in Facebook Business Manager is disabled. In order to make it active, you need to perform the steps described below.
By default, the button for starting business verification in Facebook Business Manager is disabled
Login to https://developers.facebook.com . To do this, click on the "Get Started" item in the top menu.
Click in the top menu on the item "Get Started"
In the next window, click the "Continue" button.
Click the "Continue" button
In the next window, check the box and click the "Confirm Email" button.
Click the "Verify Email" button
In the next window select "Developer" and click the "Complete Registration" button.
Click the "Complete Registration" button
In the next window, click the "Create App" button.
Click the "Create App" button
In the next window, select "Manage Business Integrations" and click the "Continue" button.
Click the "Continue" button
In the next window, enter any "App Display Name", select "App Purpose" - "Yourself or your own business", select your "Business Manager Account" and click the "Create App" button.
Click the "Create App" button
After successfully creating the app, the Facebook App Dashboard home page will open.
Facebook App Dashboard home page
The "Start verification" button is now active.
The "Start verification" button is now active
3. Business verification in Facebook Business Manager
If your business is already verified in Facebook Business Manager, then skip this step and move on to the next.

Go to the Security Center section at https://business.facebook.com/settings/security and click the "Start verification" button.
Click the "Start verification" button
Official information from Facebook about business verification can be found at this link: https://www.facebook.com/business/help/2058515294227817?id=180505742745347.

At the first step of verification, enter your business details:

Legal Name of Business - enter the business name as shown on official documents.

Country - select the country where the business is registered.

Street Address - enter the business address as shown on official documents.

Street Address 2/Locality - enter, if available.

City - enter the city where the business is registered.

State/Province/Region - enter the state/province/region where the business is registered.

ZIP/Postal Code - enter the business ZIP/Postal Code as shown on official documents.

Business Phone Number - enter the business phone number as shown on official documents. The phone number will then need to be verified by an official document that it belongs to your business (for example, an invoice for payment for a phone number).

Website - the address of the company's website. This website domain name will be used to verify your email later.
Business Verification in Facebook Business Manager. Enter Your Business Details.
Business Verification in Facebook Business Manager. Enter Your Business Details.
After entering your business details and clicking the "Next" button, Facebook will try to find in open sources all businesses whose details are similar to the ones you entered.
    Further there are two possible ways of the next steps:
      1. If such businesses are found, they will be shown in the list.
        Business Verification in Facebook Business Manager. Select Your Businesses.
        Choose the most suitable option or, if not one does not fit, then select "None of these match" and click the "Next" button.
          Business Verification in Facebook Business Manager. Select Your Businesses.
          If your business is on the list and you have chosen it, then at the third step, confirm your business details and click the "Next" button.
            Business Verification in Facebook Business Manager. Confirm Your Business Details.
            In the fourth step, choose a verification method. You can verify your phone number. Select your language and request a phone call or text message.
              Business Verification in Facebook Business Manager. Choose a Verification Method.
              2. If Facebook did not find your business in open sources, or you did not see your business in the list suggested by Facebook, and you choose "None of these match".
                Business Verification in Facebook Business Manager. If Facebook did not find your business in open sources. Verify Your Legal Business Name.
                Business Verification in Facebook Business Manager. If not one does not fit, then select "None of these match".
                Verify your legal business name.

                To do this, you need to upload a standard official document that matches the legal business name your entered.

                Documents accepted for legal name include:
                • Business license
                • Certificate of Formation or Incorporation
                • Tax or VAT Registration Certificate
                  Business Verification in Facebook Business Manager. If you did not see your business in the list suggested by Facebook, and if you choose "None of these match". Verify Your Legal Business Name.
                  Select the document language, upload documents and click the "Next" button.
                  Business Verification in Facebook Business Manager. Verify Your Legal Business Name.
                  Verify Your Business Address or Phone Number. Upload a document showing the legal name of your business along with the mailing address or phone number you entered and click the "Next" button.

                  Documents accepted for address/phone include:
                  • Utility Bill, like Electric or Phone
                  • Bank Statement with Address
                  • Business License with Address or Phone
                  Business Verification in Facebook Business Manager. Verify Your Business Address or Phone Number.
                  Choose a verification method. You can choose to verify by phone or by the domain name of your website. You may be verified faster if you use an email associated with your website's domain.
                    Business Verification in Facebook Business Manager. Choose a verification method.
                    Enter Verification Code. Check your email inbox and enter the code provided. Click the "Submit" button.
                      Business Verification in Facebook Business Manager. Verification Code.
                      Business Verification in Facebook Business Manager. Enter Verification Code.
                      Business Verification in Facebook Business Manager. Enter Verification Code.
                      Business Verification in Facebook Business Manager. Submitting.
                      The "Business Information" page https://business.facebook.com/settings/info will show the Business Verification Status "Under Review". Now you need to wait for approval from Facebook, this may take 2-7 business days.
                        Business Verification in Facebook Business Manager. Business Verification Status "Under Review".
                        The "Security Center" page https://business.facebook.com/settings/security will show the Business Verification "Submitted".
                        Business Verification in Facebook Business Manager. Business Verification "Submitted".
                        After successful verification, the status will be updated to "Verified".
                        Business Verification in Facebook Business Manager. Business Verification "Verified".
                        4. Create an account in Gupshup and connect your phone number to the WhatsApp Business API
                        To create an account with Gupshup, you just need to log into this service through any of your existing Google, Facebook or GitHub accounts on the page https://www.gupshup.io/developer/whatsapp-api.
                        Log in with any of your existing Google, Facebook or GitHub accounts
                        Immediately after logging in, the WhatsApp Dashboard will open. We click there on the button "Create your first app".
                        Click on the button "Create your first app"
                        Next, click on the "Access API" button.
                        Click on the "Access API" button
                        Enter any free app name and click the "Submit" button.
                        Enter any free app name
                        Click on the "Submit" button
                        A long page will open, scroll it down with the mouse and click the "Next" button at the bottom.
                        Click on the "Next" button
                        Next, the button "Go to dashboard" will appear below, click it to go there.
                        Click on the "Go to dashboard" button
                        In the dashboard https://www.gupshup.io/whatsapp/dashboard, click on the "Go Live" button in the created application.
                        Click on the "Go Live" button
                        On the next screen, click "I'm ready".
                        Click "I'm ready"
                        On the next screen, select your country.
                        Select your country
                        Then scroll down the frame and click "Next".
                        Click "Next"
                        On the next screen fill out the form with your business details according to your business information from Facebook Business Manager https://business.facebook.com/settings/info and click "Next".
                        Fill out the form and click on the "Next" button
                        An email from Gupshup will be sent to the email address entered in the form with a button to confirm it. Confirm this email by clicking the "Verify Now" button in the body of the letter.
                        In the letter, click on the "Verify Now" button
                        After successful verification, the "Email Verification Complete" window will open
                        The "Email Verification Complete" window will open
                        and a letter will come that the email has been successfully verified.
                        A letter that the email has been successfully verified
                        Return to the window with the form. Check all entered information and click "Confirm".
                        Check all the information you entered and click the "Confirm" button
                        On the next screen, enter the account ID of your verified business in Facebook Business Manager, which you will copy on the page https://business.facebook.com/settings/info, and click "Save".
                        Enter the account ID of your verified business in Facebook Business Manager
                        Click "Save"
                        If your business is not yet verified, an error will appear: "The Facebook Business Manager ID does not seem to be verified. Please try again with a verified ID."
                        If the error: "The Facebook Business Manager ID does not seem to be verified. Please try again with a verified ID."
                        If so, then you will need to first go through the verification of your business in Facebook Business Manager, and then return to this step. This process is described in detail in steps 1-3 of this guide.

                        If everything is in order and your business is verified, then the next screen will open, where we enter our phone number that we want to use for the WhatsApp Business API. Before doing this, be sure to study Facebook's rules for choosing such a phone number from the link http://developers.facebook.com/docs/whatsapp/guides/phone-number.

                        Select the country code and enter the phone number, press the "Save" button.
                        Select the country code and enter the phone number, press the "Save" button
                        Next, enter the display name of your business in WhatsApp. Before doing this, be sure to study Facebook's rules for choosing a display name from a link: https://developers.facebook.com/docs/whatsapp/guides/display-name.

                        Enter a display name and click on the "Save" button.
                        Enter a display name and click on the "Save" button
                        Next, you will need to approve the link to Gupshup on your Facebook Business Manager page, for this, in a new browser tab, click on the link https://business.facebook.com/settings/requests or in Facebook Business Manager in the menu on the left, select the item "Requests". In the tab "Requests received" there will be a request received from Gupshup, click on the "Approve" button.
                        Click on the "Approve" button
                        Go back to the Gupshup window and click the "Approve" button.
                        Click the "Approve" button
                        A window will open with information that your request has been sent and is awaiting approval from WhatsApp. Reportedly, this will take 2 to 7 business days. Often everything happens faster, and perhaps you will receive an answer to your email within 24 hours. Click on the "Go to Dashboard" button.
                        Click on the "Go to Dashboard" button
                        The main page of the Dashboard will open and in the list of apps in the blue button you will see the current status "Awaiting Approval".
                        Current status "Awaiting Approval"
                        After approval, you will receive an email from Gupshup and the status in the blue button will change to "Complete verification".

                        Next, you will need to confirm your phone number using SMS or voice call. To do this, click on the "Complete verification" button.
                        Click on the "Complete verification" button
                        In the window that opens, click on the button "Request code via SMS" if the phone number is mobile, or "Request code via voice call" if the phone number is not mobile.
                        Click on the button "Request code via SMS" if the phone number is mobile, or "Request code via voice call" if the phone number is not mobile
                        We are waiting for an automatic screen refresh and sending a confirmation code to your number.
                        Waiting for the confirmation code to be sent
                        Waiting for the confirmation code to be sent
                        After sending the code to your number, the following screen will automatically open, where we enter the received code and press the "Send" button.
                        Enter the confirmation code and click on the "Submit" button
                        After successful submission, the following window will open with a message that your account information has been approved and verification was successful. Click on the "Go to Dashboard" button.
                        Click on the "Go to Dashboard" button
                        The main page of the Dashboard will open and in the list of apps you will see the current green status "LIVE". You can now use your phone number in the WhatsApp Business API.

                        You can also customize your business profile on WhatsApp, for example, upload a profile picture and enter other information about your business. To do this, follow the link "Profile settings" in the list of apps for editing a profile.
                        Follow the link "Profile settings"
                        A window for editing the profile will open, enter all the necessary information there.
                        Enter your profile information and click on the "Apply Changes" button
                        After entering the profile data, click on the "Apply changes" button.
                        5. Connecting WhatsApp Business API Gupshup to Bitrix24
                        To start receiving and sending messages through your connected phone number to the WhatsApp Business API Gupshup, you need to connect your Gupshup account to your Bitrix24.

                        In Bitrix24, install the WhatsApp Business API Gupshup app from the marketplace, to do this, follow the link https://www.bitrix24.com/apps/?app=aiappspro.whatsapp_business_api_gupshup and click on the green "INSTALL" button.
                        Click on the "INSTALL" button
                        If you have not yet logged into the Bitrix24 marketplace, a pop-up window with the "LOGIN" button will open. Click it to log in with your Bitrix24 account.
                        Click on the "LOGIN" button or follow the link "CREATE YOUR BITRIX24 NOW"
                        If you don't have Bitrix24 yet, then click on the "CREATE YOUR BITRIX24 NOW" link in the same pop-up window and register Bitrix24 to your email address or using one of your proposed social network accounts.
                        Registration Bitrix24
                        After successfully entering the Bitrix24 marketplace, in the same pop-up window that appeared after clicking the green "INSTALL" button, select your Bitrix24 portal from the list.

                        Your Bitrix24 will open in a new tab of your browser with a proposal to install the WhatsApp Business API Gupshup app. Press the blue "INSTALL" button.
                        Click on the "INSTALL" button
                        Read the license agreement and privacy policy by clicking on the links and tick the boxes if you agree to the terms. Click the green "INSTALL" button.
                        Check the boxes and click on the "INSTALL" button
                        After successful installation, a 24/7 app support chat will be automatically created in your Bitrix24, in which you can write at any time if you have any questions about working with the app.
                        After successful installation, a support chat will be automatically created in your Bitrix24
                        Chat 24/7 app support
                        So the app is installed, let's proceed to the activation of the connector for WhatsApp Business API in the Bitrix24 Contact Center.

                        Close the app installation slide, go to the Bitrix24 Contact Center and click on the installed "WhatsApp Business API Gupshup" connector.
                        Click on the installed "WhatsApp Business API Gupshup" connector
                        In the opened connector settings slider, click on the "CONNECT" button.
                        Click on the "CONNECT" button
                        If several Open Lines have been created in your Bitrix24, then below you will need to select the required Open Line to which you want to connect WhatsApp, and after selecting, click the "CONNECT" button.
                        Select the required Open Channel from the list
                        The same slider will open the connector settings interface.
                        Connector settings interface
                        In a new browser tab, go to your Gupshup Dashboard using the link https://www.gupshup.io/whatsapp/dashboard, click on your profile icon and copy the API Key in the pop-up window.
                        Copy the API Key
                        Return to the connector settings window in Bitrix24 and in the "Gupshup API key" field enter the API Key copied in your Gupshup account.
                        Enter Gupshup API key
                        In a new browser tab, go back to your Gupshup Dashboard using the link https://www.gupshup.io/whatsapp/dashboard and copy the phone number for the "Gupshup sender" field by clicking on the "Settings" link in the list of apps in your Gupshup account.
                        Follow the link "Settings"
                        This will open the app settings interface in Gupshup, scroll down to the "Check API Access and Set Callback URL" section and copy the phone number from the "Sender" field. If your own phone number is still pending, this field will contain a test phone number from Gupshup, which you can use to test the app for now.
                        Copy the phone number from the "Sender" field
                        Do not close this app settings window in Gupshup for now, it will come in handy below. Return to the connector settings window in Bitrix24 and enter the copied sender's phone number in the "Gupshup sender" field.
                        Enter the copied phone number in the "Gupshup sender" field
                        Click the "To plug" button. After successful connection, the messages "Connector connected successfully" and "Copy callback URL and enter it in Gupshup settings" will appear. Copy the "Gupshup callback URL" by clicking the "Copy" button.
                        Click on the "Copy" button
                        Go back to our open app settings window in Gupshup, click on the "Callback URL / Link to your bot" tab, toggle the slider to "ON".
                        Toggle the slider to the "ON" position
                        Check the boxes below in the "Select which message status events you want to receive via the callback URL". In the "Enter the callback URL" field, enter the "Gupshup callback URL" copied in the connector settings in Bitrix24 and press the "Set" button to apply the settings.
                        Enter the "Gupshup callback URL" copied in the connector settings in Bitrix24 and click the "Set" button
                        The WhatsApp Business API Gupshup Connector is ready to go!

                        If you're still awaiting approval for your phone number and want to test the connector through a test phone number from Gupshup for now, then scroll up the app settings page in Gupshup to the "Smart Mechanisms for Signing Up and Involving Users" section and click on the "Click on Link" icon. A button will open in a new tab to confirm consent to receive test messages. Check the "I agree ..." checkbox and click the "Send Message" button. The WhatsApp application will open to send the preset message "PROXY ..." from your personal WhatsApp number. Please send this message unchanged to the Gupshup test number. The answer will be "Welcome! You're now chatting with…". Now you can send test messages that will be sent to the Bitrix24 Open Channel.

                        Below are examples of sending and receiving messages through a work phone number.

                        Send a message, for example from your personal WhatsApp number, to your Gupshup approved WhatsApp Business API phone number.
                        Send a message to WhatsApp
                        Accept the message in the Open Channel of your Bitrix24 and write a response.
                        Accept the message in the Bitrix24 Open Channel
                        All types of messages are supported: text messages, images, videos, voice messages, files, location coordinates. Messages are processed in accordance with the settings of the Open Channel.
                        6. Creating templates for outgoing messages
                        To be able to write to the user after 24 hours from the moment of the last message from him, it is necessary to prepare special templates and get their approval from WhatsApp. The message should not be promotional in nature - WhatsApp only approves service and transaction templates. Templates must comply with the following guidelines: WhatsApp Business Policy, WhatsApp Trade Policy.

                        The templates need to be created in your Gupshup account. To do this, go to the Gupshup Dashboard at https://www.gupshup.io/whatsapp/dashboard, follow the Settings link in the Gupshup application list.
                        Follow the link "Settings"
                        Scroll down the settings page that opens to the "Check API Access and Set Callback URL" section and then click the "View Templates" link.
                        Follow the link "View templates"
                        The Template List page opens in a new browser tab. The list that opens will contain only templates for sending via the Gupshup test number marked "Allowed for use on the test server". You won't be able to use them for your number, you will need to create your own templates.

                        To add your own template, click on the "Add more" button.
                        Click on the "Add more" button
                        In the interface that opens, fill in all the required fields and click the "Preview and Send" button. Below is an example of filling in the fields for our approved template.
                        Fill in all the required fields and click the "Preview and Submit" button
                        Check all the details and click the "Submit" button.
                        Check all the details and click the "Submit" button
                        After sending, we expect 1-2 business days for the template to be approved by WhatsApp. At the same time, no letters come, you need to check the status change of the sent templates yourself in your Gupshup account. In the filter, select "Approved" and a list of all your approved templates will open.
                        In the filter, select "Approved" and a list of all your approved templates will open
                        Below in the screenshot is an example of sending a template message from Bitrix24.
                        An example of sending a template message from Bitrix24
                        7. Sending automatic messages to WhatsApp from Bitrix24
                        During the installation in Bitrix24, the "WhatsApp Business API Gupshup" app automatically creates a new SMS provider "[WhatsApp Business API Gupshup]", only this does not send SMS, but messages to WhatsApp.

                        Sending is carried out both manually and automatically from anywhere in the CRM: from robots, business processes, SMS and Messenger mailings from the CRM marketing section, timeline Leads, Deals, Contacts and Companies.

                        We give examples of sending such messages below in the screenshots.
                        Sending a message from the deal timeline
                        Sending a message from the workflow
                        Sending a message from the Automation Rules
                        List of sent messages in the transaction history
                        Sending a message from an SMS Campaign (CRM Marketing)
                        Sending a message from the Messengers (CRM Marketing)
                        Summary
                        We have completely set up the popular and demanded WhatsApp channel from scratch through the official WhatsApp Business API.

                        Compared to unofficial APIs, the main advantages of an official connection are:

                        • high stability and safety;
                        • independence from physical equipment (there is no need to keep a mobile phone connected to the Internet on all the time);
                        • independence from the web interface of messages (no need to scan a QR code and transfer it to third-party applications);
                        • ample opportunities for integration with external systems to automate message processing.

                        Also, connecting the WhatsApp Business API through the official Facebook partner - the Gupshup service allows you to reduce the cost of this channel several times compared to other providers of the official WhatsApp Business API. And even often it turns out to be more profitable compared to the costs of non-official connection schemes. For example, many of these services only offer packages of messages or dialogs with a monthly fee. And one more great advantage, you can connect an unlimited number of your phone numbers for the WhatsApp Business API via Gupshup, and this does not affect the cost.
                        Made on
                        Tilda