Date conditions

The date conditions in Automation can be used to automatically process orders based on their various date and date/time fields relative to today's date.

There are four date fields that can be used within rule conditions:

Delivery date

The delivery due date as set on the sales order. It can be seen in the "Pricing and delivery" section on the sales order.

mceclip0.png

Invoiced date  The date the sales order was invoiced. This differs from the "tax date".
Payment due date

The payment due date as set on the sales order.

mceclip1.png

Tax date

The tax date/invoice date as set on the sales order.

mceclip2.png

In addition to the date fields, there are three date/time fields:

Created on The date the sales order was created in Brightpearl.
Placed on The original date the order was placed on the relevant channel. In most cases this will match the "Created on" date, but may differ in certain situations - for example, when importing historical orders.
Updated on

The last date the order was updated on. This date is affected by:

  • any changes to the sales order, including resaving it
  • batch updates from the sales list where the order status changes
  • updates made via the API

You can specify whether the chosen date should be "greater than or equal to" or "less than or equal to" the current date. Enter the number of days from the current date using negative values for earlier dates or positive values for later dates.

Using the date operators

Choose the number of minutes, hours or days from the current date and time, using negative values for earlier dates or positive values for later dates.

It's important to use the right operator and to make sure the number uses the correct sign, because using the wrong one may result in a rule that doesn't make sense.

Positive or negative

A positive number indicates the period of time is in the future, while a negative number indicates the period of time is in the past. In both cases, the number is relative to the current time.

For example, "1 day" means "one day after today's date", while "-1 day" means "one day before today's date".

Choosing an operator

There are four combinations you can choose from:

Operator Number Action
Greater than Positive

The number is added to the current date. If the condition's date is later than the calculated date, the sales order meets the condition.

For example, take a condition which states "the delivery date is greater than 2 days". If today's date is January 1st 2022, Brightpearl adds two days to that date to get January 3rd 2022.

If the delivery date is later than January 3rd, the condition would be met.

Greater than Negative

The number is removed from the current date. If the calculated date is earlier than the condition's date, the sales order meets the condition.

For example, take a condition which states "the created date is greater than -2 days". If today's date is January 1st 2022, Brightpearl removes two days to that date to get December 29th 2021.

If December 29th 2021 is earlier than the created date of the order, the condition would be met. Note that for a created date, this would always be true.

Less than Positive

The number is removed from the current date. If the calculated date is earlier than the condition's date, the sales order meets the condition.

For example, take a condition which states "the created date is less than 2 days". If today's date is January 1st 2022, Brightpearl removes two days to that date to get December 29th 2021.

If December 29th 2021 is earlier than the created date of the order, the condition would be met. Note that for a created date, this would always be true.

Less than Negative

The number is removed from the current date. If the calculated date is earlier than the condition's date, the sales order meets the condition.

For example, take a condition which states "the created date is less than -2 days". If today's date is January 1st 2022, Brightpearl removes two days to that date to get December 29th 2021.

If December 29th 2021 is earlier than the created date of the order, the condition would be met. Note that for a created date, this would always be true.

Example

Say you want to create a rule that only acts on orders that were created more than 30 minutes ago.

You cannot use a created date that is greater than 30 minutes, as that would assume a created date in the future.

If you specify a created date that is greater than -30 minutes, that would assume a created date within the last half an hour. Because you want a created date that is older than the last half an hour, you could create a rule where the created date is not greater than -30 minutes.

mceclip0.png

Have more questions? Submit a request