08-02-2021 02:37 AM
Hello,
I am new to Snap logic, I am trying to create a pipeline where I need to pass the json input request payload. based on the input I have to check for condition and then route to TWO different REST GET calls.
my input json is like this
{
“state”: “sample_state”,
“count”: “sample_count”,
“Caller”: “sample_caller”,
“fromDate”: “sample_fromdate”,
“toDate”: “sample_todate”,
“SysId”: “sample_sysid”
}
how to pass this from external app. And how to read the values to pass to REST GET call.
Answer will help a lot. Thanks
08-02-2021 10:21 AM
Hi @arunnp,
You can pass data from external app by creating Triggered task.
This task can be created from Manager or from the Designers.
So these are the steps:
I also attaching pipeline as example, but you will have to make the task on your own.
JSON_Payload_2021_08_02.slp (4.8 KB)
Here is one example triggering the pipeline above from Postman.
I am not doing anything just move the whole payload to Payload object and returning it back.
Regards,
Viktor
08-03-2021 12:58 AM
Thanks this helped me lot.
Once I get the input values I need to pass that to the REST get Service URL but the value is not passing.
I am doing like this
Here the caller is not getting replaced. I am getting empty response.
I tried {{$Caller}} still no response. I am missing proper syntax. can you pls help with proper syntax.
thanks
08-03-2021 01:26 AM
To get value from Caller field you first need to check the Expression Builder(=), and to get the value you need to make everything as string only the $Caller to be as expression.
For example from the image above need to look like this:
08-03-2021 04:29 AM
Hi, @arunnp
Regards,
Angela.