Most shoppers do not begin with a SKU. They begin with a constraint: “I need a dual-monitor arm for a shallow desk, and I cannot drill holes.” A useful shopping assistant must turn that request into a checkable product choice, then connect the choice to a real Shopify cart.
This article proposes an implementation for Shopify developers. The monitor-arm examples are hypothetical, not a live customer project. Images are excerpts from TypeSafe’s official pages, included for technical analysis. This article was written with AI assistance and checked against the linked documentation.

What Jev should do in the stack
Jev is presented by TypeSafe as an early-access decision component for structured judgments. Its documentation describes three primitives: Choice selects from defined options, Score assigns a score, and Noul returns a 0–1 judgment for a statement. Choice and Score also return probability distributions and confidence. See the TypeSafe introduction.
That output should sit inside a layered system:
- Deterministic rules check numbers and transaction facts: weight limits, VESA patterns, desk thickness, price, market, inventory and purchase eligibility.
- Catalog retrieval finds the products that could be relevant.
- Jev helps interpret an incomplete preference, compare already eligible candidates, or decide which question to ask next.
- UI components explain the result and expose product details, alternatives and actions.
- Shopify and connected systems remain the source of truth for products, carts, checkout and orders.
Do not ask a model to decide whether a 12 mm desk is inside a 10–50 mm clamp range. Write that as code. A semantic question such as “Does this shopper prioritize saving desk space or frequent monitor adjustment?” can be a reasonable model input after hard compatibility has been checked.
Build the catalog before the assistant
An AI layer cannot repair incomplete product data. For each purchasable variant, keep a structured record containing:
- product and variant IDs;
- load range, VESA pattern and supported desk thickness;
- clamp, grommet or other mounting method;
- adjustment characteristics and space requirements;
- market, currency, current price and selling status;
- source, revision and last-updated time for important fields.
Use the same fields to render the product page and to evaluate compatibility. Keep time-sensitive data such as price and availability in a live lookup path, and recheck it immediately before a cart mutation. If a field is missing, represent it as unknown. Missing load data must not be treated as “no load limit.”
A six-stage request flow
The first version can be modeled as:
capture needs
-> retrieve candidates
-> validate hard constraints
-> ask Jev a small decision question
-> ask the shopper to confirm
-> create or update the Shopify cart
The following is pseudocode, not a Jev or Shopify SDK example:
const needs = collectNeeds(); // unknown values stay unknown
const candidates = retrieveCatalog(needs);
if (requiredInputsMissing(needs)) return askForMissingData();
const eligible = candidates.filter(p => verifiedHardRulesPass(p, needs));
if (eligible.length === 0) return showNoMatchOrEscalate();
const decision = await jevChoice({
question: "Which eligible option best matches the shopper's stated priority?",
options: [...eligible.map(p => p.internalKey), "NO_MATCH", "ASK"],
state: { needs, candidates: eligible.map(p => ({
key: p.internalKey, verifiedFacts: p.facts, sourceRevision: p.revision
})) }
});
if (["NO_MATCH", "ASK"].includes(decision.value)) return routeFallback(decision);
if (!passesValidatedDecisionGate(decision)) return showComparison(eligible);
const selected = mapAndRecheck(decision.value, eligible);
return showForConfirmation(selected);
The server must own the mapping from an internal candidate key to a real variantId. Never let a model invent a variant ID. After the shopper confirms, fetch current selling status and price again, then perform the cart operation.

Confidence is a signal, not an accuracy claim
TypeSafe’s confidence documentation describes confidence as derived from the probability distribution and reflecting how concentrated the result is. It is not a measured business accuracy rate. Noul does not expose this same confidence field.
If two eligible products are close, show their differences and let the shopper decide. If the model is highly concentrated but the monitor weight is still unknown, the system must still ask for the weight. A practical gate is:
required data complete
AND deterministic compatibility passes
AND the model result meets a threshold validated on local review cases
=> show a recommendation
otherwise => ask, compare, or escalate
The threshold is an application policy that needs real, manually reviewed examples. It should not be copied from a universal number or treated as a promise across languages, categories or markets.
Connecting the recommendation to a real Shopify cart
For a Storefront API implementation, Shopify’s cartCreate mutation can create a cart and return a checkoutUrl. The response also needs to be checked for userErrors and warnings. Existing theme stores should first decide whether the assistant will use the current theme cart or a Storefront Cart flow. Running a second, hidden cart can create the confusing state where the assistant says “added” while the site’s cart icon is empty.
Use this sequence for the mutation:
- Resolve the confirmed selection on the server to the current variant.
- Recheck price, inventory, market, quantity limits and any customer-specific rules.
- If a fact changed, show the updated result and ask for confirmation again.
- Add the variant and quantity to the chosen cart implementation.
- Inspect errors, warnings and the returned cart contents before showing success.
- Offer the checkout link only after the cart state is known.
Handle double clicks and uncertain network responses. Give each client action an application-level operation ID; when a request times out, query the cart or mutation result before retrying. This is an application design responsibility, not a guarantee that every Shopify or model interface automatically deduplicates requests.
Payment, order creation and refunds belong to the transaction system. A model response can describe a recommendation, but it cannot establish that an order succeeded.
Failure paths are part of the product
Design the fallback before launch:
- Jev unavailable: preserve the collected constraints and return ordinary filters or a product list.
- Required catalog field missing: explain what needs confirmation instead of claiming compatibility.
- Price or inventory changed: refresh and request confirmation.
- Several products fit: present a comparison.
- CRM or downstream sync fails: retain the inquiry and surface a recoverable status.
Keep secrets on the server, give the model only the data needed for the current judgment, and avoid granting it permission to change products, prices or refunds. Log model and question versions, catalog revision, routing result and error reason without retaining unnecessary personal data.
How to validate the first release
Create manually reviewed cases covering clear requirements, missing information, contradictory constraints, no-match results and multilingual phrasing. Run the assistant in shadow mode first so it records recommendations without changing the shopper’s result. Check whether suitable products enter the candidate set, unknowns remain unknown, hard rules are respected, follow-up questions are necessary, and the ordinary shopping path survives a timeout.
Only then compare a small set of flows. Track recommendation acceptance, add-to-cart, checkout completion, human escalation and return reasons. A higher click rate alone does not prove better product selection. Measure the full path: retrieval, rule checks, model call, rendering and cart mutation.
WESWOO focuses on Shopify storefront design and development, with B2B, Plus and systems integration when a project requires it. In this type of project, that can include structured product pages, comparison components, mobile interaction, cart integration and an explicit test plan. Learn more at WESWOO’s Shopify design and development services. The implementation scope and data sources should be confirmed for each store; this article does not claim that WESWOO has deployed Jev or this workflow for a named customer.