How Ritsbo Auto Ordering Works
A structured reference for how Ritsbo's auto ordering system automatically purchases products within a budget you control.
Overview
Auto Ordering is a Ritsbo automation that purchases products from the catalog and delivers them to your store automatically, within a monthly budget you configure. This document explains the configuration, execution cycle, and safety mechanisms.
Configuration
Auto Ordering is configured through the AutoOrderSettings entity. The following parameters are user-controlled:
| Parameter | Type | Description |
|---|---|---|
| enabled | boolean | Master switch for auto-ordering |
| paused | boolean | Temporarily pause without losing settings |
| monthly_budget | number (USD) | Maximum spend per month |
| max_item_price | number (USD) | Never auto-order an item above this price (0 = no cap) |
| preferred_categories | array | Categories to prioritize when selecting products |
| auto_deliver_to_store | boolean | Automatically add ordered products to your store |
Execution Cycle
The auto-order cycle runs via the runAutoOrderCycle backend function on a daily schedule. Each cycle:
- Reads your
AutoOrderSettingsto check if enabled and not paused - Calculates remaining budget:
monthly_budget - spent_this_month - If budget remains, selects products matching preferred categories and max_item_price
- Validates wallet/service balance via
validateAutoServiceBalance - Orders products, charging the product price plus a service fee
- Updates
spent_this_monthand appends tohistory - If
auto_deliver_to_storeis true, adds products to your store catalog - Pauses automatically when the budget is exhausted
Budget Tracking
Spending is tracked through two fields:
- spent_this_month — cumulative spend in the current budget window
- month_start — the start date of the current budget window
When a new month begins, spent_this_month resets to 0 and month_start updates. The system never spends more than monthly_budget in a single month.
Safety Mechanisms
- Balance validation — funds are verified before each order via
validateAutoServiceBalance - Max item price cap — prevents expensive single-item orders
- Monthly budget cap — total spend cannot exceed the configured budget
- Pause feature — instantly pause without losing configuration
- History log — every order event is recorded with date, SKU, price, fee, and status
Service Fee
Each auto-order incurs a service fee, calculated by the calculateServiceFee function. The fee covers the operational cost of sourcing, ordering, and delivering the product. The fee is charged from your wallet or service balance and is recorded in the history log alongside the product price.
History Log
The history array on AutoOrderSettings records every auto-order event, capped at 50 entries (most recent first). Each entry includes:
date— when the order was placedsku— the product SKUname— the product nameprice— the product pricefee— the service fee chargedstatus— completed, failed, or skippedwebsite_id— which store the product was delivered to
Frequently Asked Questions
How does Ritsbo auto ordering work?
You set a monthly budget, max item price, and preferred categories. The system runs a daily cycle that selects and orders products within your budget, charges a service fee, and delivers products to your store automatically.
Can I cap how much auto ordering spends?
Yes. The monthly_budget parameter sets the maximum spend per month, and max_item_price prevents any single item above a threshold from being ordered. The system pauses automatically when the budget is exhausted.
What happens when the monthly budget runs out?
The system pauses automatically and resumes when the next budget window begins. Your configuration (budget, categories, price cap) is preserved.
Is there a fee for auto ordering?
Yes. Each auto-order incurs a service fee calculated by the calculateServiceFee function. The fee covers sourcing, ordering, and delivery costs, and is recorded in the history log alongside the product price.
Related Articles
Explore Ritsbo
External Resources & References
Launch Your AI-Powered Store with Ritsbo
Build, stock, and scale a complete e-commerce business in minutes — not months.