Skip to main content
Question

Rest API Call from Event Action, Handle Response


Forum|alt.badge.img+4
  • Sidekick (Customer)
  • 5 replies

I have an event action that calls a REST API endpoint on the system SHOP_ORDER_RELEASED event. I was wondering how I handle the response from the API? Basically when it works, it works great and I don’t need to show anything to the user. 

 

However, in the event of a failure I want the response to be sent to the user and the event to stop. I can move this to an entirely custom event if that helps. But I have no idea how I can handle the response in this event action. 

 

Right now I see the event finished and the result indicates a failure, I would like to do something in this case. 

 

 

2 replies

wahelk
Hero (Former Employee)
Forum|alt.badge.img+11
  • Hero (Former Employee)
  • 116 replies
  • June 20, 2024

May be a new event sending emails when application message fail?  or try workflow.


Forum|alt.badge.img+4
  • Author
  • Sidekick (Customer)
  • 5 replies
  • June 20, 2024
wahelk wrote:

May be a new event sending emails when application message fail?  or try workflow.

The event is on Shop Order release and similar to a PLSQL execution I would expect the event to fail on REST call failure I.E. HTTP 400 or similar. At the very least I would expect there be some mechanism for handling the response, is that even possible?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings