Skip to content

Assignment and routing

Assign using available capacity

Selects an available representative below capacity with deterministic tie breaking.

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

Selects the lowest-utilization available representative from the supplied capacity snapshot, breaking ties by ID.

What to customize

Provide representatives with id, available, capacity, and used values.

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": "contact-42",
    "field2": "[{\"id\":\"ana\",\"available\":true,\"capacity\":3,\"used\":1}]"
  }
}
Sample output

sample-output.json

{
  "outputFields": {
    "output1": "ana",
    "output2": "selected",
    "output3": "{\"used\":1,\"capacity\":3,\"remaining\":2,\"reserved\":false}"
  }
}

Returned fields

output1
representative ID
output2
selected or explicit validation/no-capacity reason
output3
capacity explanation

What changes when it runs

Returns a selected owner ID for a downstream workflow assignment; performs no CRM or store writes.

Ready to try it with your rules?

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

Use this recipe