Genpact Cora Knowledge Center

Support

Message Object Expressions

When you create a message, a message object is created with the message's metadata, which you can use in an expression. To use the current message object in the message body or message subject, use the msg prefix, for example, msg.To.DisplayName

The message object contains the following fields, which you can use in an expression.

  • ActivityInstanceId
  • Body
  • CreatedById
  • Email
  • Important
  • IsRead
  • Subject
  • To (this field refers to the message recipient and has the following sub-fields)
    • CalendarId
    • DateFormat
    • DisplayName
    • Email
    • FirstName
    • LastName
    • UserId
    • UserName
  • Told

Specify recipients' first name in a message

When you send a message to multiple recipients, you can address the message to the recipients by their first name in the message body or message subject.

  1. On the Message tab, select the Calculate Per Recipient check box. If you do not select this option, the msg object is not calculated per recipient and cannot return each recipient's attributes..
  2. In the Subject and/or Body section, type msg.to.DisplayName.


Use the msg object in other activities

To use the msg object in another activity, use the following expression.

<TaskOrMessageActivityName>.(metadata).Tasks.TaskView.(metadata).<message property>