Skip to content

The engine Step 04 of the loop

Opportunities

Ayra Opportunities is the layer of the Shopify retention engine that turns signals into things worth acting on. A rule watches the customer profile for a pattern, a VIP's wishlisted item back in stock, a subscriber who skipped twice, a first-time buyer twenty days past delivery with no review, and opens an opportunity with a type, the customer, the evidence, a priority from P0 to P4 and an expiry. The decision layer then picks one next best action per customer.

Every retention chance, typed and prioritised, with evidence and an expiry.

Open opportunities

4 open
Customer Type Evidence Prio
Hira VIP_RESTOCK Wishlisted + restocked P1
Daniel SUB_SKIP_X2 Skipped 2 cycles P2
Mei FIRST_REVIEW Delivered 20d, no review P3
Omar REFERRAL_PUSH NPS 9, 3 orders P4

01 The merchant problem

Triggers fire. Opportunities wait to be decided.

A trigger is a rule that sends. An opportunity is a rule that notices, and then lets something decide between everything it noticed about one customer.

  • Every trigger is equal

    A VIP restock and a routine points reminder carry the same weight in a queue. Whichever fires first, sends first.

  • Nothing expires

    A win-back flow started in March is still sending in June to a customer who came back in April.

  • No evidence

    The message goes out, but nobody can say which facts about the customer qualified them for it.

  • No way to do nothing

    Once a trigger matches, the send happens, even when the best outcome for that customer this week is silence.

02 How Ayra solves it

What Opportunities does

  1. 01

    Typed, with evidence

    Each opportunity has a type such as VIP_RESTOCK, SUB_SKIP_X2, FIRST_REVIEW, WINBACK or SECOND_ORDER, the signals that qualified it, and the profile facts used.

    Explore Signals
  2. 02

    Priority from P0 to P4

    Scored from the customer's value, intent and the time left, so a VIP restock expiring in 72 hours outranks a referral nudge with a month to run.

    Explore Customer 360
  3. 03

    Expiry built in

    Every opportunity expires. A customer who acts on their own closes it, and nothing stale keeps sending.

  4. 04

    One next best action per customer

    Open opportunities resolve to one action, or to NO_ACTION, with Journey Guard applied. The rest are merged, scheduled or dropped, and the reason is logged.

    Explore Flows
  5. 05

    Attributed on close

    When the resulting order lands, it is credited once to the opportunity and the module that triggered it.

    Explore Analytics

03 Inside

Opportunity types at launch

The explicit rules the engine ships with. Each is readable and editable, and more are added over time.

TypeOpens whenDefault priorityTypical action
VIP_RESTOCKA VIP or high-intent customer's wishlisted variant restocksP1Restock alert with a points bonus, before the general announcement
WINBACKA customer passes a multiple of their own gap between ordersP1–P2What they wanted first, then credit, then one discount
SUB_SKIP_X2A subscriber skips two consecutive cyclesP1Save Engine: pause, swap or date change
CHURN_RISKSkips, a low rating, a failed payment or a ticket inside a windowP1Fix first, hold promotions
SECOND_ORDERA first order is delivered and no second order followsP2Delivery-timed post-purchase steps
POINTS_EXPIRYA balance enters the expiry reminder windowP3One reminder, with the items they viewed
FIRST_REVIEWDelivered, no review and no open ticket after a set number of daysP3Review request on the preferred channel
REFERRAL_PUSHA positive review or a repeat order from a customer who has not referredP4Referral nudge, scheduled behind higher priorities

In the loop The engine watches for patterns worth acting on: a VIP's wishlisted item back in stock, a subscriber who skipped twice, a first-time buyer 20 days post-delivery with no review. Each becomes an Opportunity with a type, a customer, evidence and an expiry. How it works

04 The workflow

Opportunities, one customer at a time.

Leila, Gold · 7 orders. Five stages, one decision, every reason recorded.

Leila

Gold · 7 orders

5 stages

Signal

Two signals in one week

Leila's wishlisted jacket restocks on Tuesday. On Thursday her points balance enters the 14-day expiry window.

  • restock
  • points.expiring

Customer

Gold, high intent, quiet inbox

7 orders, $930 lifetime value, intent high, last send nine days ago, no open tickets, email preferred.

  • Gold
  • Intent high
  • last send 9d

Opportunity

Two opportunities, ranked

VIP_RESTOCK opens at P1 with a 72-hour expiry. POINTS_EXPIRY opens at P3 with 14 days. Both carry their evidence.

  • VIP_RESTOCK P1
  • POINTS_EXPIRY P3

Action

One action, one merge

The next best action is the restock alert. The expiring points are attached as the incentive, so the P3 opportunity is satisfied by the same send. One email goes out.

  • 1 send
  • merged
  • Journey Guard: clear

Outcome

Both closed by one order

Leila orders the jacket and spends the points. Both opportunities close as converted, and the order is credited once to Back in Stock and Loyalty.

  • Order #5422
  • 2 closed

05 Use cases

Where it shows up.

Already acted 01

A customer with an open winback opportunity places an order on their own.

Ayra decides

The order signal closes the opportunity. No message is sent, and the order is not attributed to winback.

Expired 02

A restock alert was never sent because the customer had hit their frequency cap, and the stock sold out.

Ayra decides

The opportunity expires with the hold as its reason. The timeline shows what was not sent and why.

Conflict 03

Three opportunities are open for one customer on the same day.

Ayra decides

One is actioned, one is merged into it, one is scheduled. Each has a logged reason.

For developers

Opportunities as events

Opportunity opened, decided, actioned, expired and converted are typed events. Use them as Shopify Flow triggers, subscribe over webhooks, or read a customer's open opportunities and their evidence through the REST API.

Solutions built on Opportunities

06 FAQ

Opportunities questions

What is the difference between an opportunity and a trigger?

A trigger sends when it matches. An opportunity records that a customer qualifies, with evidence, priority and expiry, and leaves the decision to the next-best-action step, which may pick a different opportunity or nothing at all.

Can I edit the rules?

Yes. Opportunity types, eligibility and scoring are explicit rules you can read and edit, and every decision has a visible reason in the timeline.

What happens when two opportunities conflict?

One is actioned and the others are merged into it, scheduled or dropped, inside the customer's frequency cap. The reason is logged for each.

Is NO_ACTION really an outcome?

Yes. If the best action would break a cap, land on an open complaint or stack a discount, the engine records NO_ACTION with the rule.

Will prediction replace the rules?

Prediction is layered on top later, for churn, repeat purchase and send time. The rules, the guards and the timeline stay the same.

Private beta

See the open opportunities on your customers today.

Private beta merchants get the opportunity rules on their own data, readable and editable, with every decision logged.

Private beta

Join the waitlist.

We're onboarding Shopify merchants in small batches. Leave your email and store, and we'll reach out when your spot opens.

One email when your spot opens. Unsubscribe any time.