Documentation Index
Fetch the complete documentation index at: https://docs.useterse.ai/llms.txt
Use this file to discover all available pages before exploring further.
Enrich every new deal with firmographic context before the owner acts.
Start from a project scaffold
terse init acme-revenue
cd acme-revenue
terse integrate
terse generate
What it does
- Triggers on a new deal in Attio.
- Looks up company context via Apollo.
- Uses the model to summarize fit and recommend a next step.
- Writes the result back to Attio and posts a Slack alert.
Core workflow
import { TerseAgent, Trigger, createJob } from "terse-sdk"
import { Apollo, Attio, AttioList, Slack, SlackChannel } from "./terse.generated"
createJob({
name: "new-deal-enrichment",
triggers: [Attio.onRecordCreated({ list: AttioList.Pipeline.NewDeals })],
onTrigger: async (event: Trigger) => {
const agent = TerseAgent.create({
prompt: "You enrich new deals with firmographic context, score ICP fit, and recommend a next step.",
skills: [Attio.skill({ lists: [AttioList.Pipeline.NewDeals] }), Apollo.skill(), Slack.skill({ channel: SlackChannel.DealDesk })]
})
const company = await agent.tools.apollo.enrichCompany({
domain: event.record.values.company_domain
})
const summary = await agent.runAndWait(
[
"Summarize ICP fit, timing, and a next step.",
`Company: ${event.record.values.company_name}`,
`Industry: ${company.industry}`,
`Employee count: ${company.employeeCount}`,
`Revenue: ${company.estimatedRevenue}`,
`Technologies: ${company.technologies.join(", ")}`
].join("\n")
)
await agent.tools.attio.updateRecord({
list: AttioList.Pipeline.NewDeals,
recordId: event.record.id,
fields: { research_summary: summary, fit_score: company.score }
})
}
})
Customize
- Change the source list from
AttioList.Pipeline.NewDeals to your own intake stage.
- Add owner routing if different teams should get different alerts.
- Write back only the fields your CRM layout already uses.