Question as to whether or not this is possible. We would like to use xMatters for an approval process that's currently being done through email.
Here's the scenario:
1. Specific users go into xMatters and fill out a message template/form and send it
2. Based on lists in the form that were selected before being sent, we'd write an integration to specify what groups in xMatters the event gets triggered to.
3. Approver would respond to that message. Integration would then take that response and send out another notification saying that someone already responded so others don't need to.
The only issue i have is with figuring out if it's possible to trigger an integration based on a message being sent from xMatters. I only see four different types of triggers in the outbound integrations, none of which would indicate this is possible. Unless there's a possible workaround i'm not thinking of?
Comments
Please sign in to leave a comment.
Hey Ian!
Sounds like a neat idea!
In regards to "The only issue i have is with figuring out if it's possible to trigger an integration based on a message being sent from xMatters." You want the "Event Status Update" trigger. This fires whenever an event's status changes. You will want to put in an if statement to check for the "payload.status == 'active'" so that your code doesn't fire for terminate as well as create! (Details here).
Er, actually, re-reading this, it sounds like you'd want to have the new event fire when someone responds, in which case that would be the "Notification Responses" trigger. Again, check the "payload.response == 'Approve'", and from there fire a new event. You'll want to set the Response Action for your 'Approve' response on the form to be "End" to make sure the event terminates after the approval.
To create a new event, you'll have to use the XMAPI directly. Something like this:
Where "APPROVAL_FOLLOWUP_INBOUND_PATH" is a constant that holds just the path portion of the inbound endpoint associated with your new follow up form. So if the inbound url is "https://acme.xmatters.com/api/integration/1/functions/SOME_UUID/triggers?apiKey=SOME_API_KEY", then this constant would have "/api/integration/1/functions/SOME_UUID/triggers?apiKey=SOME_API_KEY".
I hope that helps!
Happy Friday!
--- Travis