Question

How can I delete a WhatsApp number from the user's profile? From the context panel of your ticket, the phone number shows after the WhatsApp field:

Ticket.png

Answer

From the UI, you cannot remove WhatsApp numbers like other phone numbers. WhatsApp users are identified after contacting Zendesk for the first time and WhatsApp phone numbers are stored as an identity in the back-end. From the end user profile, no phone number will appear, however the WhatsApp number is linked to that user.

URL.pngProfile.png

To remove that number, developers can make use of the API and the User Identities endpoint.

  1. Locate the user_id from your browser after opening the profile from the user you want to edit. It is the long number in the URL :
    URL.png
  2. Follow this end point and build the path below. Replace yousubdomain with your actual subdomain and user_id with the value you found:
    https://yoursubdomain.zendesk.com/api/v2/users/user_id/identities

    The existing identities for that user will appear:

    ID.png

  3. Delete the messaging type using Postman, or any other tool, with a delete request using this path, gather the id to replace entity_id from the previous step, and replace yousubdomain with your subdomain:

    https://yoursubdomain.com/api/v2/users/{user_id}/identities/entity_id.json
  4. After running the API call, you will see this on Postman:

    Postman.png

    Once you delete that identity, the user profile will no longer show the number:

    Final identity.png

Note: This article is provided for instructional purposes only. Zendesk does not support or guarantee the code. Zendesk also can't provide support for third-party technologies such as Postman. Post any issues you have in the comments section or try searching for a solution online.

For more information, see these articles:

  • Why are some users not correctly identified when they message in through WhatsApp?
  • User Identities
  • Adding WhatsApp channels to the Agent Workspace
Powered by Zendesk