Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This node needs a session, sender, receiver, topic, and message to transmit a message. There are three actions you can choose from:

Table of Contents
excludeRelated

Create

Creates a new message to one or more recipients.

...

  • To Users. Required. The User ID of the message receiver. To send the message to multiple users, specify comma-separated User IDs. You can either manually enter the User ID or use a mustache tag to dynamically input the User ID. For example:

    Code Block
    {{msg.payload.recipient}}
  • Topic. Optional. Enter a topic name for this message or use a mustache tag.

  • Message. Required. Enter the message that is sent to the user. The message can contain session attributes using mustache tags. For example:

    Code Block
    Hi {{session.user.firstName}}, Welcome Onboard.

Update

Updates a conversation that you already had with one or more recipients.

...

  • Conversation ID. Enter the ID of the conversation that you want to update. If there is no msg.payload.conversationId in input payload, the node creates a new conversation with recipients mentioned in the input payload(session attribute).

Read

Retrieves a logged-in user’s previous conversations from the database.

...

  • Limit. Enter the number of conversations to be retrieved. (The latest conversation is retrieved first.)

...

See, How to use Messaging Manager node in Experience Designer

...

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

...

The sample payload format for Create action

Code Block
//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

Filter by label (Content by label)
showLabelsfalse
max5
showSpacefalse
sorttitle
cqllabel = "experience-designer" and text ~ "messaging manager"