Skip to main content
A campaign is a time-bound change to what participants earn: double points for a month, a launch-week rate, a category push. In Scrip a campaign is a group of rules with an active_from and active_to window. The rules, budgets, windows, and configuration history you already use are the campaign. There is no separate resource to create. Writing rules covers the window fields on a single rule. Use this page when a promotion has to coexist with the rates you already pay, has a spend cap, or has to be launched and retired as a unit.

Choose a shape

The first decision is how the campaign relates to your base rules. Stacking is the safer default. Override only when the campaign rate is meant to be the whole rate.

Stack a bonus

Add a campaigns set after your earning set. Each campaign is one or more rules in that set with a window. This one adds 2% on dining for October:
A dining purchase stamped in October earns the base rate from the earning set plus 2% from this rule. Stamped in November, the rule is skipped and the base rate pays alone.

Override the base rate

To pay a flat 5% on everything during launch week instead of the usual rates, put the rule in the earning set, first, with stop_after_match:
Inside the window, a purchase matches this rule and the rest of the earning set is skipped. Outside the window, the rule is skipped and the earning set runs as before. Rules in other sets, such as tracking or the campaigns set, run either way. See Set-local stopping.

Windows

Both are compared to the event’s event_timestamp, not the clock when Scrip processes it. That has three consequences:
  • You can create campaign rules weeks ahead. They start and stop on their own.
  • Retries and replays make the same decision as the original run.
  • A backdated event can land inside a window that has already closed. Historical imports fire past campaigns unless you suspend or archive the rules first.
A skipped evaluation is recorded on the event with reason OUTSIDE_TIME_WINDOW, so you can confirm a campaign is dormant by reading any event’s trace.

Cap the spend

A budget on the campaign rule caps what it issues across all participants. A lifetime budget is the right shape for a one-off campaign: once the pool is spent, the rule keeps matching but its actions are skipped with reason BUDGET_EXCEEDED, and the base rate still pays.
To limit each participant instead, gate the rule on a tag or counter it sets. One bonus per participant for the whole campaign:
A budget and a per-participant gate are independent. Use both to cap the pool and the individual at the same time. See Budgets. For a campaign paid in its own currency with a hard ceiling, link a PREFUNDED asset and fund the program wallet with the pool. Credits fail when the wallet is empty. See Asset configuration.

Test before launch

Send the campaign rules as a draft rule_configuration to POST /v1/test-runs with scenario events stamped inside and outside the window. Set options.compare_live to see what the current configuration would have paid on the same events. Test runs roll back, so nothing is credited. Check three things: an in-window event pays the campaign amount, an out-of-window event pays only the base rate, and for an override, the base rule is not reached inside the window. See Testing.

Launch as one change

When a campaign is more than one rule, publish them together with /rule-configuration/preview and /rule-configuration/apply so they go live in one version. The change is recorded as a revision you can diff or roll back later. See Managing rule configuration. Because windows do the scheduling, apply the change whenever it is convenient. The rules stay dormant until active_from.

During the campaign

Name the campaign in each CREDIT’s description. It appears on participant statements and journal entries, which is how finance and support tell campaign credits from base earning.

After the campaign

The window closes on its own. The rules stay in the configuration as a record of what ran. Archive them once you no longer need them in the active list, or leave them; a rule outside its window costs one skipped evaluation per matching event. To run the same campaign again, PATCH the window on the existing rule or apply a new revision with fresh dates. To undo a campaign that was configured wrong, roll back to the revision before it was applied.

Time-windowed rules

The window fields and how they read the event timestamp.

Rule sets

Set order, positions, and set-local stopping.

Test a full configuration

Run the draft against in-window and out-of-window events.