What you need
- A Salesforce connected app with OAuth enabled and the
apiandrefresh_tokenscopes, plus a refresh token from the OAuth flow. - Your instance URL (for example,
https://yourorg.my.salesforce.com). - The object to write to (for example,
Opportunity) and the record-id CRM field your calls carry to reference the record (the default issalesforce_id). - A field map: which Recap field writes to which Salesforce field.
Connect
- In PyAI Console, open Integrations and find Salesforce under CRM.
- Click Connect and enter the instance URL, client id, client secret, refresh token, object, and record-id field.
- Define the field map, for example:
- Leave Create a follow-up Task on if you want a rep-facing Task with the TL;DR and summary after each call.
- Save. Every completed call writes back from then on; each Recap record carries a CRM write status so you can see the result per call.
Troubleshooting
- crm_write_status: failed:missing_record_id. The call did not carry the
record-id field (default
salesforce_id) in its CRM fields. Include it in the call metadata, or setrecord_id_fieldto the key you use. - crm_write_status: failed:… token. The refresh token was revoked or the connected app changed. Re-run the OAuth flow, update the config (omitted secret fields are preserved).
- crm_write_status: skipped:no_config. Salesforce is not enabled or the field map is empty; complete the config in the console.
- Field not writable. A field in your map does not exist or is read-only on that object; Salesforce rejects the PATCH and the status shows it. Fix the field API name in the map.