The good news is, that it is not very difficult to have CRM automatically create recurring goal instances. Here is one way to do it:
1. Create a goal schedule entity
In my example, I’ve created a custom entity called goal schedule. This entity has two fields: A lookup to goal and an option set for Goal Type. Goal type includes the options daily, weekly, and monthly.
2. Create a workflow
Create a workflow called “Goal Recursion” triggered on create of a Goal Schedule record. Insert a wait condition to timeout 1 minute after the “To” field on the goal. Insert a check condition substep checking if the Goal Type equals “Daily.”
If the Goal Type equals daily, then create a goal, mapping the values of the original goal record to the new goal record, and setting the “From” and “To” values to 1 day after their original goal values.
Then add a substep to update the Goal Schedule record and set the lookup link for Goal to the newly created goal record.
Add a conditional branch for if the Goal Type equals “Weekly.” As we did in the Daily conditional branch, create a new goal record, this time setting the To and From fields to 7 days after the original goal’s date values, and set the Goal Schedule goal lookup to the newly created goal record.
Now we have a workflow that will allow you to configure any goal to automatically get recreated on a daily or weekly basis. You could also do this same approach for monthly goals; however, one thing to consider with monthly intervals is that different months have a different total number of days. So if you have the workflow add 1 month to January 31, it will set the next record to February 28th (or 29th on leap year). However, If you add 1 month to February 28th, the next record will be set to the 28th of March, not the last day of the month.
My recommendation for monthly goals is to set the interval from day 1 to day 1—January 1 to February 1, for example. Adding a month to the first day of the month always falls on the 1st of the month, and if you look at the time associated with the “To” value on a goal, it uses 6:59 AM, so you would want to go to the first of the month to include every day of the prior month.
So now for my recurring goals, I just create the first goal record, create my goal schedule record, and CRM will automatically recreate the goal on the desired interval.
Post by: Joel Lindstrom,