Dont create tasks if empty response

Right now an incoming configuration is creating ‘empty’ tasks

We reading from a API which returns an JSON object with an key with objects
the route is using some Entity Transformers which splits up the key in nodes

but, now its creating a task with the complete response of the API

How can i filter / skip creating tasks direct based on the response?

So like if key:

SalesOrderTransactionList count is 0, dont do anything

Hi @TMourikSH,

You can create a filter with this kind of transformer:

So the task will only be created if the SalesOrderTransactionList value is greater than 0.

Thats exactly what i tried :slight_smile: on the incoming & route

but still, the task is created with data:

{
  "Footer": {
    "Records": 0,
    "TotalRecords": 0
  },
  "Header": {
    "Sender": "RESTAPI",
    "Version": "1.0",
    "Identification": "xxxx"
  },
  "SalesOrderTransactionList": []
}

I tried it with pattern: Footer.Records
right now testing,

I saw the SalesOrderTransactionList is an array, could you please try to change the condition to “is empty”?

1 Like