Freshsales uses a serial method of background process for executing the triggers. This means that when a record is created or updated through the product UI or API automations, there is an order of precedence with which the triggers will be executed.

Triggers - Order of Execution

The order of execution for triggers in Freshsales is as follows:

Order of Precedence

Trigger

1

Db commit happens post create/update.

2

Marketplace Event is triggered. Any App listening to this event will be executed right away

3

Lead data enrichment

4

Lead company or account data enrichment

5

Territory rule

6

Workflow automations

7

Implicit Lead scoring

8

Explicit Lead scoring

9

For the consolidated updates from Step 3-8, will be committed to the DB

10

Marketplace Event is triggered again. Any App listening to this event will be executed right away.

Advantages of Serial Background Updation

  1. More control on the order of execution

  2. Better predictability on the outcome of execution compared to parallel background updation resulting in enhanced performance of the CRM. 


To understand this better, let’s look at an example. Say, you create a lead named Fred Markley. As this is a manual action in the CRM, this will be reflected in the UI immediately. The automations or triggers related to James Markley will follow the order below before execution:

  1. If there is a Marketplace Event present, this will be triggered. Any App listening to this event will be executed right away

  2. The lead data enrichment for this record which is an automatic action will be queued first for execution. This includes first name, last name, full name, display pictures and personal social media profiles that would be retrieved using the email address of the contact.

  1. The lead’s company data fields such as company logo, company address, company phone number that are retrieved from the company website will be next in line for automatic updation.

  2. As this lead is from Michigan, the territory rule to automatically assign an owner is next in the queue for execution.

  1. Since Fred is a Webinar lead, the workflow automation that specifies that contacts with the source as ‘webinar’ would have the stage as ‘Interested’ will be queued for execution.

 

  1. Implicit Lead scoring - Lead score that helps determine if the contact is an ideal decision maker based on fields such as job title, company, industries and revenue.

  2. Explicit Lead scoring - Lead scoring based on observed or inferred behaviors such as web pages visited, content downloaded or webinars attended.

  3. Marketplace Event specified in step 1 is triggered again. Any App listening to this event will be executed right away.

The background execution for the above automations will be grouped and executed all at once.