Rocket Chat and WhatsApp Routing

We are experiencing a critical routing failure with the WhatsApp Cloud App (v3.0.1). Despite sending the correct targetDepartment and targetAgent via the api:templateMessage:post endpoint, the app is failing to map these to the resulting Rocket.Chat room.

As a result, messages are falling back to Global Auto-Selection and being assigned to random agents/departments instead of the targeted store.

Technical Environment

  • Rocket.Chat Server Version: [Insert your version, e.g., 6.x]

  • WhatsApp Cloud App Version: 3.0.1

  • Routing Method: Auto-Selection (and tested with Manual Selection)

Steps to Reproduce

  1. Send a POST request to the will provide endpoint.

  2. Include valid targetDepartment (Mongo ID) and targetAgent (username) in the payload.

  3. Observe that the message is delivered to the customer via WhatsApp.

  4. Observe that the new Omnichannel room created in Rocket.Chat has no department assigned and ignores the target agent, appearing in the general queue.

Evidence & Logs

We have verified via the App Logs that the payload is being received correctly by the App Bridge, but the data is lost before room creation.

Payload Sent:

JSON

{
  "phoneNumbers": ["will provide"],
  "connectedWhatsAppNo": "will provide",
  "targetAgent": "will provide",
  "targetDepartment": "will provide",
  "template": {
    "namespace": "will provide",
    "name": "glasses_ready_1",
    "language": { "code": "en", "policy": "deterministic" }
  }
}

App Log Entry (api:templateMessage:post): The log confirms the content block contains the correct IDs: "targetDepartment": "will provide" "targetAgent": "will provide"

Attempted Fixes

  • Tested using Department Name (String) instead of Mongo ID.

  • Verified that the agent exists and is assigned exclusively to the target department.

  • Set routing to Manual Selection; rooms still appear with “No Department”.

  • Verified there are no overlapping “Contact Manager” settings for the test numbers.

Requested Assistance

Please confirm if version 3.0.1 of the WhatsApp Cloud App has a known bug regarding the mapping of targetDepartment from the template API to the Livechat Room object, and provide a workaround or fix.

The answer is?

You need to provide a whole lot more info on your server or no one can help.

The version for the server is 8.0.1

When I said a whole more info I meant something like this:

Note if you have a paid licence please open a ticket.

Either way a full background report will help, especially history/upgrade paths etc.