Conditions
This block allows you to create field conditions in a simple way.
You could build nested groups with AND and OR combinations.
It is also possible to check fields of related records, like Accounts from Contacts or the last modified user of a record.
Every group of conditions is either connected by AND or OR.
OR | One Condition within this group must be true |
AND | All Condition within this group must be true |

Custom Condition
To use this block you need basic PHP development skills!
If you use it wrong, you could break the workflow.
This task will execute a custom Expression and continue the workflow with the path you set with return value.
This task could also be used to initialize $env variables.
The only requirement of this task is to return the string “yes” or “no” to define the output the workflow should take.
Example 1
This example will init some variables and continue in any situation with the “true”/“yes” output.
$env["variable"] = false; $env["variable2"] = 1; return "yes";
Example 2
This example will process values, the user input during a request form.
$output = "no"; if($env["value"]["checkbox"] == "on") { $output = "yes"; } return $output;
Delay
When this block never continues, check if the cronjob of vTigerCRM is configured.
This task allows you to insert one or more delays into your workflows, which pause the execution until a given date/time will be reach.
Options
You could combine multiple of this options, to use this universally
- Base Date
- Use the date from this field as base date and apply all options to them
- Dynamically updated base date means, the delay will be updated if you modify the field, which was selected as base date.
So you could wait a period of time, which could be defined by users and could be modified after the delay was initiated
- minimum delay
- This Option guarantee a minimum wait time if you never want to act immediately
Also this is the default delay, if you simple want to wait 1 houryou could set minutes/hours/days/weeks
- This Option guarantee a minimum wait time if you never want to act immediately
- wait until next …
- this option wait until one selected day of week is reachedor wait until the given day of a month is reached
- wait until time is
- if you don’t want to continue this workflow before 8 o’clock, you can do this with this option.
(Please pay attention to the correct timezone)
- if you don’t want to continue this workflow before 8 o’clock, you can do this with this option.
- wait until custom time
- Here you could integrate your own custom function
You must return an Unix Timestamp, which overwrite the base date (All other options will be applied to this date, instead the selection of base date!)
- Here you could integrate your own custom function
If you want to wait until a field has a configured value, please combine the features of delay and conditions. (For example if you want to wait until a checkbox was set)
Execution type
With this task you could define tasks, which will only be executed if the workflow is started automatically/manually.
Example
You have a organization workflow, which will wait 7 days after creation of a new organization and after this time, send an email to the customer.
If you would have the option to send this email manually directly in the Workflow sidebar, without waiting 7 days you could integrate the delay in the path of the automatically execution.
Global Search
You want to check if a record exist in the vtigerCRM, which isn’t related to the current one?
Maybe you want to check if there is already a record with the same email address.
The conditions could be created equal to the conditions task.
Also you could define how much results are necessary at least to return “true”. Otherwise the task will return “false”.
“Store result Records in the following Environment Variable”
allows you to store the Records you found into the Environment to use them in a “generate recordlist” block.
Process results
When you store the result records, you can use these values within following actions to work with result ids.
You can access them by using the following structure:
$env["storeresultname"]["ids"][0] $env["storeresultname"]["ids"][1] $env["storeresultname"]["ids"][2] for($i = 0; $i < count($env["storeresultname"]["ids"]); $i++) { // do something with $env["storeresultname"]["ids"][$i] }
Once per ID/Request
Imagine the following situation:
You have 3 independent Workflows with trigger “on every Save” and some “set values” actions.
The first check if a field “was changed” by user and then do some modifications of external data. If the user change this field, all 3 workflows are executed.
Problem in this situation is, that also the second and third workflow will trigger the first workflow, because they also save the record on the end.
So your Workflow 1 is executed 3 times. And because of the “was changed” calculation of VtigerCRM, all 3 executions will pass the condition.
To make sure you do some modifications only during the first execution, you can use the action “Once per ID/Request”. This block have 2 outputs.
The top one will be used for first execution of this block for current Record ID and during current HTTP Request / cronjob etc. The lower output will used for any other execution.
Executions of same workflow, but different CRM record’s will be handled separately. So always the first execution per record will use the top one.
Redirect User to a custom URL
This task could redirect the User to a custom URL or a PDF, which was generated by a PDFMaker Template.
If you define a custom URL you could use all values from the currenct Record, like in other Text fields to generate individual URLs.
The executing User will be redirected to these URL not directly after this block, but after the Workflow was completed or delayed.
CAUTION!
This means no more Workflow will be executed after the current one!
Also possible other modules will be “kicked” if you use this function.
The current structure of vtigerCRM don’t allow another way to integrate this feature.
Also if you redirect to a PDF after a user saved a record, the User will stick on the DetailView, because the redirection to the DetailView must be overwritten with the one to the PDF.
Run external Workflow
You could execute an external workflow from the current Module you would execute with the current record.
You could only choose workflows from the Workflow Designer.
Also you could select the Workflow you want to execute by a variable string.
This last feature is probably only useful for the Test process if a new version will be released. I could enumerate through a big number of workflows without to need execute every one manually.
Stop Workflow
This task shouldn’t be used in workflows you use on production systems, because it stops the complete page and produce a blank page
It could help if you develop custom tasks and want to check some debug output.
This task is only useful in this dedicated situation.
If you only want to normally terminate the workflow, simple don’t connect a next task to a output.
Authorization Request
This action allows to integration approval processes with integration of team leaders. You can use this block to request approval for a record and continue the processing after approval was given. (Or do something else, when they is denied)
The approvals are shown on “Processes” page within the VtigerCRM menu. You can define the look of the approvals within the action.

The background color and info message defined the UI on approval page.
The checkbox “run direct after confirmation” configure, that the workflow is directly continued, when reviewer is set a decision. This can be time consuming, when there are multiple approvals. If not checked, the workflow is continued in background.
With the Timeout you can set a timeout, when expired, the predefined decision is applied.
Loop
Whenever an action or your javascript execution contains an array and you would like to do something on every value within the array, use this block.

Like a loop within development languages, you define start and end value,. Additionally the increment script is needed.
Then you can decide if the top output of this action is used for every value, an expression or a complete workflow with the same $env array is executed. The $loop variable is filled with the current loop index inside all executions.
Loop over records
This block is similar to the “execute expression on external records” or “execute workflow on external records”, but combine both options into a single action. So configuration is much easier.
