# Ноw to connect WhatsApp Bot

To connect WhatsApp Bot, you need to have a Facebook business account. Authorize in it. On <https://developers.facebook.com> go to My Apps section and click Create.&#x20;

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FUD2mDgzQSYxsix0ZkQVG%2FScreenshot%20at%20Apr%2024%2016-19-10.png?alt=media&#x26;token=d0fc1ddd-7f55-4ec1-a47f-9fc6b2a31c1a" alt=""><figcaption></figcaption></figure>

Select Other&#x20;

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FZAUmh01kuYWgozdgyi9g%2FScreenshot%20at%20Apr%2024%2016-21-17.png?alt=media&#x26;token=c50bfa04-a3c8-4a3a-ae07-d732a5c2d11e" alt=""><figcaption></figcaption></figure>

On the next page select Business

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FglPBYTYXyPh7R8fZbhCg%2FScreenshot%20at%20Apr%2024%2016-22-11.png?alt=media&#x26;token=b5fb35f7-daee-4508-96d6-cfd833783323" alt=""><figcaption></figcaption></figure>

&#x20;Next, add your Application Name, email, select or create a business manager.

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FH7lm1GQxP1EBO2DUPOHo%2FScreenshot%20at%20Apr%2024%2016-24-57.png?alt=media&#x26;token=14ce946c-ade4-452d-8df0-05fc3afdade5" alt=""><figcaption></figcaption></figure>

On the next page, find the WhatsApp and click Set up.

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FV1CFn195fLHlBuhVhG2q%2FScreenshot%20at%20Apr%2024%2016-27-58.png?alt=media&#x26;token=7dcaf147-16ce-4268-accb-ec0466ae82bd" alt=""><figcaption></figcaption></figure>

Next, select the Business profile.

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FgavDeBEWypH7EWPPufUW%2FScreenshot%20at%20Apr%2024%2016-31-58.png?alt=media&#x26;token=769d3050-2446-4e7a-bafd-c0aa3bcee93d" alt=""><figcaption></figcaption></figure>

Next, click Start Using the API.

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2F1Z3rtF34PZindHlPQryn%2FScreenshot%20at%20Apr%2024%2016-32-29.png?alt=media&#x26;token=9c1249ef-1042-4939-9d2b-47cd20a5e539" alt=""><figcaption></figcaption></figure>

You need to add the phone number from which you want to send messages to WhatsApp.

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FwKlwzdat6zdNzdWTYsxv%2FScreenshot%20at%20Apr%2024%2017-34-12.png?alt=media&#x26;token=6c606baa-9638-4ac5-b35e-7fe93f9f3647" alt=""><figcaption></figcaption></figure>

You can write a test phone number and check the sending of the message.

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FF47JZt7T6ZAEY6GTLEgj%2FScreenshot%20at%20Apr%2024%2016-40-48.png?alt=media&#x26;token=c9202157-3558-4dcc-9b22-4e41665f2af1" alt=""><figcaption></figcaption></figure>

Phone number ID, WhatsApp Business account ID are also listed on this page. These data are needed to connect WhatsApp Bot in Boomerang account.&#x20;

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FmW9meWovyBYeTCa6oAGC%2FScreenshot%20at%20Apr%2024%2017-35-44.png?alt=media&#x26;token=e55de068-6fbd-4c3d-901f-5d6b558665ff" alt=""><figcaption></figcaption></figure>

Next, we configure the webhooks.

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FqjpbfjddmTAXpvNt0DTW%2FScreenshot%20at%20Apr%2024%2016-42-09.png?alt=media&#x26;token=d98e0b1a-c993-4241-9336-af718b6f3299" alt=""><figcaption></figcaption></figure>

Clicks **Callback URL - Edit**

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FLn3qt0EDHomZDPaz2QLK%2FScreenshot%20at%20Apr%2024%2016-42-54.png?alt=media&#x26;token=43b30e21-0fcb-4af5-a57b-59bac6451600" alt=""><figcaption></figcaption></figure>

&#x20;Fill in:\
Callback URL: **<https://mailing.digitalwallet.cards/whatsapp/webhook/inbound>** \
Verify token: **whatsapp\_bot\_webhook\_verify\_token** \
Click Verify and save.

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2F9DgsKRBJ9ggZDXNPqXOM%2FScreenshot%20at%20Apr%2024%2016-43-39.png?alt=media&#x26;token=428fbaff-0fad-42d3-8b35-3e24bac35218" alt=""><figcaption></figcaption></figure>

Next, select **Webhooks - Manage**

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FF4kRMTbxCHjPn70kMxZ4%2FScreenshot%20at%20Apr%2024%2016-46-57.png?alt=media&#x26;token=c327efd0-abd1-4fd9-9086-5204be6d759a" alt=""><figcaption></figcaption></figure>

Find Messages in the list and enable it. Click Done

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2F78lGG9ETtuCmSKQGfrk8%2FScreenshot%20at%20Apr%2024%2016-47-27.png?alt=media&#x26;token=d7773689-18ce-4be9-98be-a0b15e441803" alt=""><figcaption></figcaption></figure>

The next step is to configure the permanent token. You can find more information at <https://developers.facebook.com/docs/whatsapp/business-management-api/get-started#1--acquire-an-access-token-using-a-system-user-or-facebook-login>.

To do this, you need to select a business manager: go to <https://business.facebook.com/settings/people>.&#x20;

Select the Business Manager you specified in the settings earlier.

Go to **Users -> System Users** and click **Add** (create a user: enter a name and select the Admin role).

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FHLwL2XQKMb04zSckvuqJ%2FScreenshot%20at%20Apr%2024%2017-44-45.png?alt=media&#x26;token=5da5d0f1-e17b-4042-9a50-57a6d1e3fada" alt=""><figcaption></figcaption></figure>

Next, click Generate new token, select our application, select **Token expiration** "**Never**", enable:

1. **business\_management**
2. **catalog\_management**
3. **whatsapp\_business\_management**
4. **whatsapp\_business\_messaging**

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FJt19i53V5fDuBRXO4LyF%2FScreenshot%20at%20Apr%2024%2017-10-02.png?alt=media&#x26;token=8a15ff9c-0c93-47fb-a8d4-56599da5d244" alt="" width="375"><figcaption></figcaption></figure>

Click Generate token. **Save the generated token.**

You also need to go to **Assign assets -> Apps** and enable **Manage app.**

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FV99OA7jTuPCqbx7DBbx8%2FScreenshot%20at%20Apr%2024%2021-02-21.png?alt=media&#x26;token=8b9a0217-e623-4612-9a56-dad8ebd136ff" alt=""><figcaption></figcaption></figure>

Go back to the business account dashboard and enable Live mode. You can also save the data on the screenshot to connect the WhatsApp bot.

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FY7hNaXDqs4wLwmWC6pOL%2FScreenshot%20at%20Apr%2024%2017-17-41.png?alt=media&#x26;token=2ca1f880-cde7-40a7-82f8-fc7b271683ed" alt=""><figcaption></figcaption></figure>

Now connect WhatsApp Bot in your Boomerang account. Go to the mailing list section -> settings <https://app.boomerangme.cards/mailings/settings>.&#x20;

Click connect WhatsApp Bot, enter the token you saved above, sender's phone number, Phone number ID, WhatsApp Business account ID.

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FcguY2z3EZLTqdaezNUIX%2FScreenshot%20at%20Aug%2004%2015-14-55.png?alt=media&#x26;token=6a0bb920-7c51-4b37-8b2d-4e5378db3245" alt=""><figcaption></figcaption></figure>

✅ **Please note** that this is only for loyalty cards. That is, with sub-accounts, you will not be able to set up communication via WhatsApp.

### How to install a card in WhatsApp

Scan the QR code of the card from your mobile phone

This opens the card issuing form in your mobile phone. Here, enter the required details in this case first name and phone number then click ‘Install in WhatsApp’

<p align="center"><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FGu1P7IEs6PjR9atlxyat%2Funknown.png?alt=media&#x26;token=56c5dfb0-3460-4810-8ea1-008a210664da" alt=""></p>

Once the installation is complete and the integration is added to WhatsApp, you will receive a confirmation message indicating that the setup was successful.<br>

<p align="center"><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2F1HXcI7iFY30IqQIQOMVh%2Funknown.png?alt=media&#x26;token=b2cdb69b-2489-4e7e-a556-7c5c0d1314c0" alt=""></p>

When you click on ![](https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FPMNTjhqJlycndsKKB8Oa%2Funknown.png?alt=media\&token=43cd9d09-8939-4d0f-b835-1a5ab990af57)this displays the balance, reward, company name, card expiration date, serial number,etc.

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2F4jsmIZFhXlW5TAFkTmKL%2Fimage.png?alt=media&#x26;token=7f697522-f069-4b42-8ea1-636a5d40b801" alt=""><figcaption></figcaption></figure>

When a customer taps the ![](https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FlMjuKhTn9kNJzNqb4jw5%2Funknown.png?alt=media\&token=39056571-1594-4a14-b122-0fdffbaf0dcb), it simply opens the QR code in fullscreen so the business can scan it.

<p align="center"><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FLqwlclNpdmrsQfcAgAr8%2Funknown.png?alt=media&#x26;token=a347382b-86db-4e47-b9e8-e6ee87387032" alt=""></p>

If you have other cards installed, tapping![](https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2F4Il3W7kiz846H7zVt2A1%2Funknown.png?alt=media\&token=0a52a77d-605b-49d0-98bb-e6f88a9461cf)gives you the option to choose another card.

<p align="center"><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FP7RubxwQzABlLdZZ3r9C%2Funknown.png?alt=media&#x26;token=1fdb2912-76f3-495d-9ab7-50485ca8a567" alt=""></p>

You will be presented with a list of all the cards you’ve installed, allowing you to choose any one of them.

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2FO62oXBrg6ioW6cfjf7Sc%2Fimage.png?alt=media&#x26;token=ff37fac1-2109-481e-bff9-4e6a234b7308" alt=""><figcaption></figcaption></figure>

Once a card is selected, the system will request the information needed for that specific card.

<figure><img src="https://121681468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBfW4nnOu4AysbkbyxNug%2Fuploads%2F38npD3875d45bb16MfAG%2Fimage.png?alt=media&#x26;token=b3f5597f-2ddb-463d-8142-ff88145b6ef3" alt=""><figcaption></figcaption></figure>

<br>
