Deepline SDK
Beta: the SDK docs are published and usable, but the surface is still
evolving.
Write GTM workflows that just work: start from a search, CSV, webhook, or schedule; enrich the right records; route each customer through the right path; push the result to Salesforce, a sequencer, a warehouse, or a CSV; then visualize what changed.
1. Pick the job
Keep the use case short. The workflow can hold the detail.
Job Example Weekly account search Find new companies, enrich them, send qualified accounts to Salesforce Custom waterfall Try providers in your order, stop at the first verified email Segment routing Run one path for directors, another for VPs Inbound routing Enrich demo requests and send the right context to the owner Data review Export a CSV and chart segments, signals, and gaps
2. Pilot one record
Start with a prebuilt workflow before writing your own.
deepline plays describe prebuilt/person-linkedin-to-email --json
deepline plays run prebuilt/person-linkedin-to-email \
--input '{"linkedin_url":"https://www.linkedin.com/in/real-person/","first_name":"Jane","last_name":"Smith","company_name":"Acme","domain":"acme.com"}' \
--watch
Use a real lead you are allowed to enrich. A fake LinkedIn URL can return nothing.
3. Pilot a small list
head -n 4 leads.csv > /tmp/leads-pilot.csv
deepline plays run lead-email-waterfall.play.ts \
--csv /tmp/leads-pilot.csv \
--watch
deepline runs export < run-i d > --out /tmp/leads-pilot-enriched.csv
Inspect the output. If the rows look right, run the full file.
4. Add your business logic
This is where the SDK matters.
import { definePlay } from 'deepline' ;
type Lead = {
lead_id : string ;
seniority : 'VP' | 'Director' ;
company_domain : string ;
};
export default definePlay ( 'route-leads-by-seniority' , async ( ctx , input : { leads : Lead [] }) => {
const rows = await ctx
. dataset ( 'routed_leads' , input . leads )
. withColumn ( 'research' , async ( lead , rowCtx ) => {
if ( lead . seniority === 'VP' ) {
return await rowCtx . tools . execute ({
id: 'vp_research' ,
tool: 'test_rate_limit' ,
input: { key: lead . company_domain },
description: 'Research this enterprise lead.' ,
});
}
return await rowCtx . tools . execute ({
id: 'director_research' ,
tool: 'test_rate_limit' ,
input: { key: lead . company_domain },
description: 'Research this midmarket lead.' ,
});
})
. run ({ key: 'lead_id' , description: 'Route each lead to the right research workflow.' });
return { rows };
} ) ;
Use this for custom waterfalls, segment-specific paths, weekly searches, and background jobs.
5. Ship the output
deepline plays run weekly-new-accounts.play.ts \
--input '{"query":"B2B SaaS companies hiring RevOps"}' \
--watch
deepline runs export < run-i d > --out output/new-accounts.csv
Then push to Salesforce, send to a sequencer, write to your warehouse, or chart the result.
Examples
Weekly company search to Salesforce Search once a week, enrich new accounts, and create Salesforce tasks.
Custom email waterfall Try your preferred providers and stop at the first verified email.
Director vs VP routing Run different research paths based on buyer type.
Inbound webhook enrichment Enrich form fills and route them to the right owner.
Nightly account refresh Refresh account signals on a schedule with a run cap.
Python caller Trigger a saved workflow from Airflow, notebooks, or backend jobs.
Reference
SDK Reference CLI commands, workflow authoring, config, triggers, and org safety.
API Reference HTTP request shapes for starting and checking workflow runs.