Notifying a user about a comment to their message in the feed
Example
Create the following business process: when adding a new comment to the message in the feed, an email is sent to the author of this message.
Business process diagram (Fig. 1) elements:
1.Incoming signal for adding a message comment – when a new comment is added, the signal is activated and the business process is started.
2.Reading the id of the added comment – reading the new comment data for use in the email template.
3.Reading the parent message - reading the data of the main message for use in the email template.
4.Sending email – an email to a contact with the selected text and new comment data.
Place on the schema the [Signal] element of the [Initial events] group — "Comment added". The element will be activated when a comment is added to the feed. Set up the signal parameters:
1.In the [Object] field, set "Message/comment".
2.In the [What event should happen?] field, select "Add record".
3.In the [Added record must correspond to conditions] field, select "Parent message populated.
Add two [Read data] elements of the [System actions] group.
The "Read comment data" element will read data from the added record in the feed. Set up the element parameters:
1.In the [Which data read mode to use?] field, select “Read the first record in the selection“.
2.In the [Which object to read data from?] field, select ”Message/comment”.
3.In the [How to filter records?] area, set the filter “Id = Comment added. Unique record Id”. To do this, click <Add condition>, select the “Id” column, then in the appeared menu, select [Compare with parameter]. In the opened window, select the [Record ID] parameter of the "Comment added" element.
4.In the [Which column values to read?], select "All columns".
The "Read primary message" element will read data of the message to which a comment has been left. Set up the element parameters:
1.In the [Which data read mode to use?] field, select “Read the first record in the selection“.
2.In the [Which object to read data from?] field, select ”Message/comment”.
3.In the [How to filter records] area, set up filter "id = Read comment data.First element of the resulting collection.Parent message". To do this, click <Add condition>, select the “Id” column, then in the appeared menu, select [Compare with parameter]. In the opened window, select the [Parent message] parameter of the "read comment data" element.
4.In the [Which column values to read?], select "All columns".
Add the “Send e-mail” element of the [System actions] group and set the following parameters:
1.In the [From] field, specify the return address in the message. To do this, select [Select from lookup] in the parameter value menu, then in the [Synchronization with mailbox settings] lookup, select one of the configured email accounts.
2.In the [To] field, specify the email of the recipient. In the parameter value menu, click the [Contact]>[Process parameter], select the [Read contact data] element, and the [Email] parameter.
3.In the [What is the message?] field select “Template message”.
4.Select the existing template in the [Template message] field. The [Subject] field is populated automatically.
5.Select “Send email automatically” in the [How is the message sent?] field.
After creating the process elements, connect each element with the next one by dragging the element in the upper right corner of the selected process element.
Save the created business process.
See also
•Notifying employees by email when a lead has been received via a landing page
•Notifying an employee when they become an activity participant
•Reallocating rights to read and modify records if an owner is changed