> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WhatsApp

> Connect Alumio to WhatsApp.

## Extra information

Connector package documentation:
System documentation:

**Whatsapp**

**Connector Package Documentation**

**Table of Contents**

[1 Setting up HTTP Client Whatsapp. 2](#_Toc148352260)

[1.1 Steps. 2](#_Toc148352261)

[2 Subscribing to Entities from Whatsapp. 2](#_Toc148352262)

[2.1 Steps. 2](#_Toc148352263)

[2.2 Select the Whatsapp HTTP Client to use. General Concept. 2](#_Toc148352264)

[3 Publishing Entity to Whatsapp. 5](#_Toc148352265)

[3.1 Steps. 5](#_Toc148352266)

[3.2 General Concept. 5](#_Toc148352267)

# Setting up HTTP Client Whatsapp

## Steps

1. In Alumio Dashboard, go to Clients > HTTPS Client. Create a new HTTP Client and select Whatsapp HTTP Client as the prototype of the HTTP Client.
2. Fill in the Bearer Token according to your Whatsapp Cloud API Account.
3. Press Save Button on the Top-Right.

# Subscribing to Entities from WhatsApp

## Steps

1. Go to Connections -> Incoming and create a new incoming configuration and select Whatsapp Subscriber as the subscriber.
2. Select the Entity you want to subscribe to from WhatsApp.
3. Add any request parameters needed to subscribe to the entity.
4. You can optionally add a transformer to transform the request parameters into something you need.

## Select the WhatsApp HTTP Client to use. General Concept

We follow WhatsApp documentation on building this connector so you can easily use the connector based on WhatsApp API Reference.

**Entity**
It’s the entity you want to subscribe from WhatsApp. Please refer to the entities in Management APIs from the WhatsApp API Reference page.

**Request Parameters**
These are the parameters you can provide to get the needed entity based on WhatsApp API Reference. Please look at the example below on how to fill the Request Parameters field when subscribing Single Request entity

<img src="https://mintcdn.com/alumio/HrSEhUofsj3bT3jH/images/connectors/whatsapp-01.png?fit=max&auto=format&n=HrSEhUofsj3bT3jH&q=85&s=501d77e0e9a4318e81dd779688e881e0" alt="WhatsApp connector screenshot 1" width="640" height="321" data-path="images/connectors/whatsapp-01.png" />

<img src="https://mintcdn.com/alumio/HrSEhUofsj3bT3jH/images/connectors/whatsapp-02.png?fit=max&auto=format&n=HrSEhUofsj3bT3jH&q=85&s=0b5d208db49f56346aaaf960d4bd414a" alt="WhatsApp connector screenshot 2" width="492" height="236" data-path="images/connectors/whatsapp-02.png" />

That’s why we need to define the **PHONE\_NUMBER\_ID** property inside the path property in the Request Parameters field. The properties inside **query** parameters will be parsed as query parameters. Here is the final URL that will be called when using such a Request Parameters field.

/xxxx/whatsapp\_business\_profile

**Input Transformer**
Any transformers set here will be executed after the Request Parameters are loaded. So, you basically can add any transformer to provide and transform the request parameters into anything you need either as path parameters and/or as query parameters of an entity.

**HTTP Client**
It’s the HTTP Client configuration or prototype you will use to access WhatsApp.

# Publishing Entity to Whatsapp

## Steps

1. Go to Connections -> Outgoing, create a new outgoing configuration, and select Whatsapp Publisher as the publisher.
2. Select the action that you want the publisher to do with the data.
3. Select the Whatsapp entity you want the data to be published to.
4. Select the HTTP Client to use.
   <img src="https://mintcdn.com/alumio/HrSEhUofsj3bT3jH/images/connectors/whatsapp-03.png?fit=max&auto=format&n=HrSEhUofsj3bT3jH&q=85&s=b4b26ef73ff1e0de7d7c066e03975083" alt="WhatsApp connector screenshot 3" width="623" height="250" data-path="images/connectors/whatsapp-03.png" />

## General Concept

Like the subscriber, the publisher has similar methods on how to use it. The difference is the payload that will be submitted by the publisher originating from the data (from routes, from transformers in outgoing configuration).

**Method**
Currently, we support POST, PUT, and DELETE methods for submitting data to Whatsapp Cloud API.

**Entity**
We support publishing to most Whatsapp endpoints but not with publishing binary files at the moment. Please refer to the entities in Management APIs from the Whatsapp API Reference page. Based on the documentation, some endpoints may need one or more path parameters.

For endpoints that require object as the request payload, please look at the example below. For example, we want to Send Messages. Please select “POST” as the action and “Messages - Send” as the entity of the publisher.

<img src="https://mintcdn.com/alumio/HrSEhUofsj3bT3jH/images/connectors/whatsapp-04.png?fit=max&auto=format&n=HrSEhUofsj3bT3jH&q=85&s=9a0a3aea93cfdb0bb92cd2d59c2f4f03" alt="WhatsApp connector screenshot 4" width="638" height="254" data-path="images/connectors/whatsapp-04.png" />

<img src="https://mintcdn.com/alumio/HrSEhUofsj3bT3jH/images/connectors/whatsapp-05.png?fit=max&auto=format&n=HrSEhUofsj3bT3jH&q=85&s=28e343d164c62c187a7916d4a5b24a2d" alt="WhatsApp connector screenshot 5" width="616" height="293" data-path="images/connectors/whatsapp-05.png" />

You can put the payload you want to send to WhatsApp into the payload property in the data. Here is an example of the Possible Response after Creation.

<img src="https://mintcdn.com/alumio/HrSEhUofsj3bT3jH/images/connectors/whatsapp-06.png?fit=max&auto=format&n=HrSEhUofsj3bT3jH&q=85&s=8836d32ad994b7dcfc6565b033bbff35" alt="WhatsApp connector screenshot 6" width="594" height="239" data-path="images/connectors/whatsapp-06.png" />

Alumio will send an API request to Whatsapp with URL /xxxx/messages

**HTTP Client**
It’s the HTTP Client configuration or prototype you will use to access WhatsApp.
