Creating a Recurring Job
This article describes how to set up recurring Jobs in CreataCRM.
We'll be setting up a Job Template, a Tag and a Scheduled Workflow to accomplish this.
Create a Job Template
See Creating a Job Template for instructions on how to create a Job Template.
Create a Tag
Tags can be found under the Marketing heading in the navigation.
This tag will be used by the Workflow to create recurring jobs.
For more information about creating a tag, see the article about Creating a Tag.
Add contacts to the tag
Click the Link button.
In the popup, select the contacts you want to create the Jobs for, then click the OK button.
Create a Scheduled Workflow and define the Schedule
See the article about Creating a Scheduled Workflow for more information.
For this, you will want the Target Object Type to be Tag, and the Criteria should make sure that it only looks at the tag that was created previously.
Example workflow schedule
Below is an example recurrence schedule for this workflow - it will run at 10am on Monday every 4 weeks.
Also see the end of this article, there is an example workflow definition that you can import and build on, if required.
After the workflow has run
With the example where the Recurring Jobs Tags has 4 contacts linked to it...
The following Jobs are created.
Workflow Definition
You can import the following definition as a starting point for your Recurring Jobs workflow. For each contact linked to the tag, this workflow will create a Job from a template, then assign the Primary Contact and the Primary Company of the Job based on the Contact.
See the article about Importing Workflows for instructions on how to accomplish this.
<xml xmlns="http://www.w3.org/1999/xhtml"><block type="controls_forEach" id="1" x="14" y="8"><field name="Argument">contact</field><value name="Values"><block type="get_member" id="2"><field name="TypeName">CreataCRM.Library.Tags.Tag</field><field name="TheField">Contacts</field><value name="TheObject"><block type="target_object_get" id="3"></block></value></block></value><statement name="Handler"><block type="variables_set" id="4"><field name="To">job</field><value name="Value"><block type="CreateJobFromJobTemplateBlock" id="5"><value name="TemplateName"><block type="text" id="6"><field name="TEXT">Recurring Job</field></block></value></block></value><next><block type="set_member" id="7"><field name="Typename">CreataCRM.Library.Invoices.Job</field><field name="FieldName">PrimaryContact</field><value name="Object"><block type="variables_get" id="8"><field name="VAR">job</field></block></value><value name="NewValue"><block type="variables_get" id="9"><field name="VAR">contact</field></block></value><next><block type="set_member" id="10"><field name="Typename">CreataCRM.Library.Invoices.Job</field><field name="FieldName">PrimaryCompany</field><value name="Object"><block type="variables_get" id="11"><field name="VAR">job</field></block></value><value name="NewValue"><block type="get_member" id="12"><field name="TypeName">CreataCRM.Library.Contacts.Contact</field><field name="TheField">PrimaryCompany</field><value name="TheObject"><block type="variables_get" id="13"><field name="VAR">contact</field></block></value></block></value></block></next></block></next></block></statement></block></xml>