SK Upsell · Features

Maximize basket size.
Zero customer friction.

Five logical systems make up SK Upsell. Here is how each module triggers, evaluates, and logs recommendation events.

01

Offline Rule Derivations & Revision Lifecycle

Recommendations are generated by offline AI derivations, compiling static draft templates for safe, human-approved publishing.

Staged rules, version-controlled revisions

AI runs in the background analyzing transaction history to detect complementary products. It proposes rule candidates to the dashboard as drafts. Real managers approve, reject, or edit rules before activation. Once live, every edit creates a rule revision log—no accidental overrides, total history transparency.

status: draft_proposal

Draft Proposals live

Rule drafts (`upsell_rule_proposal` database records) compile offline. Test them before they hit checkout flows.

v1 -> v2 -> v3

Revision Ledger live

Every change yields a new revision record (`upsell_rule_revision`). Restore any historical configuration state instantly.

Instant Activations live

Toggling rules triggers live database updates. Matches update in real-time with zero backend service retraining.

02

Zod-Backed AST Trigger Parameters

Trigger evaluation is strict, parsing logical trees based on cart contents, demographics, and active time zones.

Type-safe logical matching bounds

Triggers compile into structured AST JSON arrays validated against Zod schemas. The matcher evaluates constraints—such as minimal item count, customer segment level, specific time slots, and store IDs—in under a millisecond, skipping heavy search tasks.

Time & Timezone Gates

Set rules by timezone and hour blocks. Recommend breakfast items during mornings and lounge bookings at night.

segment == "VIP"

Cohort Targeting

Target specific CRM client segments like high-value VIPs, first-time check-ins, or regular business visitors.

exclude: main_course

Category Constraints

Limit recommendation logic to exclude specific categories or item types. Don't pitch main dishes to side order baskets.

03

Expected Value Recommendation Scoring

Matches are sorted using a margin-tilted expected value metric, maximizing real profit rather than volume.

Attach rate probability meets margin science

Pitches are sorted using the formula `EV = Attach Rate × (Price - Cost)`. An item with a lower conversion rate but a massive profit margin will outrank a high-frequency item that adds no real net income. Stable sort tie-breakers prevent jittery listings.

₹ Margin

Gross Margin Math

Calculates unit profit (`price - cost`) in real-time by reading base costs directly from the inventory ledger.

conversion history

Historical Attach Rollover

Continuously aggregates acceptance outcomes from the ledger to adjust item weights based on real customer conversions.

1. priority 2. expected_value

Stable Tie-Breakers

Enforces predictable sorting order (priority → score → attach rate) to prevent layout shifting on checkout updates.

04

Suppression Gating & Price Delta Limits

Safety bounds prevent overwhelming customers with irrelevant or disproportionately expensive items.

Guardrails that ensure guest trust

Upselling works only when suggestions are reasonable and proportional to the cart. If a customer declines 3 recommended pitches in a session, all triggers shut off. Price delta ratios block items costing more than a configured percentage of the baseline total.

max 35%

Proportionality Cap

Limits suggested item values relative to active carts, preventing mismatched recommendations.

Decline Back-off

Shuts off the recommendation engine immediately for the rest of a session if a user declines 3 suggestions.

min expected value threshold > 0.15

Score Suppression Gate

Suppresses candidates whose expected value score drops below a strict minimum quality threshold.

05

Append-Only Outbox feedback ledger

Database transaction safety guards statistics reporting, rendering recommendation outcomes tamper-proof.

Immutable ledger writes, no back-dating

All offered recommendations, clicks, accepts, and declines are recorded into a PostgreSQL transaction table. Database triggers intercept and drop any attempts to UPDATE or DELETE logs. Occurred dates are set automatically by the database server, blocking back-dated records.

append_only trigger

PostgreSQL Write Blockers

PostgreSQL triggers block row edits at the database driver layer, securing raw trace records from manipulation.

occurred_at FORCED SERVER TIME

Anti-Backdating Gates

Enforces standard database server clock variables on insertion, blocking back-dated records from polluting metrics.

Erasure Sweepers

Scrub customer PII details automatically once data retention limits expire, maintaining DPDP compliance.

The core metric: expected value sorting handles raw profit. Gating ensures the client is never spammed. The balance is the product.

Evaluate SK Upsell on live traffic today.

Our 1,000 free monthly conversations plan includes full access to all recommendation features.

Start free  For developers →