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.
How it works
Section titled “How it works”- JustAI checks Salesforce for deals whose status changed since the last check, at the interval you set.
- For each change to a status you mapped, JustAI sends the event you named to the deal’s contact. Other status changes send nothing.
- The event carries the deal’s ID, its
status, itsprevious_status, and the deal fields you added. The ID’s name comes from the object:opportunity_idfor an Opportunity. - Journeys that start on, wait for, or exit on that event act on it like any other customer event.
Before you begin
Section titled “Before you begin”- 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.
Set up deal events
Section titled “Set up deal events”-
In JustAI, open Settings, then Integrations, and open your Salesforce connection.
-
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
StageNameor a custom field. - Contact: the field that names the deal’s contact.
-
Under Events, pick a Status value and enter its Event name, like
deal_funded. Add one row per status that should send an event. -
Under Event details, add the deal fields your journeys need. Every event already has the deal’s ID, its status, and its previous status.
-
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.
-
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.
Choose how often to check
Section titled “Choose how often to check”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.
Use the events in a journey
Section titled “Use the events in a journey”Pick the event as the journey’s entry or exit:
- Entry: people enter when
deal_approvedarrives. - Exit: people leave when
deal_fundedarrives, so a funded applicant stops getting approval reminders.
One run per deal
Section titled “One run per deal”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.
Check your work
Section titled “Check your work”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.
