Send different messages based on event trigger

Not Yet Reviewed

We are using xMatters for on-call notification triggered by email or by form via the xMatters app.  I would like to include the name of the initiator of a message or event in the body of the message so the user being notified knows who is contacting him/her.  If the initiator is an xmatters user, i want to use the sender.  If the initiator is a non-xmatters user who initiated the notification by email, I want to use the email address of the person who sent the email.  I have built the workflow for email trigger, and found info on how to capture the email address of the requestor.  However, I cannot find a way to add conditional logic to the message to send either the sender name OR the email address in the notification message depending on how the event was triggered.

A. If event is triggered via email, then the message should contain the email address of the person who sent the email to xmatters (I have this one working)

OR

B. If event is triggered by an xmatters user using the xmatters app, the message should contain the name of the sending user.

I have not found a way to create alternate versions of a message to allow me to include one field or the other.  

I need to add that I am overriding the Sender field with the "name" of our on-call service so cannot rely upon that field in the xmatters app notification to identify the sending user.

The reason I cannot simply create a message that includes both the sender and the email address field is that when an event is triggered by email the sender field is the user who's account is in the Authenticating user field, and not the actual requester.

Thanks for any help or ideas!

0

Comments

2 comments
Date Votes

Please sign in to leave a comment.

  • Hi David,

    My first thought would be to have different forms in the workflow that get triggered depending on being initiated via e-mail or via the mobile app or web UI. You can hide the e-mail initiated form from the mobile app so it can only be used when invoked via the appropriate channel. Then you can cater what to populate in an "initiated by" section - the e-mail when invoked that way and with the initiator(Sender first + last name?)  via the mobile app which should resolve fine as it won't cater to the e-mail ones.

    Another idea would be to have a property called "Sent by" added to the form and you would set that somewhere within Flow Designer by extracting that e-mail and setting the property in the event accordingly. You might be able to create a custom step to set that depending on whether or not an e-mail was set during the flow and if not (if it's null for example) then set the sender first and last name.

    Hope that helps spur a solution. Happy Wednesday!

    0
  • Thank you for the reply, Francois.  I actually ended-up implementing exactly what you suggested, both the dual forms and the custom step to extract the sender's email address.  I was hoping to avoid the overhead of managing multiple forms simply so I could include the appropriate sender information based on the trigger used.  

    I appreciate the reply.

    0

Didn't find what you were looking for?

New post