Skip to content

Rules of time ​

Some rules run because time passes, not because someone changed something: a day before a date of the record, or every Monday at nine.

Rules of time run from scheduled work. Set up cron: without it they run only after someone opens a page, and can be late. While such a rule is on without cron, administrators see a notice saying so.

A rule of time looks at the record as it is when the time comes. Its conditions are on the record's fields; it has no Done by or Through, since nobody changed anything.

A date of the record: a day before a deal should close ​

Trigger: A date of the record comes. The owner of a deal is reminded a day before its expected close, and again on the day, unless the deal is already won or lost.

  1. Administration › Automation, Entity: Deals, Add a rule.

  2. Name: Remind the owner before the close.

  3. When: A date of the record comes.

    • The date: Expected close.
    • Run: the first time reads 1 days before the date.
    • Click Add a time, and set it to 0 days after (or on) the date: the day itself.
    • At: 09:00, in the installation's time zone (set in Settings).
  4. Only if: Stage is none of Won, Lost.

  5. Add a step: Send a notification, To: The people of Owner, Message:

    twig
    {{ title }} should close on {{ close_date }}.
  6. Save the rule.

How the times work:

  • Each time runs once for each record. If the date changes (the close is put off), the new times run too.
  • Times before the rule was made, turned on or given new times do not count: a new rule does not remind about the past.
  • For a date and time field, or When the record was created, the times can be in hours too.

Still open after 3 days. The same trigger with The date: When the record was created, 3 days after (or on), and the condition Status is any of Open: a rule for tickets nobody has answered for three days.

Move to the trash: old solved tickets ​

Step: Move to the trash. A solved ticket that nobody touched for 30 days goes to the trash, where it can still be restored from.

  1. Entity: Tickets, Add a rule, Name: Clear away old solved tickets.
  2. When: A date of the record comes. The date: When the record was last changed. Run: 30 days after (or on) the date.
  3. Only if: Status is any of Solved.
  4. Add a step: Move to the trash.
  5. Save the rule.

Each change of the ticket moves "last changed", and so the 30 days start again. Steps after Move to the trash still run.

On a schedule: every Monday, the waiting tickets ​

Trigger: On a schedule, for each record. Every Monday morning, the assignee of each ticket that still waits for the customer is reminded.

  1. Entity: Tickets, Add a rule, Name: Monday: waiting tickets.

  2. When: On a schedule.

    • A new schedule starts as Every week, on, with Monday ticked, at 09:00, For each record that matches the conditions. That is what this rule needs: leave it.
  3. The box under When now reads For the records that match: click it and add the condition Status is any of Waiting. A schedule for records needs at least one condition, so that it does not run for every record by mistake.

  4. Add a step: Send a notification, To: The people of Assignee, Message:

    twig
    {{ subject }} still waits for the customer.
  5. Save the rule.

The schedule can also be Every day, Every month, on day (the 31st is the last day of a shorter month) or Every year, on a day and a month. It handles up to 500 records a minute; the rest follow.

Once, without a record: a ticket every month ​

Trigger: On a schedule, once. On the first day of each month, a ticket "Check the backups" is made for Sue. This is how a task repeats.

  1. Entity: Tickets, Add a rule, Name: Monthly: check the backups.

  2. When: On a schedule. Every month, on day 1, at 08:00. Change For each record that matches the conditions to Once, without a record (to create records).

  3. Leave Only if as it is, Always: there is no record to look at.

  4. Add a step. The menu offers only Create a record: choose it. A record of: Tickets. Under Its fields:

    FieldHowValue
    SubjectTo a valueCheck the backups
    AssigneeTo a valueSue Helper
    PriorityTo a valueNormal
    StatusTo a valueOpen
    OpenedTo a formulaNOW()
  5. Save the rule.

Without a record, the values are written in the step or are formulas; they can't be copied from a record. The new record can't be a sub-record either (an activity of a deal, say): there is no parent record to put it under. The records made this way set off rules that have Also when other rules change records ticked.

Copy the record: an activity that repeats every month ​

Step: Copy the record. A monthly call with a customer: when its day comes, a copy is made for the same day next month. The copy is copied again when its own day comes, and so on.

Before you start: add a Yes or no field Every month to Activities.

  1. Entity: Activities, Add a rule, Name: Monthly activities repeat.

  2. When: A date of the record comes. The date: Day. Run: 0 days after (or on) the date.

  3. Only if: Every month is Yes.

  4. Add a step: Copy the record. Under Set otherwise (optional):

    FieldHowValue
    DayTo a formulaDATEADD(day, 1, "month")
    DoneEmptied
  5. Save the rule.

The copy goes under the same deal. Files, unique fields and numbers Qorekit gives are not copied. For a record with sub-records, tick With its sub-records to copy them too.

Which one for a repeating task? A task on fixed days (the 1st of each month) is a schedule that runs once, without a record. A task that repeats from its own date (a month after the last call) is a date rule that copies the record.