Condition Stages in Workflow allows you to dynamically look at date values in the contact record, below are a few usage examples.
3 months before contract renewal
1. Firstly, we give the condition a description, and then set the rule execution to ‘Execute rules periodically until a wait period is reached’. This will allow the condition to keep checking the date of the contact over a period of time.
2. In this instance, we want the condition to check over the whole year, so under the “wait period” tab we choose 365 days.
3. We then want to insert a new ‘GatorMail Contact Rule’ and choose the Date attribute we wish to look at; in this case it is the ‘ContractRenewalDate’.
We then select the operator which will be “Is Less Than Or Equal To” as we are wanting to find a date that is Equal to or less than 3 months in the future. Then finally we tick “The current date/time at evaluation of the condition” checkbox.
4. We then want to set the rule to look at 3 months BEFORE the date in “ContractRenewalDate” so we insert this under Target Adjustments as below:
5. When I come to test the condition in the workflow, I want to set a test contacts ‘ContractRenewalDate’ however many days/months previous Im looking at to the current date and time. So, for example if today’s date is 16/02/21 12:00 and I want to test the above condition, I would set the date to 16/05/21 12:00 which should mean that the contact can pass through that condition and go down the positive route as their ContractRenewalDate is 3 months after todays current date and time of evaluation.
Please note: If we need the above condition to trigger for anyone that has a date of 3 months or more away from the current date/time, then we would change the operator to “is greater than or equal to” instead.
1 month after contract renewal
If we want the condition to trigger on 1 Month AFTER a contract start date:
- Firstly, we give the condition a description, and then set the rule execution to ‘Execute rules periodically until a wait period is reached’. This will allow the condition to keep checking the date of the contact over a period of time.
2. In this instance, we want the condition to check over the whole year, so under the “wait period” tab we choose 365 days.
3. We then want to insert a new ‘GatorMail Contact Rule’ and choose the Date attribute we wish to look at; in this case it is the ‘ContractStartDate’.
We then select the operator which will be “Is Less Than Or Equal To” as we are wanting to find a date that is Equal to or less than the date in question adjusted by the target adjustment. Then finally we tick “The current date/time at evaluation of the condition” checkbox.
4. We then want to set the rule to look at 1 months AFTER the date in “ContractStartDate” so we insert this under Target Adjustments as below with a minus symbol in front as we are looking backwards at the date.
5. When I come to test the condition in the workflow, I want to set a test contacts ‘ContractStartDate’ to a month previous to current. So, for example if today’s date is 16/02/21 12:00 and I want to test the above condition, I would set the date to 16/01/21 12:00 which should mean that the contact can pass through that condition and go down the positive route as it’s a month previous to the current date and time.
Please note: If we need the above condition to trigger for anyone that has a date of 1 month or more after the current date/time, then we would change the operator to “is greater than or equal to” instead.