Skip to main content

Set up automation rules

Admin

Automation rules let you respond to events in your organization without manual follow-up. When something happens (a worker cancels, an event fills up, a scholarship is approved), StandShare evaluates your rules and fires the actions you configured — a notification, an email, or a ledger penalty.

Rules follow a WHEN / IF / THEN structure:

  • WHEN — the trigger event (e.g., "a worker cancels an assignment").
  • IF — optional conditions that filter whether the rule applies (e.g., "the worker's cancellation count exceeds 3").
  • THEN — what happens when the trigger fires and the conditions are met (e.g., "send a notification to the family lead").

Prerequisites

  • Role: Org Admin with hooks.manage permission.
  • Tier: Your organization must be on the Full (NPO) or Professional (Venue) tier. Lower tiers see the Automation Rules page but cannot create or enable rules.
  • Where to find it: Admin Hub > open the overflow menu > Automation Rules, or navigate directly to /admin/hooks/rules.

The Automation Rules Dashboard

The dashboard lists all rules in your organization with:

  • Rule name and a description.
  • Trigger — which event fires the rule.
  • Status toggle — enable or disable the rule without deleting it.
  • Last fired — when the rule last evaluated (helps you tell if a rule is active or stale).

Click any rule to open it in the Rule Builder.


Create a Rule

From scratch

  1. On the Rules Dashboard, click Create Rule.
  2. The Rule Builder opens with three sections: WHEN, IF, THEN.

WHEN — Choose a Trigger

Pick the event that should fire this rule. Triggers are grouped by area:

CategoryTriggers
WorkerSignup, No show, Reassigned, Cancellation, Late cancellation
EventCreated, Capacity reached, Cancelled, Unfilled approaching (cron-based, checks before event)
WaitlistWorker added, Worker promoted
ScholarshipSubmitted, Approved, Denied, Paid
DocumentExpired, Expiring (cron-based, checks ahead of expiry date)

Select one trigger per rule. If you need the same action for multiple triggers, create separate rules — they can share a template.

IF — Add Conditions (Optional)

Conditions let you narrow when the rule fires. Each condition compares a metric against a threshold using an operator (equals, greater than, less than, etc.).

Example conditions:

  • "Worker's no-show count is greater than 2"
  • "Worker's events-worked count is less than 1"
  • "Cancellation count equals 3"

Multiple conditions are AND-ed — all must be true for the rule to fire. Leave conditions empty if you want the rule to fire on every trigger.

THEN — Configure Actions

Pick what happens when the rule fires:

  • Send notification — an in-app notification to a specific recipient (family lead, worker, coordinator, or admin).
  • Send email — uses a message template with variable substitution (worker name, event name, date, etc.).
  • Apply ledger penalty — posts a debit entry to the worker's family account (for example, a no-show fee).

Each action uses a message template for its text. You can pick an existing template or create a new one inline.

  1. Give the rule a Name and optional Description.
  2. Click Save.

The rule is created in a disabled state by default. Toggle it on when you are ready.

From a template

If your org or the platform provides rule templates:

  1. On the Rules Dashboard, click Create from Template.
  2. Browse available templates — platform defaults are read-only, org templates are editable.
  3. Click Use Template. The Rule Builder opens pre-filled with the template's WHEN/IF/THEN.
  4. Adjust as needed and click Save.

Manage Message Templates

Message templates define the text used in notification and email actions. Templates support variable substitution — placeholders like {{worker.name}}, {{event.name}}, {{event.date}} that resolve at fire time.

  1. Navigate to Automation Rules > Templates (tab or sidebar link to /admin/hooks/templates).
  2. Platform templates appear at the top and are read-only. They give you starting points for common scenarios.
  3. Org templates are editable. Click Create Template to add your own.
  4. In the template editor, write your message body and use the variable picker to insert placeholders.
  5. Click Save.

Templates are reusable across rules. Editing a template updates every rule that references it.


Monitor Executions

The Execution Log shows every time a rule fired — whether it succeeded, what action ran, and the result.

  1. Navigate to Automation Rules > Executions (/admin/hooks/executions).
  2. Filter by date range, rule, trigger type, or status.
  3. Click an execution to see the full chain tree — when one rule's action triggers another rule, the tree shows the cascade.

Use the execution log to verify rules are firing as expected and to troubleshoot unexpected behavior.


Understand Metrics

Metrics are the counters that conditions evaluate against. StandShare seeds five built-in metrics for every org:

MetricWhat it counts
cancellation_countTimes a worker cancelled an event assignment.
late_cancellation_countCancellations within a close window before the event.
no_show_countEvents where the worker was marked No Show.
events_worked_countEvents where the worker was marked Attended.
volunteer_hoursTotal hours volunteered (based on event duration).

Custom metrics

Admins can create additional metrics from the Metrics page (/admin/hooks/metrics).

  1. Click Create Metric.
  2. Give it a Key (unique per org, e.g., late_arrival_count), Name, and Scope (per-worker, per-family, or per-org).
  3. Click Save.

Custom metrics start at zero. They increment when a rule action updates them — or you can reset a metric's value manually from the Metrics page using the Reset action.

Entity value lookup

On the Metrics page, you can look up a specific worker's or family's current metric values. Enter the entity ID and click Lookup to see all metrics for that entity — useful when a family asks "why did I get a penalty?"


Preview a Rule (Dry Run)

Before enabling a rule, test it:

  1. Open the rule in the Rule Builder.
  2. Click Preview (or Test).
  3. The system runs a dry evaluation with mock context and shows you what would happen — which conditions matched, what actions would fire, and the resulting message text.

No actual notifications, emails, or ledger entries are created during a preview.


Tier and Upgrade Path

Automation Rules require the Full (NPO) or Professional (Venue) tier. On lower tiers:

  • The Automation Rules sidebar entry and page are visible but gated.
  • Attempting to create or enable a rule returns a tier-upgrade prompt.
  • Platform admins bypass the gate for testing.

To upgrade, see Billing and subscription.


Tips

  • Start with one rule and watch the execution log before adding more. Cascading rules (rule A triggers rule B) can surprise you.
  • Use conditions to avoid over-notifying. A rule that fires on every signup generates noise — add a condition so it only fires when capacity passes 80%.
  • Name rules clearly. "No-show penalty — 3+ cancellations" is better than "Rule 1".
  • Keep templates concise. Workers read these on their phones.

Next Steps