Editing Process Paths and time based automation

Wednesday, Jun 29, 2016

When automating documents it can be useful to send an email or export at a specified time, for example when you wish to send a reminder for a student to attend a course two days before the start, or a follow up feedback form request a week after a course. If you couple this with other features of process steps and process paths you can trigger reminders for people to pay 5 days after registering, if the student has not already paid. When automating the management of courses you may also wish to promote a course on social media (Facebook, Linkedin etc) automatically when a course is scheduled.

Configuration for Time based automation is on the Process Path (under the Automation tab). Each process step has the option to be automated. Course Dates and Document can be automated.

Warning
When setting this up on existing documents that use existing process paths and new process steps - the new timed steps will apply to all documents on that path within the +/- 2 days of the specified time - so if you plan to send emails ALL documents that fall within that period will be processed.

Keep in mind that when you set up a process step as timed and the step is executed if the step has been processed previously eg. manually applied at an earlier time, so that step already exists in the workflow history, then the automated step will NOT execute.

Course Dates

Process steps for Course Date time based automation have the following options:

Time Triggered Rule, options are:

  • None; the default selected option

  • Relative to Course Start; available for International Training Company license and above

  • Relative to Course End; available for Reseller license only

  • Relative to Document received; this is not applicable for course dates, and is reserved for future applications.

Relative Days, this is a numerical value of the days before (negative values) or after (positive values) of the triggers, eg if Time Triggered Rule has ‘Relative to Course Start’ and Relative Days is 5 that means the Process Step is triggered five days after the Course Start Date.

Documents

Process steps for Document time base automation have the following options:

Time Triggered Rule, options are:

  • None; the default selected option

  • Relative to Course Start; available for International Training Company license and above

  • Relative to Course End; available for Reseller license only

  • Relative to Document received; available for Reseller license only - only after, not before ie relative days need to be positive, not negative.

Relative Days, this is a numerical value of the days before (negative values) or after (positive values) of the triggers, eg if Time Triggered Rule has ‘Relative to Course Start’ and Relative Days is -5 that means the Process Step is triggered five days before the Course Start Date.

Note that there is a ‘window’ of about 72 hours (it depends on load and other factors) where emails are sent for a particular timed step, then it stops sending (this is to avoid a timed process step running on documents far into the past). This means however that if you intend on running this step on a large number of documents at the same time you have to be sure that the number of documents can comfortably run within the window, eg: with an automated workflow service of 1/10 minutes the maximum number of emails is between 200-432 emails - and that is if there is no other load on the server, the actual number that could be processed within that time might actually be much less than the maximum. Some servers that while having the service set to 1/10 minutes actually run at 1/20 minutes on average.

Document Enquiry Status, options are:

  • Any Status; the default selected option, if selected this means that the enquiry status will be ignored.

  • Did not enquire; no enquiry status is set on the Document

  • Enquired; Enquiry was made on the Document

  • Enquiry cancelled; Enquiry was made but is now cancelled

Document Registration Status, options are:

  • Any Status; the default selected option, if selected this means that the registration status will be ignored.

  • Did not register; no registration status is set on the Document

  • Registered; Registration was made on the Document

  • Registration cancelled; Registration was made but is now cancelled

In addition to the Time Triggered Rule field values the prerequisite process step and missing prerequisite process step still apply. This means that if a step does not have a prerequisite step in the workflow history it will not be triggered, and, if set, the Missing Prerequisite Process Step will be.

Automatic Workflow Service

Ensure that the workflow service is set up - this does not need to be run frequently, unless you have many documents being processed. It will start in the morning, the moment the date changes and run for each document the rules say should be processed. This only needs to be done once. After running for the first time the process step and path will be added to the service for each step to be carried out automatically.

Simulate timed steps

Used for Debugging and testing you can run the following script to run the cron job that triggers sending the emails that match the criteria.

https://<shortname>.coursesales.com/t/tcs?type=37

Here is an example of the output from this being executed (notes are in bold):

Records processed:0 ids: 356509 new Status created:1  - summary of the work done, in this case nothing was processed (as this is a simulation): Document Id 356509 would be updated with a status.
Orchestration Process Path Time Triggered

Service found, settings are:

ProcessStepID = 3859 - the next process step on the above path to have a timed execution

ProcessPathId = 613 - the next process path set up to have a timed step

End of settings



Found 3 Process Paths with automation rules:

614 Documents Document - HLTAID001 Public Path timed steps: 1794,3859  - the path (614) and all the steps (1794,3859) on that path that have timed configurations



613 Documents Document - HLTAID002 Public Path timed steps: 3859



533 Documents Document - HLTAID004 Public Path timed steps: 3859,3848
Process Steps iteration: 1

Chose Path ID: 614...Process Step ID: 1794

Found 1 Documents

New status for 356509
Orchestration Document - Save / Add
Process Steps iteration: 2

Chose Path ID: 533...Process Step ID: 3859

Found 0 Documents
Process Steps iteration: 3

Chose Path ID: 533...Process Step ID: 3859

Found 0 Documents
Process Steps iteration: 4

Chose Path ID: 614...Process Step ID: 3859

Found 0 Documents
Process Steps iteration: 5

Chose Path ID: 613...Process Step ID: 3859

Found 0 Documents
Process Steps iteration: 6

Chose Path ID: 533...Process Step ID: 3859

Found 0 Documents
Process Steps iteration: 7

Chose Path ID: 613...Process Step ID: 3859

Found 0 Documents
Process Steps iteration: 8

Chose Path ID: 613...Process Step ID: 3859

Found 0 Documents
Process Steps iteration: 9

Chose Path ID: 533...Process Step ID: 3859

Found 0 Documents
Process Steps iteration: 10

Chose Path ID: 533...Process Step ID: 3859

Found 0 Documents

Created: 1 Status records, finishing

Troubleshooting the timed workflow when using prerequisites and missing prerequisite steps

  1. Does the step export as expected eg send an email/export etc?

  2. Does the timed step without prerequisites work as expected?

  3. Does the prerequisite step work without timed configuration as expected?

  4. Do the prerequisite configuration and timed step work together?

Remember to:

  • always create a new document, as a document the timed step will not be applied again.

  • ensure that the Timed Workflow service is not enabled (it might apply the step before you can check the simulation)

  • use the simulation to see if it will work: https://<shortname>.coursesales.com/t/tcs?controller=t&action=tcs&module=default&type=37