Skip to content

Start journeys from Salesforce deals

Deal events turn a status change on a Salesforce deal into a customer event. For example, a deal moving to Approved can send deal_approved and start a nurture journey, and a move to Funded can send deal_funded and end it.

Each event goes to the JustAI profile of the deal’s contact, so profile sync has to have linked that contact first.

  1. JustAI checks Salesforce for deals whose status changed since the last check, at the interval you set.
  2. For each change to a status you mapped, JustAI sends the event you named to the deal’s contact. Other status changes send nothing.
  3. The event carries the deal’s ID, its status, its previous_status, and the deal fields you added. The ID’s name comes from the object: opportunity_id for an Opportunity.
  4. Journeys that start on, wait for, or exit on that event act on it like any other customer event.
  • Salesforce is connected and profile sync is on, so deal contacts exist in JustAI.
  • The integration user can read the deal object, its status field, and the field that links the deal to a contact. See the Prepare Salesforce.
  • You know which status values should send events, and what to name them.
  1. In JustAI, open Settings, then Integrations, and open your Salesforce connection.

  2. Under Deal events, select Set up, then choose:

    • Deals: the Salesforce object that holds your deals, such as Opportunity.
    • Status: the field whose changes send events, such as StageName or a custom field.
    • Contact: the field that names the deal’s contact.
  3. Under Events, pick a Status value and enter its Event name, like deal_funded. Add one row per status that should send an event.

  4. Under Event details, add the deal fields your journeys need. Every event already has the deal’s ID, its status, and its previous status.

  5. Under How often to check, choose every minute, every 5 minutes, every 15 minutes, or every hour. Each option shows how many Salesforce requests it makes in a day.

  6. Select Turn on deal events.

The panel shows Getting ready while JustAI reads your current deals. Events start with the next status change after that, so existing deals don’t all fire at once. Turning deal events off and on again repeats this read: changes made while they were off send nothing.

An event arrives within about one interval of the change in Salesforce. Checking more often costs more of the connection’s daily call limit: every 5 minutes is 288 checks a day, every minute is 1,440. Start with every 5 minutes. Choose every 15 minutes or every hour if deals change slowly or your org’s allowance is tight. See Keep API usage in check.

Pick the event as the journey’s entry or exit:

  • Entry: people enter when deal_approved arrives.
  • Exit: people leave when deal_funded arrives, so a funded applicant stops getting approval reminders.

A person can have several deals. In the journey’s settings, set Applies to to the deal ID field, such as opportunity_id, so each deal gets its own run instead of one run per person. A second deal then starts its own journey, and a repeat event for the same deal doesn’t start a second run.

Applies to controls only how runs start. When the journey exits on a deal event, add a filter to that exit condition, such as opportunity_id matches this entry’s opportunity_id. Otherwise one deal’s event ends the runs for all of that person’s deals.

Change the status of a test deal in Salesforce. Within one interval, the deal events panel counts a deal read and an event sent, and the event appears on the contact’s profile under Events in JustAI.

The panel also counts deals waiting for their contacts. A deal whose contact hasn’t synced yet waits up to 30 days for the contact to arrive, then is dropped. Deal events show Paused: API budget when the connection has used its daily call limit, and Needs attention with a message when JustAI can no longer read a field.