Skip to content

Which block shows in an app block

Every time checkout loads or changes, each Checkout Buddy app block works out which of your blocks it should show.

The Content, Product offers and Custom fields app blocks show every block, offer or form whose conditions pass, with no random pick: see the first section. The rest of the page is about the Checkout Buddy (v1) app block, which shows blocks made before the Content block, and the Cart line item app block, which picks the same way.

Checkout’s app blocks need Shopify Plus. For Product offers on product and cart pages, see which offers a block shows.

Content, Product offers and Custom fields app blocks

Section titled “Content, Product offers and Custom fields app blocks”

Content blocks, Product offers and Custom fields forms have their own app blocks, which don’t pick one block at random. Each has a Block IDs setting:

  • Empty: every published block, offer or form whose conditions pass shows, oldest first, stacked.
  • IDs, separated by commas: only those, in that order, each one when its conditions pass.

The Content and Product offers app blocks also have Show first match only: only the first one whose conditions pass shows, in Block IDs order. That’s the way to show one of several messages depending on the situation, without conditions that rule each other out.

There’s no random pick, and no Fixed block ID or Multiple block IDs. To show different blocks in different situations, give each one its own rules under Who sees it. If you add the app block more than once, list IDs in each, so nothing shows twice. See which blocks an app block shows, which offers an app block shows and which forms an app block shows.

How the Checkout Buddy (v1) app block picks a block

Section titled “How the Checkout Buddy (v1) app block picks a block”

The app block goes through these steps:

  1. Start with candidates. If Multiple block IDs is filled in, only those blocks. Otherwise, if Fixed block ID is filled in, only those blocks. Otherwise, every block you’ve made the older way. Content blocks, Product offers and Custom fields forms are never candidates here: they show in their own app blocks.
  2. Drop blocks that are disabled.
  3. Drop blocks for other markets when a block is set to Apply to selected markets only.
  4. Drop blocks whose conditions don’t pass.
  5. Show what’s left.
    • With Multiple block IDs: every remaining block, stacked in the order you listed them.
    • Otherwise: one block. If more than one is left, one is picked at random.
    • If nothing is left, the app block shows nothing.

The check runs again whenever something the conditions depend on changes, such as the cart, address, shipping method, or discount codes. A new random pick can happen each time.

If an app block has no Fixed block ID, every enabled block is a candidate. With two or more blocks that pass their conditions, customers see a random one, and it can switch as they move through checkout.

Fix: give every app block a Fixed block ID.

Older Product offers blocks with A/B testing

Section titled “Older Product offers blocks with A/B testing”

An older Product offers block with Enable A/B testing ticked picks product set A or B at random each time it’s shown. See A/B testing. Product offers made with the new editor don’t have it.

Enter one ID in Fixed block ID. That block shows whenever it’s enabled and its conditions pass, and nothing shows otherwise.

Show a different block depending on the situation

Section titled “Show a different block depending on the situation”

Enter several IDs in Fixed block ID, separated by commas, and give each block conditions that don’t overlap. Only one can pass at a time, so the right one always shows.

For example, one app block with 12, 13, 14:

Block Condition
12: “Add $50 more for free shipping” Cart subtotal is less than 50
13: “Add $100 more for a free gift” Cart subtotal is more than 49.99 and is less than 100
14: “You’ve unlocked a free gift” Cart subtotal is more than 99.99

This also gets around the limit on how many app blocks you can put in one Checkout Editor location.

For gifts that grow with the cart, Product offers don’t need three blocks: use tiers in one offer, which shows its own progress toward the next tier.

Enter IDs in Multiple block IDs, separated by commas: 12, 15, 20. Every one whose conditions pass shows, in that order.

Things to know:

  • Blocks listed in Multiple block IDs aren’t tracked individually in analytics.
  • It’s only available in the Checkout Buddy (v1) and Cart line item app blocks, not on the thank you and order status pages.
  • You can also add several app blocks next to each other, each with its own Fixed block ID. That keeps analytics per block.

A Checkout Buddy (v1) app block selected in the Checkout Editor, with Fixed block ID 19359 in its settings and its block highlighted in the preview