Expand my Community achievements bar.

Latest Community Ideas Review is Out: Discover What’s New and What to Expect!

How to trigger a Fusion Scenario after changes are made in another scenario?

Avatar

Level 2

Hi all,

I created 2 fusion scenarios as below.

Scenario 1 : Task Webhook and it makes changes on documents associated with Task.

Scenario 2 : Document Webhook

I expected, after Documents gets updated in Scenario-1, Scenario-2 gets triggered. But that's not happening.

Is there any way to achieve this?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

4 Replies

Avatar

Level 10

Hello v-ellur,

 

That is something I also recently detected, a Watch Event webhook is not triggered by updates made through another Fusion scenario.

 

But, you can give the Custom Webhook module a try. This can be called using the HTTP -> Make a request module.

In the moment of writing this, perhaps there is also a possibility to call the webhook, created by the Watch Event module directly, but I do not know at the moment, how the payload has to look like and if any different auth key is transfered as well... Possibly it only receives calls from specific IP addresses.

 

 

Regards

Lars

Avatar

Level 10

Hi,

 

it seems that it is also possible to call the Webhook directly without any authentication...

 

I will analyse this in detail over the next few days, but I can say in advance that the payload has to be in a format like this:

 

 

{
   'newState': {
            'parameterValues': ...
            },
   'oldState': {
            'parameterValues': ...
       }
}

 

 

 

Regards

Lars

Avatar

Community Advisor

I can't say with 100%, but I'd guess 99% confidence, that it's because of one of two reasons. One, it's not working because when you created your webhook you kept the "ignore updates made by this connection" checked, or two, it's not working because the fields you are updating aren't being tracked, and there are a couple of options to account for these.

 

Option 1: You could call your second fusion scenario directly from the first. (<-- Probably what I would do)

Option 2: If it's because left the option checked when you created your webhook, you could either create a new webhook and leave the option unchecked (note that doing this may cause an infinite loop depending on what you're doing with you're code, so be careful), or use a different user to create a new webhook and leave the option checked.

Option 3: If it's because those fields aren't tracked, you need to add those fields to your tracking list.

Avatar

Level 3

@v-ellur 

I frequently use custom forms with Admin-only sections in Fusion, and if this is for a specific project, here’s a possible approach:

  1. Add a single checkbox selection field in the Admin section of a custom form where the clicked value = 1.
  2. Ensure it's a required field.
  3. In the previous scenario, set it to update that value in the custom form.
  4. For the next scenario, set up a watch event for when that custom form field is new or updated.
  5. TO be extra safe add a filter to ensure the field’s old state does not equal its new state.
  6. Then, let the rest of the scenario run as needed.