Customer onboarding is one of the most critical stages in the user journey. A smooth, fast, and reliable onboarding process can dramatically improve activation rates and long-term retention. However, manual onboarding processes are often slow, error-prone, and impossible to scale. They tie up valuable engineering resources in repetitive tasks instead of core product development.
What if you could define your entire onboarding process as a single, powerful agentic workflow and trigger it with just a few lines of code in your application?
This is where the .do platform and its official Software Development Kits (SDKs) come in. In this post, we'll walk through a real-world example of how to automate customer onboarding using the .do SDK for TypeScript, transforming a complex process into a simple, elegant API call.
Before we dive into the code, let's understand the "why." Traditional automation might involve stitching together multiple API calls and webhooks within your own codebase, creating a brittle and hard-to-maintain system.
The .do agentic workflow platform changes this paradigm. You can design complex, multi-step business logic that involves different services, conditional logic, and human-in-the-loop approvals—all in one place. Using the SDK allows you to treat this powerful logic as a single, callable function from your application.
The benefits are immediate:
Our SDKs are designed to provide a simple, elegant interface to the .do platform, allowing you to access its full power in your native language. You don't need to be an expert in REST APIs; you just need to know your language of choice.
Let's build a customer onboarding trigger.
For this example, let's imagine our customer-onboarding-workflow performs the following actions:
First, add the official .do TypeScript SDK to your project.
npm install @do-platform/sdk
Now, let's look at the code. Imagine this function is part of your application's signup controller or service layer. When a new user submits your signup form, you call this function.
import { Do } from '@do-platform/sdk';
// Initialize the client. Best practice is to use environment variables for your API key.
const doClient = new Do({
apiKey: process.env.DO_API_KEY,
});
// This function can be called right after a user signs up on your website.
async function runCustomerOnboarding(customerData: any) {
try {
console.log(`Starting onboarding for: ${customerData.email}`);
// Trigger the workflow by its name and pass the necessary input.
const result = await doClient.workflows.run({
name: 'customer-onboarding-workflow',
input: { customer: customerData },
});
// The result contains the unique ID for this specific workflow execution.
// You can store this ID to track its status later.
console.log('Workflow started successfully! Run ID:', result.runId);
return result;
} catch (error) {
console.error('Failed to run customer onboarding workflow:', error);
// Add logic here to handle the failure, e.g., notify an admin.
}
}
// Example usage:
const newCustomer = {
name: 'Jane Doe',
email: 'jane.doe@example.com',
company: 'Example Inc.',
};
runCustomerOnboarding(newCustomer);
That's it.
With this simple function, your application hands off the entire complex onboarding process to the .do platform. Your application code remains clean and focused on its core responsibilities, while the robust, multi-step business logic is managed, versioned, and monitored within .do.
This example is just the beginning. The .do SDK is a complete toolkit for API integration with the platform. You can:
Ready to stop writing brittle integration glue code and start building powerful, scalable automations?
Explore our Developer Docs or Get your API Key and start building today.
What is the .do SDK?
The .do Software Development Kit (SDK) is a set of tools, libraries, and documentation that allows developers to easily integrate the .do agentic workflow platform directly into their own applications.
Which programming languages are supported?
We provide official SDKs for popular languages like TypeScript/JavaScript, Python, and Go. Check our developer documentation for the most up-to-date list and community-supported libraries.
How do I get an API key?
You can generate an API key from your .do account dashboard. Navigate to the 'API Settings' section to create and manage your keys securely.
Is the SDK free to use?
Yes, our SDKs are free to download and use. Usage of the underlying .do platform is subject to our standard pricing plans, which are based on workflow executions and agent usage.