Bot user API

Accessing bot user information or using UChat API through coding can be difficult for many users. But with our simple method, you can use API endpoints effortlessly, no coding required.

Accessing API Endpoints


Navigate to the Flow Builder. Select an action block and choose "Advanced actions." Explore the "Bot User API" options.

 

Video Tutorials

https://www.youtube.com/watch?v=Psdr4oC0SqU

Available Actions

  1. List all tags

  2. Check if the user has a certain tag

  3. Add or remove tags

  4. List subscribed sequences

  5. Retrieve shopping cart details

  6. List shop orders

  7. List chat text messages

List Tags


For testing purposes, you can retrieve the list of all tags using the User_NS. For permanent storage, you can utilise the Username, First Name, and Last Name system fields.

Check has Tag


You can check whether a user has a tag or not by entering the User NS and Tag Ns.

Where to Find Tag Ns:


Navigate to Contents -> Tag -> Move the Cursor to the Tag you will see the Tag Ns.

Add Tag


To add a tag to the user, simply select the Tag NS.

Remove Tags


The process for removing tags is similar to adding tags. Simply insert the Tag NS to remove the tags.


Remove All tags


It's also the same. You don't need to input any value; it will automatically remove all the tags from the user.

 

List Subscribed Sequences


By inserting the user's username or first name, you can retrieve the list of subscribed sequences for testing purposes.

 

List of Cart Items


You will receive a list of all items currently in the cart.

 

List Shop Order


You will receive a list of all Orders placed by the user.

 

List Chat Messages


You can access the chat history of the last 50 messages. You have the option to include agent messages, and bot messages, and choose the format (default, text, or text with time) according to your preference.

 

Remove All Smart Delays

Description

The Remove All Smart Delays action clears all smart delay actions associated with a specific bot user. This feature is useful for instantly removing any queued delays, allowing for immediate bot responses.

How to Remove All Smart Delays

 

Go to the Flow, Select Action Node and choose Advance Action. Then select the Bot User API option 

 

Now Select the option Remove All Smart Delays action.

Now you have to add User NS of the User you want to remove all smart delays or You can use a System Fields which contains User Ns.

In the Sample Data you will see status: "ok" and delete: "0" which means all smart delay have been removed Successfully.

 

Use Cases

  • Instant Reset: Instantly remove all pending delays for a user to improve response times.

Response

  • Success: Returns a 200 OK status with a message confirming all smart delays have been removed.

Error: Returns an appropriate error code if the user Ns is not found or if the request fails.

 

Remove All Scheduled Messages

Description

The Remove All Scheduled Messages action allows for the deletion of all scheduled messages queued for a particular bot user. This action ensures that no further scheduled messages are sent to the user, enabling quick modifications in user interaction plans.

How to Remove All Scheduled Messages

Go to the Flow, Select Action Node and choose Advance Action. Then select the Bot User API option.

Now Select the option Remove All Scheduled Messages action

 

Now you have to add UserNS of the User you want to remove all Scheduled Messages.

In the Sample Data you will see status: "ok" and delete: "0" which means all Scheduled Messages have been removed Successfully 

 

Use Cases

  • Bulk Message Removal: Quickly clear all pending messages to prevent redundant or outdated information from being sent.

  • Precise Flow Adjustment: Modify scheduled messaging plans by removing all queued messages for immediate updates to user interaction.

Response

  • Success: Returns a 200 OK status with a message confirming all scheduled messages have been removed.

  • Error: Returns an appropriate error code if the user Ns is not found or if the request fails.

 

Find Bot Users by Phone

Search users via bot or workspace. Input the user's phone number to locate their profile.

Find Bot Users by Email

Search users via bot or workspace using their email address.

Find Bot Users by User ID

Locate a user across the bot or workspace using their unique user ID.

Merge Bot User

Merge a secondary bot user into a primary (current) bot user.

  • All relevant data from the secondary user will be transferred to the primary user.

  • You can delete the secondary user after merging or retain their profile.

List Labels

Retrieve all labels assigned to a specific user.

 

Check Has Label

Check whether a specific label is assigned to a user. Enter the label name to verify if it is associated with the user.

Add Label

Provide the label name and assign it to the target user.

Remove Label

Remove a specific label from a user. Input the label name to disassociate it from the user.

Remove All Labels

Remove all labels assigned to a user.

 

Get Chat Message

Retrieve a specific chat message using its message ID (MID).

List Closing Notes

Retrieve all closing notes associated with a user.

  •