Branches let you define different actions depending on whether a condition is met. A delay postpones the execution of later steps. Calculations and lookups produce values that you can use in subsequent conditions and events.

You need administrator permissions and the workflow feature enabled for your customer account. Build the workflow in the browser. Open Workflow tool from the navigation, select Datatable and click the workflow name. To start a new workflow, click Create new workflow on the page; see creating a workflow.

Build the condition branches and their subsequent steps

Once you confirm the condition with Accept the conditions and continue, you can build subsequent steps in the The condition is true and The condition is false branches. During execution, only the branch matching the condition result is selected.

In the action menu for the branch you want, you can select Add new condition, Add delay, Add new event, Calculate new value, Add Lookup Tasks or Add Lookup Service Requests. Events, delays, calculations and lookups proceed sequentially to the next step. A new condition splits the subsequent steps into two alternatives again.

You can leave a condition's alternative branch empty if it does not need to do anything: processing ends there. Both alternatives cannot be empty. The last step of a populated path must be an event; it cannot end with only a condition, delay, calculation or lookup.

A calculation or lookup does not itself write its result to a Spot field. To save the result, use it in a field of a later update event. Also check the target of the update: values with the same name do not guarantee that the intended Spot or job is selected. See creating and updating data with a workflow.

Add a delay and, if needed, another check

Select Add delay in the branch. Enter the desired Months, Weeks, Days, Hours and Minutes, then click Accept the conditions and continue in the delay section. At least one value must be greater than zero. Then build the subsequent steps.

The delay is calculated from the moment execution reaches the delay step, in the customer account's time zone. The specified periods are added together: for example, one day and two hours postpone continuation by both amounts. Months are calendar months. A delay is separate from the recurrence interval of the entire workflow; the minimum interval of 15 minutes for regular starts does not limit this delay.

A delay postpones only the steps after it. Changes made before the delay remain in place. Once the wait ends, execution continues from the step after the delay and does not return to check the earlier condition.

For example, if a reminder should be sent only while the task is still open, add a new condition after the delay to check the task's status, and place the email in its true branch. Similarly, you need a new lookup if you want to use the count after the wait instead of a value retrieved earlier.

Continuation requires that the workflow still exists and is active, and that the subsequent step is still present. The delay time schedules continuation; it does not confirm, for example, when an email will arrive. Scheduling the entire workflow is covered in the scheduling and history instructions.

Calculate a number value

  1. Select Calculate new value in the branch, choose Calculate number value as the calculation type and open Set the information.
  2. In Select an operator for the calculation, select Sum, Subtract, Multiply or Divide.
  3. Enter at least two input values. You can enter fixed numbers or drag numeric fields from the lists on the right onto the value rows. Add rows with Add new value.
  4. Enter a Fallback value for each dragged value. Give the result an identifiable name.
  5. Click Save in the calculation form, then continue with Accept the conditions and continue in the calculation section.

All input values are combined using the same operator. Subtraction and division follow the row order, starting with the first value: for example, 100 / 2 / 5 = 10. A calculation requiring different operators is built from several consecutive calculation steps.

The fallback value is used when a dynamic input value is empty. Zero is an actual value and is not replaced with the fallback value. The fallback value also does not correct invalid, non-numeric content. Use numeric input data; a comma in a decimal number passed as text is not converted to a decimal point in this calculation. For example, the text 1,5 may be used in the calculation as the value 1. Check such input data and use a decimal number written with a decimal point.

If any divisor is zero, the result of the entire division calculation is zero. If this could cause an incorrect update or event, check the divisor with a condition before the calculation.

The calculation uses floating-point values and does not round the result to a fixed number of decimal places. Decimal calculations may involve floating-point precision differences; the display format of a visible field does not guarantee that the calculated value has been rounded in the same way.

Calculate a date value

Select Calculate new value in the branch, choose Calculate date value as the calculation type and open Set the information. Drag the base date from the list on the right into Select the date value to use as the basis for the calculation. For example, Workflow run time means the moment this value is resolved; after a delay, it is the moment after the wait.

A fixed date selected manually from the calendar alone is not a valid base value for this form. If the selected dynamic base date is missing during execution, the calculation produces no result and its normal continuation does not take place.

Choose whether to add or subtract time, and enter months, weeks, days, hours or minutes. Use non-negative whole numbers; at least one period must be at least one. Empty periods are treated as zero. Fractional parts are truncated to whole numbers, so, for example, 1.5 days does not mean adding one and a half days. Give the result a name, click Save and continue with Accept the conditions and continue in the calculation section.

The specified periods are added to or subtracted from the base date. This produces a new date value and does not pause workflow execution to wait. Use a delay for waiting.

Use a named result later

The calculation result appears in the Calculated number values or Calculated date values list on the right in a later step. Use it in a condition comparison, in a subsequent calculation where applicable, or as a dynamic value in an event field.

The menus show results from the preceding parent steps of the current step. A result is not available before it is calculated or in another parallel branch. If you need the same result in both branches, calculate it before branching. If you change the calculation type from number to date or vice versa, check and correct all conditions and events that use the result.

Add a task or service request lookup

You can retrieve the number of tasks or service requests for the Spot associated with the trigger and use it in later workflow steps.

  1. Select Add Lookup Tasks or Add Lookup Service Requests in the branch.
  2. Open Set the information in the lookup section and give the lookup an identifiable name.
  3. Select the filters. You can filter tasks by task template, task form, categories, priority, status and text contained in the title. You can filter service requests by service request category, priority, status and text contained in the title, and by the value of one additional field.
  4. If you filter service requests by an additional field, select the field, comparison condition and value.
  5. Save the lookup details and continue with Accept the conditions and continue in the lookup section.
  6. In a later condition, select the named lookup and its Count. You can also use the lookup result in a calculation or as a dynamic value in an event from the Calculated number values list.

When a field has several selected options, matching any one of them is sufficient. Filters set in different fields must all be met. A filter field left empty does not restrict the lookup. The search for text contained in the title is case-insensitive.

Additional field comparisons depend on the field type: numbers can be compared using equality or a greater-than condition, and text using equality or containment. Other types use equality. Text equality is an exact comparison, while containment searches are case-insensitive. Numeric comparisons accept both a decimal comma and a decimal point. Date comparisons apply to the day, not the time. For a selection field, select an option; for a yes/no field, select a Boolean value.

The additional field must be active, and the service request must have a record for that field. A missing field record does not match the lookup value, even when the intention is to search for an empty value.

The lookup targets the triggering Spot or the Spot of the task, service request, message or reading event that triggered the workflow. If this Spot has no jobs matching the filters, the count is zero. If no Spot is associated with the trigger, the count remains empty.

Count is the number of saved jobs matching the selected filters at the time of the lookup. The lookup has no default time range and does not automatically include only open jobs. Select the status separately if you need, for example, only open service requests. The result is a count, not a ratio or history report, and does not update automatically during later steps.

For example, you can look up a Spot's service requests with a particular status and add a condition after the lookup to check whether the count is greater than zero. The lookup result is available after the lookup in the steps built below it.

Email and the task form PDF

Select Add new event in the branch, choose Send an email in Select the event and open Set the information. Enter the recipients, subject and message content. All three are required. Also check the text and addresses formed from dynamic values. Multiple addresses can be separated with a space, comma or semicolon. Invalid email addresses are filtered out before sending.

In the email form of a task-based workflow, you can select Attach Task Form PDF. This option is not available when the trigger is task creation. The attachment applies to the triggering task, which must be completed and have an associated task form.

Sending may wait briefly for the PDF to be ready. If the PDF is not available after the limited wait, the message is sent without an attachment. The attached PDF must be smaller than 10 MB; a file larger than or exactly 10 MB is omitted from the message. The attachment may also be omitted if retrieving the file fails or the task no longer meets the attachment requirements.

Email sending is queued separately, and the workflow may continue to the next step before the message is sent. Workflow continuation or a history entry does not confirm delivery of the message or inclusion of the attachment. Check the received message.

Change or delete steps carefully

The trash icon between branches deletes those sections and the steps built below them. When editing a saved workflow, deletion takes place when you confirm the deletion, before the final save of the entire form. Simply closing the form does not undo the deletion. When building a new workflow, sections that have not yet been saved are removed only from the structure being built.

The Back button at the top left of a section also restores the action menu by deleting the current section's content and its subsequent steps. Deletion of a saved section takes effect immediately here as well. Check the deletion confirmation before accepting it.

Deleting the structure does not undo earlier data changes or delete jobs already created. If the continuation step of a waiting execution is deleted, execution cannot continue to it.

Save and verify the actual result

Save in the calculation, lookup or email form saves the details to the workflow builder form. Finalize the entire workflow with Test and save when editing, or Test and create a workflow when creating a new one. Read the item counts and execution options in the testing step before confirming: selecting processing for existing items may make real changes.

Reopen the saved workflow and check the branches, step order, fallback values and where the results are used. Test the intended trigger situation and the behavior for both condition results. For a workflow with a delay, also check the situation after the wait ends; the item count test does not test a future situation or email delivery.

Open the History tab in Workflow tool and check the execution of the workflow in question. Also verify the actual field value or status on the target item and any jobs created. Check the email recipient, content and PDF attachment in the received message. If needed, see checking execution history.