Define Inputs and Outputs for a Reusable Make Subscenario
When two automations need the same transformation, let them call one subscenario with a known input shape. Keep each caller responsible for routing the output.
Worked example
Example normalization contract
Input = customer_code (text) Output = normalized_code (text), valid (boolean) Input " bx-91 " → normalized_code "BX-91", valid true Input "" → normalized_code "", valid false
Steps
- List the required input fields and the return fields. Choose types and an explicit validation status so callers can handle bad input.
- Define the subscenario inputs and outputs in Make. Configure the child to receive the input, apply the transformation and return the named values.
- In a parent, call the subscenario and map a known test record. Use a returned validity field to route unusable results to review.
- Repeat the test with a second parent and an invalid fixture. Check that both callers read the same output fields.
What to check
- Test whitespace, empty strings and omitted fields separately. Each may reach a different validation branch.
- After changing a return field name or type, update and test each parent scenario using the previous contract.