how to get the payload of all the variables and its values of catalog item to send to scheduled job.

Sachin Gavhane
Giga Guru

Scenario is: 

1. once catalog item is ordered, request gets send to 3rd party.

our requirement is, once catalog item is ordered , without changing our existing workflow, we want to cancel the req / ritm to reach 3rd party.

2. we should be able to save the payload [ variables and its values of that catalog item]

3. later we should be able to request that catalog item with that saved payload as per scheduled time.

 

note: we cannot change our existing workflow for this.

pls help

3 REPLIES 3

Laszlo Balla
ServiceNow Employee
ServiceNow Employee

You can build a separate flow that can collect the necessary information from the question_answer table. You can use this to build a payload in any way you need, and then have any number subflows or other flows to do anything else per your requirement.

You don't need to touch the exiting workflow, it can happen in parallel. You can even have a business rule to trigger the flow or subflow using the FlowAPI.

thanks @Laszlo Balla 

honeslty speaking i have some doubt in understand solu given by you.

 

can you pls help me with some example.

 

I have no example especially without the full context, but see below my answers to your points:

 

1. once catalog item is ordered, request gets send to 3rd party.

our requirement is, once catalog item is ordered , without changing our existing workflow, we want to cancel the req / ritm to reach 3rd party.

 

--> you can do this via a Business Rule right?

 

2. we should be able to save the payload [ variables and its values of that catalog item]

 

--> What does it mean to "save the payload"? The variables and the values are in the system (question_answer table) so you can access them? When you said payload, I thought you wanted to send this information via an integration - which you can.

 

3. later we should be able to request that catalog item with that saved payload as per scheduled time.

 

--> You will need to submit a new catalog item with the save variable values? See the above point. you have the details in the system.