This tutorial explains how to connect a virtual agent to WhatsApp using Tyntec.

This article was originally posted on medium.

All articles on WhatsApp

Within our Cognigy.AI platform, one is able to connect Cognigy resources to the WhatsApp channel by using the REST Endpoint integration.

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 node to do so. However, the WhatsApp user needs to be asked for acceptance before one is allowed to store personal information. 


Comments

0 comments

Please sign in to leave a comment.

Was this article helpful?
0 out of 0 found this helpful