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
-
Send a POST request to the
will provideendpoint. -
Include valid
targetDepartment(Mongo ID) andtargetAgent(username) in the payload. -
Observe that the message is delivered to the customer via WhatsApp.
-
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.