Customer Signup Validation and Enrichment
Use this pattern when ingesting signup events: enforce a schema, normalise fields, remove secrets, then post the cleaned record to another service.
Input: json → Output: json
Steps used: validate-json, default, normalize, redact, http-transform
Pipeline
yaml
id: customer-signup
input:
format: json
steps:
- validate-json:
schema: ./schemas/signup-schema.json
- default:
fields:
country: AU
currency: AUD
- normalize:
fields:
email: lower
name: trim
- redact:
fields: [credit_card, password]
strategy: mask
- http-transform:
url: https://api.example.com/customers
method: POST
timeout: 60
headers:
Authorization: Bearer ${API_TOKEN}
expect-format: json
output:
format: jsonSample input
json
{
"email": " ALICE@EXAMPLE.COM ",
"name": " Alice Smith ",
"credit_card": "4111111111111111",
"password": "secret123"
}What happens
- validate-json — fails fast if required fields are missing or types are wrong
- default — adds
country: AUandcurrency: AUDif not present - normalize — lowercases
emailand trims whitespace fromname - redact — masks
credit_cardandpasswordbefore they leave the pipeline - http-transform — POSTs the cleaned record; replaces payload with the response
Run it
bash
pipectl run customer-signup.yaml < signup.json