In today's fast-paced digital landscape, the most successful businesses are the ones that can adapt, scale, and automate. Yet, many organizations are still hampered by manual, repetitive business processes. From onboarding customers to qualifying leads, these tasks consume valuable time and are prone to human error. What if you could treat your business operations just like software—programmable, scalable, and on-demand?
This is the core idea behind the "Business as Code" revolution, and it's the foundation of service.do. We believe that any business process can be transformed into a powerful, programmable API.
Welcome to the world of Services as Software. This guide will walk you through the concept and show you how to build your very first automated service on the service.do platform.
Imagine your daily operations not as a series of manual steps, but as a library of functions you can call anytime, from anywhere. That's the power of service.do. We help you encapsulate complex operations into simple, clean APIs powered by intelligent agentic workflows.
Instead of a sales operations manager manually enriching a new lead, an application can simply call the lead-enrichment service. Instead of a marketing team manually generating social media copy, a script can invoke the content-generation service.
This approach offers transformative benefits:
So, what exactly is a "Service" on our platform? Think of it as a complete business task packaged as software. Every service on service.do has three key components:
The magic lies in how you define this workflow. Using a simple configuration file, you outline the entire process. Once you deploy it, service.do instantly provisions it as a secure, production-ready API endpoint.
To make this concrete, let's take a common business process: Company Data Enrichment.
The Manual Process:
This process is slow, tedious, and inconsistent. Now, let's turn it into a service.do service.
We'll define a service called data-enrichment.service.do. In a simple configuration file (e.g., a .yml or .json file), we'll outline the steps our agentic workflow needs to take. While the exact syntax may vary, the logic looks like this:
# service-definition.yml
name: data-enrichment.service.do
description: Enriches a company domain with key business data.
# Define what the service needs to start
inputs:
companyDomain: string
fields: array # e.g., ['logo', 'description', 'employeeCount']
# Define the agentic workflow
workflow:
- step: get_description
agent: web_scraper_agent
prompt: "Visit {companyDomain} and extract the company's 'About Us' description or mission statement."
output: { description: string }
- step: get_employee_count
agent: data_lookup_agent
tool: "internal_hr_database_or_linkedin_api"
query: "Find employee count for {companyDomain}."
output: { employeeCount: number }
- step: get_logo
agent: image_search_agent
query: "Find the official logo for {companyDomain}."
output: { logo: url }
# Define the final, structured output
outputs:
description: string
employeeCount: number
logo: url
With your service defined, you deploy it to the service.do platform. Instantly, your business process becomes a live API endpoint, ready for integration.
Now, any developer on your team can use this service with a few lines of code. This is where the true power of service automation comes to life. Your manual process is now a programmable building block.
Here’s how you would call your new service using our TypeScript SDK:
import { createDo } from '@do-sdk/core';
// Initialize the .do client with your API key
const doClient = createDo({ apiKey: 'YOUR_API_KEY' });
// Get a handle to the service you just created
const dataEnrichment = doClient.get('data-enrichment.service.do');
// Invoke the service to enrich a company's data
async function enrichCompanyData(domain: string) {
try {
console.log(`Enriching data for ${domain}...`);
// Run the service with a specific payload
const result = await dataEnrichment.run({
companyDomain: domain,
fields: ['logo', 'description', 'employeeCount']
});
console.log('--- Enriched Data ---');
console.log(`Description: ${result.description}`);
console.log(`Employee Count: ${result.employeeCount}`);
console.log(`Logo URL: ${result.logo}`);
console.log('---------------------');
// Now you can update your CRM automatically!
// crm.updateCompany(domain, result);
return result;
} catch (error) {
console.error('Service execution failed:', error);
}
}
// Run the service for a new lead
enrichCompanyData('service.do');
Just like that, a 15-minute manual task becomes a sub-second API call.
The real beauty of the service.do ecosystem is composition. Since every service has a predictable input and output, you can chain them together to automate incredibly complex, end-to-end workflows.
For example, the output of our data-enrichment.service.do could become the input for another service, personalized-sales-email.service.do, which uses the company's description and size to draft a highly relevant outreach email.
Your operations are no longer a rigid process; they are a flexible collection of powerful, interconnected API services.
You've just seen how a simple business process can be transformed into a scalable, on-demand asset. This is the future of business operations—a future where your entire company runs as efficiently and reliably as a piece of software.
Ready to stop managing tasks and start deploying services?
Explore the service.do platform and start building your first service today!