Skip to main content
When a thread is created with a contract, Threadify uses that contract to validate record steps and identifies violations, failed business logic, race conditions, etc.
New to contracts? Learn how to create a contract first.

Starting with a Contract

Start a thread with a contract to enable automatic validation:
// Use latest version (recommended)
const thread = await threadify.start('order_fulfillment', 'merchant');

// Use specific version
const thread = await threadify.start('order_fulfillment:2', 'merchant');

What Contracts Validate

Entry points - The first step must be a valid entry point defined in the contract. Transitions - Steps must follow the allowed transitions defined in the contract. Required fields - Context provided with each step must include all required fields. Terminal states - Threads automatically complete when reaching a terminal node.
Violations are reported via notifications but don’t block execution. Learn how to subscribe to violations.

Next Steps

Inviting Parties

Invite others to collaborate on threads

Notifications

Subscribe to validation alerts