Replying to a Kaizala message or action

banner

In this post, I will be introducing the replyToReferenceId property that enables you to reply to a message / action (attachment, custom card, image, etc.) on Kaizala group. This is required when you want to have a threaded conversation using API [or] bot scenario where you want to reply to a specific user query.

For this example, will start with sending a message to get a reference id and will subsequently use this reference id to send a reply. If you are new to Kaizala APIs, would suggest you go through the post – Getting started with Kaizala APIs.

Send message to a subscriber

For this example, I will send a message to a subscriber in a managed hub and spoke group using the /messages endpoint directed to a subscriber. Refer below screenshot for an example. The response on success will return a referenceId – cache this for the next step.

send message to subscriber

Reply to the message

To reply to a message (or action), you will need to add an additional replyToReferenceId field in the request body which will have the reference id from above. Below screenshot has the example.

reply to subscriber message

Hope that was helpful in allowing you to reply to a message / action on Kaizala. Please note, if you are replying to a message that was directed to a subscriber(s), the reply action / API call also needs to carry that subscribers list (as shown above).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s