โ04-26-2021 03:14 PM
Hi Team,
I am having below payload as input and in the output im expecting only the Sales data of (Target >= 20)
Input Payload:
===========
{
"EmployeeDetails": [{
"EmpID": 123,
"Records": [{
"id": "S1",
"Department": "Sales",
"Target": "20"
},
{
"id": "S3",
"Department": "Sales",
"Target": "20"
},
{
"id": "S4",
"Department": "Sales",
"Target": "10"
},
{
"id": "L1",
"Department": "Leaves",
"Targets": "1"
}
]
},
{
"EmpID": 124,
"Records": [{
"id": "S2",
"Department": "Sales",
"Target": "25"
},
{
"id": "L1",
"Department": "Leaves",
"Targets": "3"
}
]
}
]
}
Expected Output: ("Records.Department == Sales" && "Records.Target >= 20")
==============
{
"EmployeeDetails": [{
"EmpID": 123,
"Records": [{
"id": "S1",
"Department": "Sales",
"Target": "20"
},
{
"id": "S3",
"Department": "Sales",
"Target": "20"
},
{
"id": "S4",
"Department": "Sales",
"Target": "10"
}
]
},
{
"EmpID": 124,
"Records": [{
"id": "S2",
"Department": "Sales",
"Target": "25"
}
]
}
]
}
Recipe: https://app.workato.com/recipes/1521392?st=5d5a86
Is anyone gone through similar kind of use case. please provide your solutions on this.
โ04-26-2021 04:24 PM
Hi Bala, Can you share the common data model as well. I will share the complete recipe link
โ04-26-2021 04:26 PM
you can generate with payload data
โ04-26-2021 05:28 PM
Please find the link with the complete solution below
https://app.workato.com/recipes/1521543?st=a927cd
โ04-26-2021 05:44 PM
Thanks for your solution. Its working
Just made a change in this (removed step7 (For-each))
https://app.workato.com/recipes/1521682?st=8482cd
โ04-27-2021 05:06 AM
Hi,
Send the request jeson to a callable recipe.
Make manipulation with collection on the data and return the response.
Recipes working with jeson object so you will get back json from the recipe.
Build the request and the response in the same structure as your json.
good luck,
Diana