For the complete documentation index, see llms.txt. This page is also available as Markdown.

Match replies to your records

Work out which order, ticket or person a customer's reply belongs to, without relying on their phone number.

When a customer replies, work out which order, ticket or person in your system the reply belongs to — even when WhatsApp does not tell you their phone number.

The message:appUser event (a customer's message) may not include the customer's phone number. This is not an integration failure. Meta is introducing WhatsApp usernames and stronger privacy, and depending on the customer's settings and Meta's rollout, the number may or may not be present. This affects WhatsApp integrations with every provider, not only Channel360. WhatsApp usernames and BSUID has the details.

Keep the phone number in your own system, and link it to Channel360's IDs when you send. Do not rely on the reply to carry the number.

Steps

1. Store your own record before sending

Your system already knows who it is messaging and why. Store that, with the phone number, before you send:

{
  "internalCustomerId": "customer_12345",
  "destinationPhoneNumber": "+27821234567",
  "notificationPurpose": "sales_rep_assignment",
  "status": "notification_sent"
}

2. Send the notification and keep its ID

Send the notification to that phone number. Store the notification._id from the 201 response on the same record.

3. When the delivery event arrives, store the IDs it carries

The notification:delivery:channel and notification:delivery:user events carry Channel360's IDs for this customer. Store them on the same record:

Field in the event
Store as
What it is

notification._id

notificationId

The ID returned when you sent. Use it to find your record.

destination.destinationId

—

The phone number you sent to. Also usable to find your record.

matchResult.appUser._id

appUserId

Channel360's ID for this customer. You need it to reply.

matchResult.conversation._id

conversationId

Channel360's ID for the message thread with this customer.

Your record now looks like this:

4. When the customer replies, look up the record by Channel360's IDs

When a message:appUser event arrives, find your record using, in order of preference:

  1. conversation._id

  2. appUser._id

  3. notification._id, where the event includes it

This finds the right customer, process or notification even when the event has no phone number.

Why this approach

It keeps customer identification, reply matching, reporting and notification tracking working without depending on the phone number being present in message:appUser.

A webhook setting exists that can include a client object with the number on some events. It should not be treated as the long-term pattern. The safer approach is to keep the phone number in your own system and bind it to the appUser, conversation and notification IDs from the delivery event.

Check it worked

Send yourself a notification, reply from your phone, and confirm your handler finds the original record from conversation._id without reading any phone number.

Next

WhatsApp usernames and BSUIDIdentifiers: which ID is which

Last updated

Was this helpful?