Earning Rules
Earning rules define how customers earn RSNC credits. The Shopify app matches incoming orders against your rules and awards credits automatically.
Creating an Earning Rule
From the app dashboard, go to Earning Rules and click Create Rule.
Rule Settings
| Setting | Description | Default |
|---|---|---|
| Name | Display name for the rule | — |
| Rule Type | Type of action that triggers the rule | purchase |
| Credits Per Dollar | Base RSNC credits earned per $1 spent | — |
| Minimum Order Amount | Minimum order value to qualify (optional) | None |
| Maximum Credits Per Order | Cap on credits per single order (optional) | None |
| Applies To | all products, specific_products, or specific_collections | all |
| Product Filter | JSON array of product/collection IDs (when scoped) | — |
| Start Date | When the rule becomes active (optional) | Immediately |
| End Date | When the rule expires (optional) | Never |
| Priority | Matching priority (lower = higher priority) | 0 |
How Matching Works
When an order webhook arrives, the app:
- Fetches all active earning rules for the merchant
- Filters by rule type (
purchase) - Checks minimum order amount
- Checks time window (start/end dates)
- Applies product/collection filters
- Returns the first matching rule by priority
Only one rule fires per order. Use priority to control which rule takes precedence.
Reward Calculation
base_reward = credits_per_dollar × order_total
capped_reward = min(base_reward, maximum_credits_per_order) // if cap set
final_reward = capped_reward × streak_multiplier
Streak Multipliers
If the customer has an active daily streak, a multiplier is applied:
| Streak | Multiplier |
|---|---|
| 3+ days | 1.25x |
| 7+ days | 1.5x |
| 14+ days | 1.75x |
| 30+ days | 2.0x |
Streak data is fetched from the Shared Services streak API at the time of order processing.
Examples
Basic: 10 Credits Per Dollar
Every purchase earns 10 RSNC per dollar spent.
- Credits Per Dollar: 10
- Applies To: All products
A $50 order earns 500 RSNC.
Minimum Order Threshold
Only reward orders over $25.
- Credits Per Dollar: 10
- Minimum Order Amount: 25
- Applies To: All products
A $20 order earns nothing. A $50 order earns 500 RSNC.
Capped Rewards
Limit credits per order to prevent outsized rewards.
- Credits Per Dollar: 10
- Maximum Credits Per Order: 1000
- Applies To: All products
A $200 order earns 1000 RSNC (capped), not 2000.
Time-Limited Promotion
Double credits during a sale period.
- Credits Per Dollar: 20
- Start Date: 2026-03-01
- End Date: 2026-03-07
- Priority: 0 (higher than default rules)
During the promotion, this rule fires first. After the end date, regular rules take over.
Managing Rules
Toggle a Rule
Enable or disable a rule without deleting it. Disabled rules don't match any orders.
Edit a Rule
Update any parameter. Changes take effect immediately for new orders.
Delete a Rule
Permanently remove a rule. Historical rewards are not affected.
Test Orders
The app automatically skips test orders placed via Shopify's Bogus Gateway. No credits are awarded for test transactions.
Metadata Sent to Resonance
Each order event includes this metadata:
{
"order_id": "12345",
"order_total": 50.00,
"reward_amount": 500,
"base_reward": 500,
"streak_multiplier": 1.0,
"total_reward": 500,
"items": [...],
"platform": "shopify",
"source": "shopify_app"
}
Next Steps
- Setup Guide — Initial app configuration
- Troubleshooting — Common issues
- Streak System — How streak multipliers work