# Tyntec: Connecting to WhatsApp

**Cognigy Support**  
October 24, 2022 12:06

This tutorial explains how to connect a virtual agent to WhatsApp using [Tyntec](https://www.tyntec.com/whatsapp-business-api).

This article was originally posted on [medium](https://medium.com/cognigyai/connect-whatsapp-to-cognigy-ai-aa40d465928e).

**WhatsApp Profiles**  
Since every WhatsApp user has their own profile, the included information can be used in a virtual agent in order to provide a more personalized user experience.

## Get Profile Data  
The `WhatsApp Profile Data` exposes a contact's profile information, such as their name and mobile phone number, in your Flow. You can access this profile information in _input.data_ and _input.data.whatsapp_ in your Flow. The table below shows some common information you will find in this object.

| Key                     | Description                                                                 |
|------------------------|-----------------------------------------------------------------------------|
| `messageId`           | The internal ID of the sent message.                                       |
| `channel`             | Is "whatsapp" in this case.                                              |
| `from`                | The WhatsApp user's mobile phone number. (e.g. 4915142326635)            |
| `to`                  | The WhatsApp for Business mobile phone number that is used to send messages in Cognigy.AI. |
| `receivedAt`          | When the message arrived at Tyntec (ISO-Date).                           |
| `content`             | Contains the `contentType` and `text` of the message. This information is not important, since the incoming text message is stored under `input.text` in Cognigy. |
| `event`               | Is "MoMessage" when the user sent a message back to Cognigy.            |
| `whatsapp.senderName` | The WhatsApp user's name they configured in the WhatsApp settings.       |
| `timestamp`           | The ISO-Date of the incoming message.                                     |

## Update Contact Profiles  
In order to store the profile information permanently, one could use the [**UpdateProfile**](https://docs.cognigy.com/docs/update-profile) node to do so. However, the WhatsApp user needs to be asked for acceptance before one is allowed to store personal information.

### Endpoints & Channels  
- [Azure Bot Services: Advanced Deployment with SSO (Microsoft Teams): SSO and Graph API Nodes](https://support.cognigy.com/hc/en-us/articles/6422300559388-Azure-Bot-Services-Advanced-Deployment-with-SSO-Microsoft-Teams-SSO-and-Graph-API-Nodes)
- [Azure Bot Services: Advanced Deployment with SSO (Microsoft Teams): Apps Developer Portal](https://support.cognigy.com/hc/en-us/articles/6422298661404-Azure-Bot-Services-Advanced-Deployment-with-SSO-Microsoft-Teams-Apps-Developer-Portal)
- [Azure Bot Services: Advanced Deployment with SSO (Microsoft Teams): Azure Portal](https://support.cognigy.com/hc/en-us/articles/6422296629404-Azure-Bot-Services-Advanced-Deployment-with-SSO-Microsoft-Teams-Azure-Portal)
- [Azure Bot Services: Advanced Deployment with SSO (Microsoft Teams): Azure Active Directory Portal](https://support.cognigy.com/hc/en-us/articles/6422293904540-Azure-Bot-Services-Advanced-Deployment-with-SSO-Microsoft-Teams-Azure-Active-Directory-Portal)
- [Azure Bot Services: Advanced Deployment with SSO (Microsoft Teams): Intro](https://support.cognigy.com/hc/en-us/articles/6417377133596-Azure-Bot-Services-Advanced-Deployment-with-SSO-Microsoft-Teams-Intro)
- [Amazon Connect: Intro](https://support.cognigy.com/hc/en-us/articles/6229662732444-Amazon-Connect-Intro)
- [Amazon Connect: Setup Amazon Connect](https://support.cognigy.com/hc/en-us/articles/6229664156060-Amazon-Connect-Setup-Amazon-Connect)
- [Amazon Connect: Control Amazon Connect from Cognigy.AI](https://support.cognigy.com/hc/en-us/articles/6229683335196-Amazon-Connect-Control-Amazon-Connect-from-Cognigy-AI)
- [Amazon Connect: Enable SSML replies from Cognigy.AI](https://support.cognigy.com/hc/en-us/articles/6229684421916-Amazon-Connect-Enable-SSML-replies-from-Cognigy-AI)
- [Amazon Lex: Setup AWS Lambda (Amazon Lex NLU)](https://support.cognigy.com/hc/en-us/articles/6229644597020-Amazon-Lex-Setup-AWS-Lambda-Amazon-Lex-NLU)
