Skip to content

Commercial operations and calculations

Count line items above a threshold

Counts eligible products meeting a numeric threshold.

Available recipeIncludes configuration, sample data and tests

Make it your own

Review the setup and limits below, then open an editable copy in Turbyn.

Use this recipe

Your selection stays with you through signup.

What it does

Counts records, not units.

What to customize

Provide threshold and allowed productTypes.

Run the included tests with your configuration and mappings. Review success, missing-input and failure results before publishing.

Expected outcome

This included example runs in dry-run mode with synthetic data. Integration tests separately cover provider responses using test doubles. It is not a live customer result.

Sample input

sample-input.json

{
  "inputFields": {
    "field1": "{\"threshold\":10,\"productTypes\":[\"software\"],\"items\":[{\"sku\":\"A\",\"value\":15,\"type\":\"software\"}]}"
  }
}
Sample output

sample-output.json

{
  "outputFields": {
    "output1": "1",
    "output2": "A",
    "output3": "[{\"sku\":\"A\",\"value\":15,\"type\":\"software\"}]"
  }
}

Returned fields

output1
count
output2
qualifying SKUs
output3
qualifying rows

What changes when it runs

Reads line items; no writes.

Ready to try it with your rules?

Map your inputs, test a sample and publish the version you’ve checked.

Use this recipe