Solodev allows you to create custom workflows that trigger certain actions when certain conditions are met. For example, if a site visitor fills out a form and they name their source as "social media" you can create a custom workflow that triggers an email specific to the social media department in your organization. Alternately, if a site visitor fills out a form and specifies a product or service they are interested in, you can trigger a series of actions based on that condition.
|Name||The name of your custom workflow. It is important that the name of your workflow indicates the nature of the workflow because one datatable can have dozens if not hundreds of custom workflows associated with it.|
|Type||All workflows are custom.|
|If Statetement||An if statement checks to see "if" a certain condition is met.|
|Then Statement||This is the function that triggers "if" the condition specified in the "if statement" is met.|
|Variables||This declares the variables used in the "if" and "then" statements that compose the workflow.|
Let's walk through the example workflow to give you a better idea of how this process can be leveraged to trigger automation when your forms are filled out.
Unlike standard PHP conditional statements, an "if" statement cuts right to the point by setting the condition. In the example below the condition is a form field called "source" being equal to "social media".
This is where your specify the trigger that is fired when the condition in the "if" statement is met. It is typically a PHP function. In this case, the function is sendTickler(), a native Solodev function that sends an email based on the set parameters whose values are set in the variables section below.
This is where you declare your variables. So once the condition is met, the sendTickler() function is triggered but without variables, it will fail. Here I set the variable email to firstname.lastname@example.org and the subject of the email to "Contact Form: Social Media" as an example.