Business-as-Code Orchestration
Deliver Services as Software Define, orchestrate, and execute any business service as a version-controlled, API-driven workflow. Go from complex processes to simple, reliable software.
Join waitlist
import { Service, Workflow } from '@do/sdk';
// Define the workflow for onboarding a new customer
const onboardCustomerWorkflow = new Workflow('onboard-customer-workflow', {
steps: [
{
name: 'Verify Customer Identity',
uses: 'identity.do/verify',
inputs: {
email: '{{ trigger.body.email }}',
document: '{{ trigger.body.documentId }}'
}
},
{
name: 'Create User Account',
uses: 'account.do/create',
needs: ['Verify Customer Identity'],
inputs: {
email: '{{ steps.Verify Customer Identity.outputs.email }}',
status: '{{ steps.Verify Customer Identity.outputs.status }}'
}
},
{
name: 'Send Welcome Email',
uses: 'email.do/send',
needs: ['Create User Account'],
inputs: {
to: '{{ steps.Create User Account.outputs.email }}',
template: 'welcome-email'
}
}
]
});
// Expose the workflow as a callable service
export const OnboardCustomer = new Service('onboard-customer', {
workflow: onboardCustomerWorkflow,
// Make this service available via a public API endpoint
trigger: 'api'
});