Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The following image shows a sample flow with the Messaging Manager node.

The sample payload format for Create action

//currentUserId is the sender User ID
var currentUserId = "<senderUserId>";
msg.payload = {session:{user:{currentUserId : currentUserId}}};
msg.payload.receipient = "<recipient1>, <recipient2>";
return msg;

The sample payload format for Update action

//currentUserId is the sender User ID
var currentUserId = "<senderUserId>";
msg.payload.conversationId = "<targetConversationId>";
msg.payload = {session:{user:{currentUserId : currentUserId}}};
return msg;

Output

The output of this node is available under msg.payload.conversationData for post-processing the response.

In the previous example, when you trigger the intent, a custom message is sent to the recipient’s engage inbox from your login.

When you change the action to Update, the updated message is sent to the recipient.

When the action is set to Read, the node retrieves the most recent specified number of conversations.

From the output payload, you can find the read status of a message. For example:

  • msg.payload.conversationData.conversations[#].users[#].read” will have the status as “true” or “false” suggesting the message is “read by the recipient” or “not read by the recipient” respectively.

  • # is the number that depends on the Limit number. If the Limit number is 10, then # can take values between 0 and 9.

Related Articles

  • No labels