WhatsApp integration requires collecting and processing users’ phone numbers and WhatsApp opt-ins. With the type: 'user' method, you can pass this information to Insider One. This allows Insider One to identify and unify WhatsApp users correctly.
This practice ensures data consistency across all user identification and unification scenarios.
If you want to collect leads directly from your website, you should implement Insider Web SDK to pass the opt-in information to Insider One. Instead, you can use Insider One's Lead Collection templates.
The following describes how to configure WhatsApp integration using the Insider Queue array via Insider Web SDK.
Sample code for WhatsApp User Push
window.InsiderQueue.push({
type: 'user',
value: {
"uuid": "INS123",
"gdpr_optin": true,
"name": "John",
"surname": "Doe",
"username": "jdoe",
"phone_number": "+120394879878",
"language": "en_US",
"whatsapp_optin": true,
"custom": {
"user_lifetime": 23,
"membership_type": "Silver"
}
}
});Insider Queue Array
The code of Insider Queue Array is as follows:
window.InsiderQueue = window.InsiderQueue || [];Code for user push must be added under the code for InsiderQueue.
User Push for WhatsApp: Properties, definitions, and code
The type: 'user' method includes the user properties. This method can be implemented in all cases, including when the user is not logged in. When the user is not logged in, only available properties will be filled in; keys without values will not be added.
Attribute | Description | Data Type | Sample Value | Required |
|---|---|---|---|---|
gender | Gender of the user. The values can be F or M. | String | M | No |
birthday | Birthday of the user | Datetime | 1990-01-14 | No |
name | Name of the user | String | John | No |
surname | Surname of the user | String | Doe | No |
age | Age of the user | Number | 33 | No |
Email address of the user | String | jdoe@useinsider.com | No | |
email_optin | Indicates if the user has opted in for emails | Boolean | true | No |
phone_number | Phone number of the user in E.164 format | String | +120394879878 | No |
sms_optin | Indicates if the user has opted in for SMS | Boolean | true | No |
language | Language of the user | String | en_US | No |
city | City of the user | String | Jakarta | No |
country | Country of the user | String | Indonesia | No |
uuid | Unique user ID of the user | String | INS123 | No |
gdpr_optin | Indicates if the user has allowed cookies | Boolean | true | No |
whatsapp_optin | Indicates if the user has opted in for WhatsApp messages | Boolean | false | No |
custom | Object for custom user attributes | Object | {"membership": "Silver"} | No |
If your company obtains your users' consent in compliance with the local regulations, make sure to pass the GDPR opt-in field to Insider One. If you want to stop collecting and processing the data of an identified user, GDPR opt-in field should have the false value. Insider One cannot be held liable if these obligations are not fulfilled and reserves the right to seek compensation from your company.
When a user opts out, they cannot be opted back in through any external method. For example, using external sources such as CSV files or the Upsert API cannot reactivate the user. Once a user has opted out, receiving notifications again can occur only at the user’s initiative.
Once the user push is integrated, you can provide Insider One with the required WhatsApp fields (phone_number, whatsapp_optin, gdpr_optin) whenever a user logs in.
whatsapp_optin must be true for Insider One to send messages to your customers over WhatsApp.
If you passed the user’s UUID information while implementing the Insider Web SDK, ensure the information is the same for both.
Checklist for any page where this method is present
window.InsiderQueue.user returns on the page.
All properties are filled in when the user logs in.