Home  >   Articles   >  Creating a Workflow
Articles in this section

Creating a Workflow

Learn about workflows and how to create them.
R
Ruba
27 Nov, 2023 - Updated 4 months ago
Table of Contents

Introduction

 

Automate your frequent or repetitive tasks with a one-time setup. 

Workflows let you create records, update field values, and more with the least amount of effort. They can ease your job and how! 

 

One of Vtiger’s unique features, Workflows, helps you streamline your business by automating some of your most common operations. You no longer need to perform tasks manually but simply ask a workflow to do it. Sounds easy, doesn’t it?

    Workflow Types

    Vtiger offers two types of workflows.

    1. Standard
    2. Multi-path

    Both workflow types ease your task by automating them. Additionally, multi-path workflows are mainly useful when you must specify conditions on the Picklist, Co-owner, and Assigned To fields.

    With multi-path workflows, you can specify separate actions on different values of a picklist.

    Consider the Sales Stage field in the Deal module. You can set up a single action for each of the field’s values, such as Negotiation, Closed Won, Closed Lost, etc. Similarly, you can set up different actions when the Assigned To field of a record has different users' names.

    To learn more about multi-path workflows, click here.
     

    Feature Availability and Limits

    Sales Starter Sales Professional Sales Enterprise One Professional One Enterprise
    Feature Availability
    Standard workflows
    Workflow field updates
    Limits on Workflows
    Standard workflows 25 50 75 75 150
    Actions allowed 6 8 8 8 8

    Note: 
    • The maximum number of Standard workflows you can create in Help Desk Starter and Help Desk Professional are 25 and 50, respectively.
    • The maximum number of workflow actions you can set up per workflow in  Help Desk Starter and Help Desk Professional are 6 and 8, respectively.
    Benefits:
    • Eliminate human errors, save human effort, and reduce labor costs by automating repetitive tasks. 
    • Increase productivity by avoiding confusion between isolated and remote teams with the help of automation.
    • Improve work satisfaction by leaving monotonous tasks to workflow automation. 

    Four Components of Standard Workflows

    To create a workflow, you must specify the following:

    1. The module on which the workflow is executed
    2. The trigger that will cause the workflow to execute
    3. Conditions based on which the workflow will execute its actions
    4. Actions that the workflow will perform when the conditions are met 

    To specify the details mentioned above, you must first access the workflow screen. 

    Follow these steps to access Standard workflows:

    1. Click the User Menu on the top right corner of the screen.
    2. Click the Settings button. You will and on the Settings page.
    3. Look for the Automation section.
    4. Select Workflows.
    5. Click the +New Workflow button.
    6. Select Standard
    7. Enter the following information:
      1. Basic information
      2. Workflow trigger
      3. Entry criteria
      4. Actions
    8. Click Save.

    We have divided the workflow setup into four components to make it easy for you to understand. 
     

    1. Basic information

    This section provides basic information about a workflow, such as its name, module, etc.

    You must fill out the following details:

    • Workflow Name: Specify the name of the workflow.
    • Target Module: Specify the module on which the workflow must execute, such as Deals, Contacts, Products, etc.
    • Status: Specify the status of the workflow - Active or Inactive. The workflow does not execute when the status is set to Inactive.
    • Description: Provide a brief description of what the workflow is used for, the actions it performs, etc.
     
    1. Workflow trigger

    Specify when the workflow must trigger by choosing an option from the following two fields:

    • Trigger Workflow On:
      • Record creation: Choose this option if you want the workflow to trigger when a record is created in the Target Module (mentioned in the previous section).
      • Record updation (includes creation): Choose this option if you want the workflow to trigger when a record is updated or created in the Target Module (mentioned in the previous section).
      • Time Interval: Choose this option if you want the workflow to trigger at a frequent time interval.
        • Frequency: Specify the frequency at which the workflow must trigger. To learn more about this option, click here.
    • Recurrence: This option is shown when you select Record updation in the previous section.
      • Only first time conditions are met: Triggers the workflow if the specified conditions are true. Once executed, the workflow will not trigger on the same record again. However, it will trigger on other records in the selected module.
      • Every time conditions met: Triggers the workflow on a record every time the specified conditions are true.

    1. Entry criteria

    Workflows are executed on records in the Target Module under Basic Information. More often than not, you might only need to perform actions on select records in the module. And that is when you will need to apply conditions and filter out records. 

    A workflow executes only on records that satisfy the condition that you specify.

    For instance, you want to create a workflow on the Contacts module that will send a greeting via email on a contact’s birthday. For this, you must specify the conditions as follows:
     

     

    You can specify multiple conditions using the +Add condition button. There are two types of conditions.

    • All conditions: It is based on the logical AND operation. Workflow executes when all the conditions are met.
     

    Condition 1

    AND
    Condition 2

    AND 

    Condition 3

    If one condition fails, the others are not executed.

     
    • Any condition: It is based on the logical OR operation. Workflow executes when at least one condition is met.
     

    Condition 1

    OR
    Condition 2

    OR

    Condition 3

    If one condition fails, the others are executed.

     

    Note: There is AND operation between All conditions and Any condition. The conditions mentioned under both ‘All conditions’ and ‘Any condition’ are applied in the entry criteria.

     

    Different types of conditions

    You can apply conditions on different fields in a module. And depending on the field, the type of condition may vary. Examples:

    1. You create a workflow on the Deals module. You want the workflow to execute its actions when the deal amount is more than 1000. So, the condition that you specify is Amount greater than 1000
     

    You can specify the condition using three fields. In the first field, you must select the field name (Amount). In the second, select the condition (greater than), and in the third, enter the amount (1000).

     
    1. You create a workflow on the Contacts module. The intent is to send an email to contacts two days before their support end date. 

     
     

    Select Support End Date in the first field, less than days later in the second, and enter 3 in the last field. 

     

    Below is a list of all the conditions available.

     

    Condition

    Meaning (Selected field value = Value in the first field, Specified value = Value in the third field)

    Equals

    Selected field value equals the specified value

    Not equal to

    Selected field value is not equal to the specified value

    Starts with

    Selected field value starts with the specified value

    Ends with

    Selected field value ends with the specified value

    Contains

    Selected field value contains the specified value

    Does not contain

    Selected field value does not contain the specified value

    Is empty

    Selected field value is empty

    Is not empty

    Selected field value is not empty

    Has changed

    Selected field value has changed

    Between

    Selected field value lies between the two specified values

    Before 

    Selected field value lies before the specified value

    After

    Selected field value lies after the specified value

    Less than days ago

    Selected field value was less than ‘n’ days ago

    Less than days later

    Selected field value is less than ‘n’ days later

    More than days ago

    Selected field value was more than ‘n’ days ago

    More than days later

    Selected field value is more than ‘n’ days later 

    In less than

    Selected field value is in less than ‘n’ days 

    In more than 

    Selected field value is in more than ‘n’ days 

    Days ago

    Selected field value was ‘n’ days ago 

    Days later

    Selected field value is ‘n’ days later

    Weekdays later

    Selected field value is ‘n’ week days later

    More than week days later

    Selected field value is more than ‘n’ week days later

    Less than week days later

    Selected field value is less than ‘n’ week days later

    Week days ago

    Selected field value was ‘n’ week days ago

    More than week days ago

    Selected field value was more than ‘n’ week days ago

    Less than week days ago

    Selected field value was less than ‘n’ week days ago

    Today

    Selected field value is today

    Tomorrow

    Selected field value is tomorrow

    Yesterday

    Selected field value was yesterday

    Previous FY

    Selected field value was in the previous financial year

    Current FY

    Selected field value is in the current financial year

    Next FY

    Selected field value is in the next financial year

    Previous FQ

    Selected field value was in the previous financial quarter

    Current FQ

    Selected field value is in the current financial quarter

    Next FQ

    Selected field value is in the next financial quarter

    Previous week

    Selected field value was in the previous week

    Current week

    Selected field value is in the current week

    Next week

    Selected field value is in the next week

    Previous month

    Selected field value was in the previous month

    Current month

    Selected field value is in the current month

    Next month

    Selected field value is in the next month



     

    Counting only weekdays using workflow conditions
    If you want to consider only weekdays, you can use the following workflow conditions:

    • Less than weekdays ago
    • Less than weekdays later
    • More than weekdays ago
    • More than weekdays later

    For example, to send an email to a contact three weekdays before the deal’s close date, you must set up the conditions as follows:

     

    In this case, workflows exclude non-working days based on what is specified in the business hours.

     
    1. Actions

    The Actions part defines what the workflow must execute after getting triggered and meeting the entry criteria. You can set up different types of actions. Refer to the table below for information.

     

    Action

    Definition

    Send Mail

    Send an email notification

    Invoke Custom Function

    Update target fields in a module by executing predefined functions when source fields in another module are updated

    Create Task

    Create a task record

    Create Event

    Create an event record

    Update Fields

    Update field in the selected module

    Create Record

    Create or update records in a module when entry criteria are satisfied 

    SMS Task

    Send an SMS notification

    Mobile Push Notification

    Notify user on their mobile with a Push Notification

    Webhook

    Notify your software application of changes that occur in Vtiger with HTTP callbacks



     

    Setting up workflows to update the Email Opt-in field when a contact subscribes or unsubscribes

    The Email Opt-in field determines whether a contact has opted to receive marketing emails from you. To learn more about it, click here.

    To save/update the date when a contact subscribes:

    1. Select the Contacts module under Basic Information.
    2. Set the Entry Criteria to Email Opt-in has changed to Double Opt-in.
    3. Create a custom field under Settings > Module Layouts & Fields, say Subscription Date, to update the subscription date.
    4. Create an Update Fields action to update the Subscription Date to the current date.

    To save/update the date when a contact unsubscribes:

    1. Select the Contacts module under Basic Information.
    2. Set the Entry Criteria to Email Opt-in has changed to Contact opted out.
    3. Create a custom field under Settings > Module Layouts & Fields, say Unsubscription Date, to update the unsubscription date.
    4. Create an Update Fields action to update Unsubscription Date to the current date.

    To learn more about the Update Fields action, click here.

    Tip: To send workflow emails to contacts that have opted out, you must enable a setting in Email Settings. Refer to Other Settings to ensure email delivery for contacts who have opted out in the Email Campaigns article to learn more.

     

    Note

    1. Workflows can create/update records in the CRM account owner's name, even if record owners do not have Write permission. This is called the account owner context.
      1. Example: Consider a workflow that is configured to create a deal record when Lead Status = Hot. Let us say, a sales rep who does not have Write permission for Deals edits a lead record and sets Lead Status = Hot. As a result, a deal record gets created with the Created By and Last Modified By fields having the CRM account owner's name.
    2. Scheduled workflows always run in the account owner context.
    3. Create and Update actions are done in the account owner context to ensure that profile-level restrictions do not block workflows.

    Deactivating a Standard Workflow

    Follow these steps to deactivate a standard workflow:

    1. Click the User Menu on the top right corner of the screen.
    2. Click the Settings button.
    3. Look for the Automation section.
    4. Click Workflows.
    5. Click the Standard tab on the top left side of the workflow list.
    6. Select a module from the drop-down on the top to view its related workflows.
    7. Select a workflow.
    8. Disable the toggle button on the left side of the workflow to deactivate it.

    Deleting a Standard Workflow

    Follow these steps to delete a standard workflow:

    1. Click the User Menu on the top right corner of the screen.
    2. Click the Settings button.
    3. Look for the Automation section.
    4. Click Workflows.
    5. Click the Standard tab on the top left side of the workflow list.
    6. Select a module from the drop-down on the top to view its related workflows.
    7. Select a workflow.
    8. Hover over a workflow and click the Delete icon to delete it. 
    Was this article helpful?
    3  out of  3  found this helpful.
    Comments 0
    Be the first to comment
    © Copyright 2023 Vtiger. All rights reserved.