1. Home
  2. Docs
  3. Setting up Workflows
  4. Actions based on any entity update/insert event

Actions based on any entity update/insert event

Before we build a simple workflow to explain how can you execute actions based on entity update/insert events, let’s briefly explain what are entity updates and insert event.

Remember, events are concrete components in business. In the context of Flexie CRM, entities may be leads, contacts, accounts, deals, cases and custom entities. Entity updates refer to any change made in the entity’s fields such as first name, last name, phone number, country, etc.

For example, a user within the CRM changes a lead’s first name,  a contact’s phone number and so on. Entity insert, on the other hand, refers to records(leads, for example) captured by the CRM. Leads may come from various channels like forms, your marketing campaigns, social media, etc.

To better understand how you can take actions on any entity update/insert event, let’s consider a concrete example. Let’s say you want your workflow to execute actions when leads field are inserted, and when a new lead is captured by the CRM. First, go to Workflow and then click Manage Workflows on the drop-down menu.

Manage workflows

You should see the following screen:

New workflow

Next, go the upper-right corner of the screen and click New.

New

Select Lead as your workflow entity type.

Select workflow entity type

Give a name and a description to the workflow, choose a category (optional) and then click Launch Workflow builder.

Workflow builder

Next, go to Workflow Sources and choose the Entity Events button.

Entity events

Let’s first consider the scenario where a lead is captured by the CRM. Suppose it has come from a lead form you have built on your website. You want a user within the CRM (a sales rep, for example) to follow up on that lead. To do all that, first go to Entity Events and choose on Entity Insert. Next, click Add.

Workflow source

You want the workflow to execute an action. Say you want to send a text message to a user upon the lead entering the CRM. Go to actions and click Send sms notification.

Send sms notification

Give it a name, set an action timing. Since you want the user to be notified as soon as the lead enters the CRM, you should choose When Triggered. Next, choose the user who is going to receive the sms notification. Last but not least, write the notification message and then click Add.

Send sms notification form

Let’s say the lead does not have a owner. You want the workflow to execute another action, only if the lead does not have an owner. Go and click the Conditions button.

Conditions

Give it a name and then proceed to adding the rule. On Lead Fields choose Owner. On the right choose is null. The conditions read like this: Owner is null. In other words, the lead does not have an owner. Next, click Add.

Add rule

Say you want to update the lead’s owner. Go to Actions and click the Update lead’s owner button.

Update lead's owner

Give it a name, choose When Triggered and then select the owner of the lead (it can be a specific user or a group). Next, click Add.

Update lead's owner form

The workflow we’ve built thus far will do the following: once a lead enters the CRM, a sms notification will be sent to the specified user/group, in real time. If the lead does not have an owner, the workflow will add one as specified.

All these actions happen in real time. Let’s now consider the second case, that of taking actions on any entity update. Suppose you want the workflow to take actions when a lead’s phone number is updated.

You want the workflow to execute actions on both: lead’s insert and update. So what you want to do is go to Entity events, and add On Entity Update. Next, go to On fields change and choose the lead field. You can choose one or more, depending on your  needs. Next, click Update.

Entity update

Any time the lead’s field(s) get updated, the workflow will execute actions. For example, if a lead’s phone number is changed, you want the workflow to send a user a web notification. To do this, go to Actions and choose Send web notification.

Send web notification

Give it a name, choose When Triggered, select the user or group who will receive the web notification, write the notification title, the message and then click Add.

Send web notification form

Once a lead’s phone number is update, the user/group specified will automatically receive a web notification. It all happens in real time: a lead’s phone number is modified and the user/group receives the notification instantly.

This is just one of the many concrete example of executing  actions upon an entity update/insert.

To stay updated with the latest features, news and how-to articles and videos, please join our group on Facebook, Flexie CRM Academy and subscribe to our YouTube channel Flexie CRM.

How can we help?