API Body if/then/else

Are we able to use if/then/else in the Body of a web service method?  I have a use case that I would like to use if/then/else to then do different updates on a ticket.  I could create multiple methods, but would prefer to keep it in one if possible.

Tags API json
Asked by Eric Haffey on Mon 5/6/24 12:32 PM
Sign In to leave feedback or contribute an answer

Answer (1)

This answer has been marked as the accepted answer
Mark Sayers Mon 5/6/24 1:53 PM

Hello Eric,

The API endpoints will not be able to perform logic for you unfortunately. You'd have to have your external system provide/apply that logic prior to sending in your API call body.

You could use an iPaaS flow to do that for you though, so it considers the applicable logic prior to sending the ticket creation call in.

Sincerely,
Mark Sayers
Sr Support Consultant, CS

No feedback
Thanks Mark, makes sense. - Eric Haffey Mon 5/6/24 2:08 PM
You're very welcome! - Mark Sayers Mon 5/6/24 2:19 PM