Limiting the integration to running only once

Not Yet Reviewed

Hi all,

I've recently been trying my hand at an outbound integration, which when run triggers a new xMatters event and it's working great.

However, I'm stuck on one thing and I can't seem to work out the best way around it.

My initial form needs to send to more than one recipient, and therefore this automatically triggers the script many times, one for each recipient. No matter what I select the trigger as (Event status updates,  Device delivery updates etc.)

Any creative ideas? 



Date Votes

Please sign in to leave a comment.

  • EDIT: Doug beat me to it. Punk. But his is way more informative. 

    Hey George! Great to hear you're trying your hand at integrations! 

    What are you ultimately trying to do? What do you want the outbound integration to do, create one event or create many events for each recipient, or something else?

    The event status update outbound integration will fire once when the event is successfully created. You can do different things based on the callback.status value (see webhook docs here). So you could do something like:

    if( callback.status == 'active' ) {
    // Do stuff
    else {
    // Do nothing

    But it sounds kind of like you are doing something similar, but you are getting multiple calls to your outbound script? That sounds a little strange and might need some deeper digging. If you print the value of the callback.status value is it different each time? Is the callback.eventIdentifier the same for each call?

    Happy Sunday!
       --- Travis

  • Hi Travis and Doug,

    Many thanks for your both very detailed answers - my aim has been to trigger a separate xMatters event, designed to trigger a separate communications for a different audience. The challenge I had was in it triggering the script (and then communicating again) when the initial one was closed - which would have caused confusion.


    The callback.status is exactly what I was looking for and works perfectly!

    Also wanted to say thank you for the integration builder, my own teams ability to create these scripts has offered so many more opportunities for using xMatters across our business.



  • Awesome George. We are glad the Integration Builder is getting 'er done for you. Let us know if you have any other challenges and Troug or Dravis will help again.


Didn't find what you were looking for?

New post