Skip to main content

Updated Oct 31, 2026Verified against the product Oct 31, 2026

Write Agent Results Back to Your CRM

The most useful agents don't just decide — they put the result where your team already works. In an AI Agent flow's Act step, you can write back to Salesforce or HubSpot so a health field, a risk flag, or a next step shows up on the record your AE or CSM already opens. This guide covers the functions to use and how to do it safely.

The CRM functions​

Use these in a CALL step (or as tools on an AGENT step). Full signatures are in the Functions reference.

GoalFunction
Read a Salesforce record before decidingsalesforce.read_record
Update a field on a Salesforce recordsalesforce.update_record
Create a Salesforce recordsalesforce.create_record
Read a HubSpot recordhubspot.read_record
Update a field on a HubSpot company, deal, or contacthubspot.update_record
Anything the above don't cover (e.g. enroll a contact in a sequence)data_connection.request — an authenticated call to the CRM's API through your connection

Example: surface churn risk in the CRM​

Pair this with the Churn-Risk Watch agent: after the agent decides an account is at risk, its Act step calls hubspot.update_record (or salesforce.update_record) to set a Health or Risk property on the company or deal. Now the risk is visible in your sales team's CRM views and reports — and, with the HubSpot app card, right on the record.

Do it safely​

Writing to the CRM is an Auto action — it changes a system of record — so treat it deliberately:

  • Start with internal fields (a FunnelStory-owned health/risk property), not customer-facing ones.
  • Read before you write when the update depends on current state (*.read_record).
  • Test on one account before you publish, and check the record updated as expected.
  • Prefer update over create unless you genuinely need a new record.

Build it​

  1. Connect your CRM — see Salesforce or HubSpot.
  2. In the flow, add a CALL step with the CRM function, and map the record ID and the fields to write (usually from an earlier AGENT step's output).
  3. Test the flow on a recent account, then publish.