Answered

Wait executing a webhook source until other flow is done

If flow X has a flow step which POSTs data to a webservice then in turn it can have response XML being returned by the webservice to flow Y. Is it possible to have flow Y keep hanging in a queue until flow X is completed?
I tried using a delay flow step in flow Y but seems that it is of no avail..

0

Comments

7 comments
Date Votes
  • Hi Nuri Ensing,

    Yes, you can run flows in succession, where flow Y would run right after flow X: Daisy-chain flows. Let us know if this doesn't work for your particular scenario. Thanks!

    0
  • Nuri Ensing, We don't have the capability to hold the webhook listener queues for an event to occur (flow X in this case) and the ability to pass data from one flow to the next when you daisy-chain flows. I will add this as a request to the backlog for future consideration.

    Could you provide more information about your use case - Let's assume we can add webhook requests in the queue(Waiting). Once flow X completes, would you want all the records waiting in the queue to be processed in one go? or they would execute in batches based on data returned by flow Y?

    Also if you could confirm my understanding that flow Y should execute after flow X is executed completely or a specific flow step is executed in flow X?

    Best Regards!

    1
  • Amanjot Singh Thanks for the answer.
    This is needed for our custom-made Sap Ariba connection. I will try to simply explain in short what I want to achieve :
    This has to do with sending invoice XMLs to Sap Ariba.
    When posting an invoice XML to Sap Ariba the XML contains a unique payloadID. When the POST flow step is completed it will continue the flow. In the next flow step, a new custom record will be created in Netsuite where this payloadID data will be saved. After that step records like the invoice and opportunity will be updated with a new status + the same payloadID again. Now when the invoice gets failed at Sap Ariba's side it sends a Document Status Update XML back as a response to the XML. The DSU will be sent to another webhook (because the DSU flow is needed for other docs outside the invoice as well). The DSU XML contains a reference to the payloadID which was sent in the invoice XML. The DSU flow does a lookup and finds the custom record + opportunity + invoice via the payloadID reference. However sometimes when posting the invoice it takes a very long time in the invoice flow to create and update the Netsuite records, in the meantime, the DSU is already received but because the NS records are not updated the records cannot be found in the DSU flow lookup. I tried to insert a delay flow step in the DSU and also worked with different connections with a lower concurrency. But still, it sometimes goes wrong. DSU flow will then give an error because the lookup is not found. Thats why it would be nice to sorta put a data set on hold when it for example contains a specific request type. 
    For example:
    Webhook receives data > check if json has a specific key + value like: "request_type" : "invoice" if yes select hold in queue until flow X is done, in the mean time do run other incoming requests.

    Hope its clear. Thanks.

    0
  • Nuri Ensing Thank you for sharing the details. I understand the use case now.

    0
  • Thanks, if needed you can contact me directly also.

    The workaround currently for this is that we built a custom external gateway outside Celigo.
    The gateway receives the DSU first, waits like 2 minutes, and then sends the DSU to Celigo. 
    There will be a great chance that the NS records are then successfully updated already by then.

    0
  • Hey Nuri, would it be better for you to reorder your flow steps such that you perform all the NetSuite updates first before you post the invoice XML to SAP Ariba?  This way, all the NetSuite records will always be in place and updated before a DSU makes it to the webhook flow.

    0
  • Hi Scott Henderson, I already thought about that one too. It gives some business restrictions though.. However, I will give it a second look! Thanks for the input!

    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post