Available operations
Contact Name and Labels
By providing a contact object with a phone number as the unique identifier, a name, and a list of labels, we keep the name updated and we can assign these labels to the contact in Polser. This method is useful for customers that maintain their contacts organized with labels in their CRM.
{
"contact": {
"phone": "+44XXXXXXXXX",
"name": "John Smith",
"labels": "subscriber, trialing"
},
"overrideLabels": "true",
"inviteNewContacts": "true"
}
There are two modes for this operation:
overrideLabels set to true - tells Polser to remove any other label added before, and just keep the ones provided in the incoming contact object. This is useful for customers who use another system as their source of truth for contact labels.
overrideLabels set to false or non-existant - Polser will add the incoming labels to the contact without removing any existing ones that it had before.
You can also use the parameter inviteNewContacts to send out a whatsapp message to invite users who are not in Polser yet.
Contact enhanced data
Customers can enrich a Polser contact with relevant data coming from other systems. As you serve your customers, it may be very useful to have at hand additional data to resolve their queries. This data will be present in their profile as seen below:

To include additional data in a contact we need to start with the contact object again with the phone as their unique identifier. The contact object must have a field called enhanced_data.
{
"contact": {
"phone": "+44XXXXXXXXX",
"name": "John Smith",
"enhanced_data": {
"Outstanding payments": [
{
"text": "INV-2812381_456",
"description": "Since 13 Aug 2024",
"link": "www.google.com"
}
],
"Other data": [
{
"text": "INV-2812381_456",
"description": "Since 13 Aug 2024",
"link": "www.google.com"
}
]
}
}
}
The enhanced data object must be a list of JSON objects separated by a comma. The name of this objects will be presented as sections in the contact's profile page (see Salesforce section in the screenshot above). These objects accept three fields:

Delete a contact
Customers can completely delete contacts in Polser through the webhook. In this case, we don't need to provide a contact object, instead, the object only needs to contain the data point delete_contact with a phone number.
{
"delete_contact": "+44XXXXXXXXX"
}
Polser will delete any conversation, message, and contact record from its database. You can't provide a list of contacts to be deleted as each webhook execution only accepts a single phone number to be deleted. Warning: there is no way to recover this data so be mindful when using this operation.
Assign a conversation to an agent
Polser allows you to automatically assign conversations to one of your agents through the webhook. A contact object must be provided for this operation, followed by the source phone with which the contact had a conversation, and finished with the assignee field with the email of a valid Polser user in your account.
{
"contact": {
"phone": "+44XXXXXXXXX"
},
"source_phone": "+44XXXXXXXX",
"assignee": "agent12@mycompany.com"
}
This method will find any conversation tied to this phone number and assign it to the agent you provide.
Trigger a Meta Flow
The webhook allows customers to trigger a Meta flow. For this to work, you need to have one Response of type Form with an associated Meta flow.
{
"flow_data": {
"source_phone": "+34XXXXXXXXX",
"phone": "+44XXXXXXXXX",
"name": "John Doe",
"flow_name": "flow_to_be_triggered"
}
}
You only need to provide the phone number, the person's name, and the flow you want to trigger, and Polser will do the rest.
Last updated
Was this helpful?