How to Use the Assign Team Member to Chat API
In DoubleTick, every incoming conversation can be assigned to a specific team member so the right person is responsible for responding. When a chat comes in and needs to go to a particular agent, you can assign it manually from the interface, or you can use DoubleTick's Assign Team Member to Chat API to do it automatically as part of a workflow or bot. This article walks you through both options.
What the Assign Team Member to Chat API Does
For teams that need to assign conversations automatically, DoubleTick provides the Assign Team Member to Chat API. This is designed for technical use cases such as routing a conversation to the right agent the moment a customer completes a certain step in a bot flow, or building assignment logic into a backend system your team manages.
In simple terms, the API sends an instruction to DoubleTick saying: assign this customer's conversation to this team member. DoubleTick then processes the request and makes the assignment. You can also use the reassign option to override an existing assignment if the conversation is already with someone else.
How to Use the Assign Team Member to Chat API

The full API reference is available at the DoubleTick documentation portal.
Assign Team Member to Chat API Documentation
To make the API work, you need to provide two phone numbers and one API key.
Enter the customer's phone number in the
customerPhoneNumberfield. This is the number of the person whose chat you want to assign.Enter the team member's phone number in the
assignedUserPhoneNumberfield. This is the number of the agent you want to assign the conversation to.Both numbers must include the country code.
If the chat is already assigned to someone and you want to override that, set the reassign field to true. If you leave this out or set it to false, the API will not override an existing assignment.
If your DoubleTick account is connected to more than one WhatsApp number, enter the relevant number in the wabaNumber field along with the country code.
To find your API key, go to Settings inside DoubleTick, open the Developer Documentation section, and copy the key displayed there. Paste it into the header field in the API call.
Testing the API
Once all values are filled in, click the Try It button on the documentation page to test the call.
If the request is successful, you will receive a 200 response, confirming that the chat has been assigned to the team member whose number you entered.
Adding the Assign Team Member API to a Bot or Workflow

If you want the assignment to happen automatically at a certain point in a conversation, you can add this API as an action inside DoubleTick's Bot Studio.
On the API documentation page, generate the cURL for your API call and copy it.
Open the bot in Bot Studio where you want to add this step.
Add a new action component and select Call API from the list.
Connect this component to whichever step should trigger the assignment.
In the Call API component, click the API dropdown and select Create New API.
Choose Import from cURL, paste the cURL you copied, and give the API a name such as Assign Team Member.
Save the API.
Once saved, the component will show all the headers and body parameters already filled in from your cURL. From this point, whenever the bot reaches that step during a live conversation, it will automatically call the API and assign the chat to the specified team member.
Confirming the Chat Has Been Assigned

After the API is called, you can verify that it worked by opening the relevant conversation inside DoubleTick.
If the request was successful, you will see the assigned team member's name reflected in the chat, confirming that the assignment went through successfully.
Summary
The Assign Team Member to Chat API gives your team the ability to route conversations to the right agent automatically, whether that is triggered by a bot flow, a backend system, or a bulk operation. If you run into any issues while setting this up, reach out to the DoubleTick support team for assistance.
Last updated