Learn how developers can leverage the .do SDKs to implement Business-as-Code, trigger agentic workflows via API, and automate complex business operations like customer onboarding.
In today's fast-paced digital landscape, businesses constantly seek ways to improve efficiency, scale operations, and reduce manual overhead. Traditional business processes are often complex, difficult to manage, and don't scale easily. Enter Business-as-Code, a paradigm shift where business logic and operational workflows are defined, managed, and executed using software development principles. This is where businesses.do comes in.
The .do platform empowers you to transform intricate business processes into automated, scalable Services-as-Software, accessible via simple APIs. For developers, this means integrating complex operations into applications becomes significantly easier. This post provides a deep dive into using the .do SDKs – your primary tool for bringing Business-as-Code to life.
As defined in our FAQs, Business-as-Code is the practice of codifying business processes. Think of it like Infrastructure-as-Code, but for operations. Instead of flowcharts hidden in documents or manual task lists, you define processes in a structured, version-controlled, and executable format.
For developers, this offers numerous advantages:
The .do SDKs (Software Development Kits) are libraries designed to make interacting with the .do platform's API straightforward and intuitive for developers. Instead of crafting raw HTTP requests, you can use familiar programming language constructs to trigger and manage your agentic workflows.
Our SDKs abstract away the underlying API complexities, allowing you to focus on integrating automated business processes into your applications.
Before you can start automating, you'll need a couple of things:
npm install @do/sdk
# or
yarn add @do/sdk
The most common action you'll perform with the SDK is triggering an existing workflow. Workflows represent the codified business processes (e.g., onboarding a customer, processing a payment, generating a report) defined within the .do platform.
Let's look at the TypeScript example for onboarding a new business customer:
import { Do } from '@do/sdk';
// Initialize the Do client
const doClient = new Do({ apiKey: 'YOUR_API_KEY' });
// Onboard a new business customer
async function onboardBusiness(name: string, email: string) {
try {
const result = await doClient.workflows.trigger('business-onboarding', {
customerName: name,
contactEmail: email,
plan: 'enterprise',
setupTask: true
});
console.log('Onboarding initiated:', result.workflowRunId);
// You can store workflowRunId to track status later
return result;
} catch (error) {
console.error('Failed to onboard business:', error);
}
}
onboardBusiness('Acme Corp', 'contact@acme.com');
Breaking down the code:
Notice how the calling code doesn't need to know the details of the onboarding process. Does it involve creating database records, setting up billing, sending welcome emails, assigning an account manager, and performing compliance checks? Maybe.
The beauty of the .do platform and Business-as-Code is that all that complexity is encapsulated within the business-onboarding workflow itself. Your application code simply needs to provide the necessary starting data and trigger the workflow via the SDK. The agentic workflow orchestrates the rest, potentially interacting with various internal or external systems as defined.
Integrating the .do SDKs streamlines development:
The .do SDKs provide a powerful yet simple interface for developers to harness the capabilities of the .do agentic workflow platform. By embracing Business-as-Code, you can move away from brittle, manual processes and build robust, scalable, and automated operations delivered as Services-as-Software.
Ready to transform your business operations?