The Lena.do Integration Playbook: Connecting Your CRM, ERP, and APIs
In the modern enterprise, your CRM and ERP systems are the central nervous systems of your sales and operations. They hold critical data, drive core functions, and are essential for day-to-day business. Yet, a persistent gap often exists between them—a manual chasm where your team spends countless hours copying data, triggering processes, and bridging workflows. What if you could close that gap, not with brittle scripts, but with an intelligent agent?
Meet Lena, your autonomous digital worker. She isn't just another automation tool; she is the intelligent connective tissue for your entire tech stack. By integrating Lena with your core platforms, you can transform disjointed, manual tasks into a single, seamless, and automated workflow.
This playbook will guide you through the why and how of connecting Lena to your CRM, ERP, and other essential APIs to unlock true, end-to-end business automation.
Why Integrate? The Power of a Connected Ecosystem
Connecting Lena to your core systems is about more than just saving time. It’s about building a more resilient, scalable, and intelligent business. Here’s what you gain:
- Eliminate Data Silos: Lena acts as a universal translator. When a deal is marked "Closed-Won" in your CRM, Lena can instantly pull that data, validate it, and create a new customer account and billing plan in your ERP. No more manual entry, no more delays.
- Create True "Services-as-Software": Complex operations like customer onboarding or financial reporting often involve a dozen manual steps across five different platforms. With Lena, you can bundle that entire sequence into a single, on-demand service, accessible via one API call. This is the future of Services-as-Software.
- Unlock Unprecedented Scalability: Manual processes are bottlenecks. An autonomous worker like Lena can execute a thousand customer onboardings as easily as one, 24/7, without burnout or human error.
- Embrace Agentic Workflows: Unlike rigid automation, Lena is "agentic." If an API is temporarily down or a data format is unexpected, she can reason about the problem, adapt her strategy, and retry, ensuring the job gets done.
The Integration Blueprint: How Lena Connects
Integrating with Lena is designed to be developer-friendly and platform-agnostic. At its heart, every integration is about triggering a delegation. You give Lena a clear objective, and she handles the rest.
There are two primary ways to connect your systems to Lena:
- The .do SDK (@do-sdk/core): For developers building custom applications or backend services, our SDK provides the most straightforward path. It’s a simple, elegant wrapper for the Lena API.
- The REST API: For universal compatibility, Lena can be triggered by a standard REST API call. This is perfect for integrating with low-code platforms, pre-built webhook systems (like in Salesforce, HubSpot, or Stripe), or legacy applications.
No matter the method, the core interaction remains the same. You authenticate with an API key and then delegate a task.
Here’s how simple it is to initialize Lena in your code:
import { createDoClient } from '@do-sdk/core';
// Authenticate and create a client for Lena
const lena = createDoClient('lena.do', {
apiKey: process.env.DO_API_KEY
});
// Now you're ready to delegate tasks from anywhere in your app!
Practical Plays: Real-World Integration Scenarios
Let's move from theory to practice. Here are a few powerful integration plays you can run with Lena today.
Play 1: CRM-Triggered Customer Onboarding
This is the classic, high-value workflow that plagues many organizations.
- Trigger: A deal stage is updated to "Closed-Won" in your CRM (e.g., Salesforce, Pipedrive).
- Action: Your CRM's native webhook functionality makes a POST request to a simple cloud function or directly to Lena's API endpoint.
- Lena's Delegated Task: "Fully onboard new enterprise customer account"
Once triggered, Lena's agentic workflow kicks in:
- Fetches complete deal and account details from the CRM API.
- Provisions a new dedicated environment in your cloud provider (AWS, GCP).
- Creates the customer account in your product's database.
- Sets up the billing plan in your ERP or payment provider (Stripe, Chargebee).
- Sends a personalized welcome email series via your email API (e.g., SendGrid).
- Creates a project board and kickoff tasks in your project management tool (Jira, Asana).
- Finally, updates the original CRM record with a status of "Onboarding Complete" and a link to the new account.
Play 2: ERP-Driven Financial Report Generation
Automate the tedious process of month-end reporting.
- Trigger: A scheduled job (cron) runs on the first day of the month.
- Action: The job script calls the Lena API.
- Lena's Delegated Task: "Generate and distribute the monthly performance report for the sales leadership team."
Lena then orchestrates the data retrieval and assembly:
- Queries your ERP (NetSuite, SAP) for revenue and expense data.
- Pulls ad spend and campaign performance from marketing APIs (Google Ads, LinkedIn).
- Fetches user-growth metrics from your internal analytics database.
- Consolidates all data, performs calculations, and generates charts.
- Populates a report template (Google Slides or PDF).
- Uploads the final report to a shared SharePoint folder.
- Sends a notification to the sales leadership channel in Slack with a link to the report.
Play 3: Intelligent Lead Qualification & Routing
Bridge the gap between marketing automation and your sales team.
- Trigger: A new lead fills out a high-intent form on your website.
- Action: Your marketing automation platform (HubSpot, Marketo) triggers a webhook.
- Lena's Delegated Task: "Enrich, qualify, and route new MQL."
Lena acts as the smart routing engine:
- Takes the initial lead data (email, company name).
- Enriches the lead using a data provider API (like Clearbit or ZoomInfo) to get company size, industry, and tech stack.
- Scores the lead based on your custom business logic (e.g., company size > 50, industry = SaaS).
- If qualified: Creates a new Lead in your CRM, assigns it to the correct regional sales rep, and creates a follow-up task.
- If not qualified: Adds the lead to a long-term "Nurture" sequence in your marketing platform.
Get Started: Your First Integration in 3 Steps
Ready to retire manual workflows and turn your operations into code? Here’s how to launch your first integration.
Step 1: Define Your Objective
Identify a repetitive, high-value process that spans multiple systems. The "Customer Onboarding" play is a perfect place to start. Define the end goal in a single sentence.
Step 2: Connect to Lena
Grab your API key from lena.do and use the SDK to create your client. It's just a few lines of code.
Step 3: Delegate and Innovate
Trigger your first delegation from your chosen system. You don't need to code every single step of the workflow; you just need to tell Lena the goal.
const onboardNewCustomer = async (customerData) => {
const result = await lena.delegate('Fully onboard new enterprise customer account', {
companyName: customerData.name,
contactEmail: customerData.email,
requestedPlan: 'enterprise_v2-premium',
source: 'CRM-Webhook-Trigger'
});
console.log('Onboarding Status:', result.status);
console.log('Summary:', result.summary);
// You can use the result to update your source system
return result.onboardingId;
};
By connecting an autonomous digital worker like Lena to your core business platforms, you're not just automating tasks. You're building a smarter, faster, and more scalable operational foundation.
Ready to delegate? Visit lena.do to get your API key and build your first integration.