Time-based flows

Time-based flows are one of the three flow types in PlentyONE Flow. The other two types are event-based flows and manual flows.

In time-based flows, the arrival of a specific point in time (e.g., Tuesdays at 9 AM) triggers a flow run for all orders that match the set filter criteria.

Examples of time-based flows

Automatic invoicing for monthly subscriptions

Automatically create a monthly invoice for customers who have purchased a subscription product (e.g. software subscription, monthly delivery box). The flow should ensure that the invoice is always created on the first working day of the month for all active subscriptions.

Steps for implementation:

Create flow

  • Navigate to Automation > Flow Studio and click on Create flow (add) in the flow overview.

  • Give the event a meaningful name, e.g. ‘Monthly subscription invoice’.

  • Select Time-based as the trigger.

Defining time control

  • Set the frequency to Monthly.

  • Select the 1st as the Day of the month.

  • Set the time, e.g. 09:00. The flow is then triggered every first day of the month at 09:00.

  • Save the flow.

Set filter (the if condition)

Here you define the criteria that an order must fulfil for the flow to be executed for it.

  • Drag the Search element to the canvas.

  • In the filter settings::

→ Filter 1: Order status is Is in subscription active. We use a status here that is used specifically for subscription orders. This ensures that only current subscriptions are taken into account. The status must have been created in the system beforehand.

→ Filter 2: Order tag is Is equal to Subscription’ - This ensures that the flow only processes these orders and not others by mistake. The tag must have been created beforehand.

Create actions (the then condition)

  • Drag and drop the Create document action from the Order group below the Search element.

  • Select Invoice as the document type.

  • Drag and drop the Send email action from the Order group below the Create document element.

  • Select a template for the invoice email here.

  • Save and activate the flow.

From now on, the flow searches all orders with the status Subscription active and the tag Subscription every first of the month at 09:00 and creates an invoice and sends it automatically to the customer.

1. Creating a new time-based flow

  1. Open the Automation » Flow Studio menu.
    → The Flow Studio overview opens.

  2. Click on Create flow (add ) in the top left of the toolbar.
    → A stepper opens and guides you through the following three steps.

    1. General

      1. Enter a unique name and, if necessary, a description for the new flow.

      2. Click on Next.

    2. Trigger

      1. Select time-based as the trigger.

      2. Click on Next.

    3. Settings
      → The drop-down list Frequency appears:

      1. From the drop-down list, select the frequency at which the flow will take place. Refer to the explanations in the chapter Defining the point in time at which a flow-run is triggered.

      2. Click on Save (save).
        → The flow is created.
        → The Flow Studio canvas appears, which contains the first two elements of the flow.

  3. Now configure the new flow. Refer to the explanations in section Configure a time-based flows.

2. Defining the point in time at which a flow-run is triggered

When creating a time-based flow in Flow Studio, you will be asked to select the flow run frequency from a drop-down list. Use this setting to define when and how often a flow run is to occur.

The following options are available:

Frequency Additional settings:

Minutes:

Recurrence: Select a time period from the drop-down list for how many minutes (15, 20 or 30) in relation to the full hour the flow should be executed. The execution starts as soon as the flow is set to active and the next set time period occurs.

Examples

For example, if 20 minutes are selected and the flow is set to active at 15:37, the flow starts at 15:40 and repeats every 20 minutes. The next execution then starts at 16:00, the next at 16:20 and so on. For example, if 15 minutes is selected and the flow is set to active at 11:53, the flow starts at 12:00 and repeats every 15 minutes. The next execution then starts at 12:15, the next at 12:30 and so on.

Hourly

Recurrence: Select the appropriate interval from the drop-down list.

Daily:

Time: Select the appropriate option from the drop-down list.

Weekly:

Day of week: Select the appropriate weekday from the drop-down list.

Time: Select the appropriate option from the drop-down list.

Monthly:

Specific day: Enter one or more numbers here, separated by commas. For example, if the execution should take place on the second day of each month, enter 2. If the execution should be e.g. on the second and third day of each month, enter 2,3.

Time: Select the appropriate option from the drop-down list.

Annually:

Month: Select one or more months from the drop-down list.

Day of the month: Enter a number here. For example, if you want a flow run to be triggered on the second day of every month, enter a 2.

Time of day: Select the appropriate option from the drop-down list.

3. Configuring a new time-based flow

  1. In the menu Automation » Flow Studio, open the existing flow.
    _Note: Refer to the section Create an event-based flow for information on how to create a new flow.
    → The Flow Studio canvas appears, which contains the first two elements of the flow:

    • The blue element stands for the selected trigger event. Note the information about the selected trigger event in the right-hand column of the canvas view.

    • The white element is a placeholder for the next flow step.

  2. Select the next flow step from the column on the left and add it to the flow by dragging it to the appropriate position. The following options are available:

    • Actions: Here, you select the action to be performed at this stage in the flow for the orders concerned. Refer to the explanations on the manual page Use the Flow actions

    • Control elements: Here, you select the appropriate control for the flow step. The controls apply set filters to evaluate objects before routing them to the next step. Refer to the explanations on the manual page Use the Flow controls.

  3. Add more actions and controls as necessary, until the business process has been fully mapped out.

  4. Save (save) the flow regularly as you create it.