Hi,
I am building an API flow.
3rd party application sends Customer name and address to M3.
If such customer exists I want to return CUNO.
If such customer does not exist I want to create customer and return CUNO.

In API #1 I run EXPORTMI to get records count for OCUSMA for provided customer name and address.
If records count > 0 I run API #2 to get CUNO with EXPORTMI.
If records count = 0 I run API #3 CRS610MI.Add
At the end I need to return
if new customer was added to M3:
{
"Response": {
"CustAccount": "1234567890",
"ErrorMessage": "",
"Processed": true
}
}
if customer was found in M3:
{
"Response": {
"CustAccount": "1234567890",
"ErrorMessage": "Customer already exists",
"Processed": false
}
}
How do I do it in API flow response?
EXPORTMI and CRS610.Add return different JSON files
I put this API flow response
{
"CustAccount1":"${ifCustomerExists.GetCustomerBody}",
"CustAccount2":"${ifCustomerExists.CRS610MIAddBody}"
}
These are responses I get

How can I return same JSON for both scenarios?
Regards,
Kirill