How to save a contact's WhatsApp number Take Blip January 08, 2021 16:04 Updated Getting and keeping your contact information up to date can be very important for any business. The WhatsApp channel already brings some information by default saved in the bot contacts: Name and Phone. However, the phone number is saved in the form of a User Identifier, which can cause some confusion. If you do not want to have to ask for your phone number through the conversational flow, but instead take advantage of the information already sent by the channel, you will need to follow some steps: Create a Script and Store the data in the Contact. Creating the Script This is a script that will receive the user's identifier and collect only the user's phone number. This number will be stored in a variable called Telephone, which will later be stored in the contact's information. To start, create a script (it can be in the first block of the bot) and put the variable contact.identity, which is the variable that contains the user identifier, in the input variables of the Script. It is in the following format: ############@wa.gw.msging.net Then copy and paste, replacing the script with the one below: function run (identifier) { user phone var = identifier.split ("@") [0]; return phoneUser; } Notice that the script receives an identifier and returns a user phone. Remember to save the return in a variable (phoneUser, for example), because it is with it that we will save the phone in the contact information. Storing the number in the Contact Now, with the phone number saved in the userPhone variable from the step above, we will create a Define Contact action. Click here if you need to know more details about this action and its settings. Below the Run Script Action, create a Define Contact action. In the action, define in the Telephone field the value of the variable telephoneUser, inside the braces ({{telephoneUser}}) At the end, we will have the saved WhatsApp number contact. Related articles How to save information from a user How to retrieve contact information in a subbot How to send WhatsApp notifications through Blip API How to create and approve a Message Template on WhatsApp How to manage a distribution list to send WhatsApp notifications