Developer Reference
How Llama Upsells renders on your storefront, and how to customize it in your theme.
This reference is for developers and agencies integrating or customizing Llama Upsell & Cross-Sell in a Shopify theme. If you just want to set up campaigns, see the Guides instead.
How the app integrates with your theme
Llama Upsells renders on the storefront through a Theme App Extension — a set of app blocks you place in the theme editor plus a global app embed that loads the runtime. For standard setups, no theme code changes are required.
- App blocks & app embed — the widgets (recommendations, slider, list, unlock, gift with purchase) are Shopify app blocks. The app embed injects the shared runtime and the Llama Cart. See App blocks.
- App proxy — dynamic data (campaigns, products, discounts, settings) is fetched at runtime through Shopify's App Proxy, so widgets always reflect what's configured in the admin.
- Shopify Functions & checkout extensions — discounts (product, volume/tier, shipping), cart/checkout validation, and post-purchase offers are all separate extensions, so they hold through Shop Pay and checkout.
- Storefront events — the widgets dispatch JavaScript events you can listen to, and expose a few global functions for advanced integrations.
- Metafields — data your theme can read is stored under the
lc_upsellmetafield namespace. - Webhooks — the app handles Shopify's mandatory GDPR compliance webhooks, and order webhooks drive Analytics attribution.
Jump in
Quick start
Enable the app embed and place your first block.
App blocks
Reference for every storefront block and its settings.
JavaScript events
Listen for cart, checkout, and unlock events.
Global API
window.unlock, window.prePurchase, and other hooks.
Metafields
The lc_upsell namespace your theme can read.
Llama Cart
The smart cart, fetch interception, and customization.
Extensions
The 8 Shopify Function and checkout extensions behind pricing, blocking, and post-purchase offers.
App Proxy
How widgets fetch campaigns, products, and discounts at runtime.
Webhooks
GDPR compliance webhooks and how order webhooks feed Analytics.
