When a Contact is created or LinkedIn_Profile__c is updated, CTD enriches the record and emails the account owner with warm paths, optional Claude draft links, and ghost-email share via CTD API from Claude.
Record-triggered on Contact. Apex: paths callout, reachable-person callout, six-field DML, then email.
New Contact or LinkedIn_Profile__c updated (non-blank). Flow runs async after commit.
Up to 5 warm intros (1st + 2nd degree). Builds HTML email body and subject.
GET …/v2/global/pathsPath counts, CTD score, and target-persona from CTD. 404 returns empty values.
GET …/v1/reachable-personWrite CTD_Total_Paths__c, scores, and target flag from reachable-person. 404 clears all six.
HTML email with recommended path, alternates, and per-path Claude draft links. Greet Owner.FirstName.
AE opens claude.ai/new?q=… from the email (one link per path). Claude drafts subject and body for the connector to send.
AE asks Claude to call CTD’s ghost emails API. The draft lands in the connector’s CTD inbox to review, edit, and send. Not a manual forward over email or Slack.
POST …/asks-api/…/ghost-emailMessaging.sendEmail (3a). No callouts after uncommitted DML.
Named Credential CTD_API_NC · Enterprise key · https://api.ctd.ai
Play 1 uses up to 5 paths from paths[] for the owner email: recommended intro,
alternates, connector names, overlap context, and per-path Claude draft links.
Sample shows 8 paths returned; Apex displays the top 5.
Expand to load example…
Play 1 maps six fields on Contact from person:
total_paths, total_2nd_degree_paths, ctd_score, ctd_score_scaled, ctd_score_label, is_target_person.
Other fields are returned for context but not written to Salesforce.
{
"person": {
"name": "Drew Sechrist",
"linkedin_id": "drewsechrist",
"title": "Co-Founder & CEO",
"company_name": "Connect The Dots",
"company_linkedin_url": "https://www.linkedin.com/company/connect-the-dots-ai",
"location": "San Francisco, California, United States",
"is_target_person": true,
"ctd_score": 10009.5834633,
"ctd_score_scaled": 3,
"ctd_score_label": "strong",
"person_ctd_url": "https://app.ctd.ai/people/d9ccfe12-db14-46ba-9d89-e4329f00c9b9",
"company_ctd_url": "https://app.ctd.ai/companies/e04461e9-4a24-4468-8307-c4c3ec60de56",
"total_paths": 1628,
"total_2nd_degree_paths": 265,
"total_strong_paths": 222,
"current_roles": [
{
"title": "Co-Founder & CEO",
"company_name": "Connect The Dots",
"domain_names": [],
"ctd_url": "https://app.ctd.ai/companies/e04461e9-4a24-4468-8307-c4c3ec60de56",
"is_current": true,
"is_primary": true,
"when_started": "2019-01-22T23:00:00.000Z",
"when_ended": null,
"company_industry": null
}
],
"former_roles": [
{
"title": "CRO",
"company_name": "Rocketrip",
"domain_names": [],
"ctd_url": "https://app.ctd.ai/companies/59842941-63f4-4c38-b773-b0bedce8526c",
"is_current": false,
"is_primary": false,
"when_started": "2016-07-14T22:00:00.000Z",
"when_ended": "2017-06-14T22:00:00.000Z",
"company_industry": null
},
{
"title": "Investor, Advisor, Traveler, Student",
"company_name": "Investor, Advisor, Traveler, Student",
"domain_names": [],
"ctd_url": null,
"is_current": false,
"is_primary": false,
"when_started": "2014-11-30T23:00:00.000Z",
"when_ended": "2016-05-31T22:00:00.000Z",
"company_industry": null
},
{
"title": "CEO",
"company_name": "Koozoo",
"domain_names": [],
"ctd_url": "https://app.ctd.ai/companies/301d2070-05c6-40ba-ba73-4d2c7feb1ba9",
"is_current": false,
"is_primary": false,
"when_started": "2010-03-31T22:00:00.000Z",
"when_ended": "2014-11-30T23:00:00.000Z",
"company_industry": null
},
{
"title": "VP, High Tech Vertical",
"company_name": "Salesforce",
"domain_names": [],
"ctd_url": "https://app.ctd.ai/companies/250e1b51-203f-4056-8c7a-b451734abc7b",
"is_current": false,
"is_primary": false,
"when_started": "1999-11-01T23:00:00.000Z",
"when_ended": "2010-04-01T22:00:00.000Z",
"company_industry": null
}
]
}
}
| Salesforce | API field | Meaning |
|---|---|---|
CTD_Total_Paths__c | total_paths | Path count |
CTD_Total_2nd_Degree_Paths__c | total_2nd_degree_paths | 2nd-degree paths |
CTD_Score__c | ctd_score | Raw score |
CTD_Score_Scaled__c | ctd_score_scaled | Scaled (1–3) |
CTD_Score_Label__c | ctd_score_label | weak / medium / strong |
CTD_Is_Target_Person__c | is_target_person | Target persona |
Trigger input: LinkedIn_Profile__c
| Field | AE | Why |
|---|---|---|
CTD_Total_Paths__c | Show | Path signal |
CTD_Score_Label__c | Show | Plain language |
CTD_Is_Target_Person__c | Show | ICP fit |
CTD_Total_2nd_Degree_Paths__c | Optional | Power users |
CTD_Score__c | Optional | Raw numeric |
CTD_Score_Scaled__c | Optional | Scaled 1–3 |
| Greeting | Hi {Owner.FirstName}, |
| Subject | Warm intro to {target} at {account} |
| To | {!$Record.Owner.Email} in prod |
| CTA | Draft in Claude per path → share ghost email via CTD API |
| Flow | Contact_LinkedIn_CTD_API_Enrichment |
| Apex | CTDContactPathsEmailAction |
| Perm set | CTD_Contact_Enrichment_Fields |
| Package | sf-flow-ctd-email/ |
toAddress → {!$Record.Owner.Email}CTD_API_NC configured