{
  "reference_version": "1.0.0",
  "ucp_version": "v2026-08-25",
  "scenario": "synthetic-shopify-merchant-fixed-cart",
  "data_classification": "public",
  "generated_at": "2026-09-23T00:00:00Z",
  "contains_synthetic_data": true,
  "ucp_sources": {
    "loyalty_spec": "https://ucp.dev/2026-08-25/specification/common/extensions/loyalty",
    "loyalty_schema": "https://ucp.dev/2026-08-25/schemas/common/loyalty.json",
    "release": "https://github.com/Universal-Commerce-Protocol/ucp/releases/tag/v2026-08-25",
    "loyalty_pr": "https://github.com/Universal-Commerce-Protocol/ucp/pull/340"
  },
  "title": "Anonymous cart: public program terms and earning forecast",
  "merchant": {
    "name": "Harbor & Pine Tea (synthetic demo merchant)",
    "domain": "harborpine.example",
    "platform": "Shopify (simulated)",
    "currency": "USD"
  },
  "program_terms": {
    "name": "Harbor & Pine Rewards",
    "earn_rate_points_per_dollar": 5,
    "min_spend": 35,
    "first_order_bonus_points": 150,
    "redemption_thresholds": [
      {
        "points": 500,
        "value_amount": 5
      },
      {
        "points": 900,
        "value_amount": 12
      }
    ],
    "points_expiry_days": 180
  },
  "scenarios": [
    {
      "id": "anonymous_eligible",
      "title": "Anonymous shopper, $72.00 cart",
      "stabile_source": {
        "endpoint": "POST /agent/loyalty-quote",
        "source": "shopify/stabilerewards-agent-app/agent.js → loyalty.js buildProgramVisibility()",
        "request": {
          "shop": "harborpine.example",
          "cart_total": 72
        },
        "response_excerpt": {
          "status": "available",
          "personalized_rewards_included": false,
          "customer_data_requires_consent": true,
          "cart_total": 72,
          "program": {
            "earn_rate": 5,
            "min_spend": 35,
            "first_order_bonus": 150,
            "tiers": [
              {
                "points_required": 500,
                "value_amount": 5,
                "value": "$5.00"
              },
              {
                "points_required": 900,
                "value_amount": 12,
                "value": "$12.00"
              }
            ]
          },
          "projected_earn": {
            "eligible": true,
            "base_points": 360,
            "first_order_bonus_points": 150,
            "total_points": 510,
            "assumes_first_order": true,
            "unlocks": {
              "points_required": 500,
              "value_amount": 5,
              "value": "$5.00"
            },
            "explanation": "This $72.00 order earns 360 points plus a 150-point first-order bonus = 510 points, enough for $5.00 off a future order."
          }
        }
      },
      "ucp_projection": {
        "note": "Abbreviated cart response focused on loyalty fields, in the same style as the spec examples; a complete response also carries ucp, id, currency, and status.",
        "request": {
          "context": {
            "eligibility": [
              "example.harborpine.rewards"
            ]
          },
          "line_items": [
            {
              "item": {
                "id": "prod_synthetic_sampler"
              },
              "quantity": 1
            },
            {
              "item": {
                "id": "prod_synthetic_mug"
              },
              "quantity": 1
            }
          ]
        },
        "response": {
          "currency": "USD",
          "line_items": [
            {
              "id": "li_1",
              "item": {
                "id": "prod_synthetic_sampler",
                "title": "Loose-leaf tea sampler",
                "price": 4800
              },
              "quantity": 1,
              "totals": [
                {
                  "type": "subtotal",
                  "amount": 4800
                },
                {
                  "type": "total",
                  "amount": 4800
                }
              ]
            },
            {
              "id": "li_2",
              "item": {
                "id": "prod_synthetic_mug",
                "title": "Ceramic tasting mug",
                "price": 2400
              },
              "quantity": 1,
              "totals": [
                {
                  "type": "subtotal",
                  "amount": 2400
                },
                {
                  "type": "total",
                  "amount": 2400
                }
              ]
            }
          ],
          "loyalty": {
            "example.harborpine.rewards": {
              "id": "unverified",
              "name": "Harbor & Pine Rewards",
              "provisional": true,
              "rewards": [
                {
                  "currency": {
                    "name": "Harbor Points",
                    "code": "HPT"
                  },
                  "earning_forecast": {
                    "amount": 510,
                    "breakdown": [
                      {
                        "id": "RULE_BASE_EARN",
                        "amount": 360,
                        "description": "5 points per $1 on this order",
                        "benefit_id": "BEN_EARN_RATE"
                      },
                      {
                        "id": "RULE_FIRST_ORDER_BONUS",
                        "amount": 150,
                        "description": "First-order bonus (applies only if this is the shopper's first eligible order)",
                        "benefit_id": "BEN_FIRST_ORDER_BONUS"
                      }
                    ]
                  }
                }
              ]
            }
          },
          "totals": [
            {
              "type": "subtotal",
              "display_text": "Subtotal",
              "amount": 7200
            },
            {
              "type": "total",
              "display_text": "Estimated Total",
              "amount": 7200
            }
          ],
          "messages": []
        }
      }
    },
    {
      "id": "anonymous_below_minimum",
      "title": "Anonymous shopper, $28.00 cart under the $35.00 minimum",
      "stabile_source": {
        "endpoint": "POST /agent/loyalty-quote",
        "source": "shopify/stabilerewards-agent-app/agent.js → loyalty.js buildProgramVisibility()",
        "request": {
          "shop": "harborpine.example",
          "cart_total": 28
        },
        "response_excerpt": {
          "status": "available",
          "personalized_rewards_included": false,
          "customer_data_requires_consent": true,
          "cart_total": 28,
          "program": {
            "earn_rate": 5,
            "min_spend": 35,
            "first_order_bonus": 150,
            "tiers": [
              {
                "points_required": 500,
                "value_amount": 5,
                "value": "$5.00"
              },
              {
                "points_required": 900,
                "value_amount": 12,
                "value": "$12.00"
              }
            ]
          },
          "projected_earn": {
            "eligible": false,
            "base_points": 0,
            "first_order_bonus_points": 0,
            "total_points": 0,
            "assumes_first_order": true,
            "unlocks": null,
            "explanation": "Orders must be at least $35.00 to earn points; this cart is $28.00."
          }
        }
      },
      "ucp_projection": {
        "note": "Abbreviated cart response focused on loyalty fields, in the same style as the spec examples; a complete response also carries ucp, id, currency, and status.",
        "request": {
          "context": {
            "eligibility": [
              "example.harborpine.rewards"
            ]
          },
          "line_items": [
            {
              "item": {
                "id": "prod_synthetic_tin"
              },
              "quantity": 1
            }
          ]
        },
        "response": {
          "currency": "USD",
          "line_items": [
            {
              "id": "li_1",
              "item": {
                "id": "prod_synthetic_tin",
                "title": "Single-origin tea tin",
                "price": 2800
              },
              "quantity": 1,
              "totals": [
                {
                  "type": "subtotal",
                  "amount": 2800
                },
                {
                  "type": "total",
                  "amount": 2800
                }
              ]
            }
          ],
          "loyalty": {
            "example.harborpine.rewards": {
              "id": "unverified",
              "name": "Harbor & Pine Rewards",
              "provisional": true,
              "rewards": [
                {
                  "currency": {
                    "name": "Harbor Points",
                    "code": "HPT"
                  },
                  "earning_forecast": {
                    "amount": 0
                  }
                }
              ]
            }
          },
          "totals": [
            {
              "type": "subtotal",
              "display_text": "Subtotal",
              "amount": 2800
            },
            {
              "type": "total",
              "display_text": "Estimated Total",
              "amount": 2800
            }
          ],
          "messages": [
            {
              "type": "warning",
              "code": "membership_benefit_ineligible",
              "path": "$.loyalty['example.harborpine.rewards']",
              "content": "Orders must be at least $35.00 to earn points; this cart is $28.00."
            }
          ]
        }
      }
    }
  ],
  "observations": [
    {
      "id": "OBS_1_NO_PROSPECT_PATH",
      "title": "No released path for a non-member earning forecast",
      "detail": "The loyalty map is keyed by an eligibility claim the business accepts, or by membership resolved from an authenticated identity. An anonymous shopper who is not yet a member has neither, so the released extension has no standard place for \"this cart would earn N points if you join\", which is the most common loyalty question in discovery. This projection assumes the platform sends the program key as a claim and the business answers provisionally.",
      "related": "https://github.com/Universal-Commerce-Protocol/ucp/issues/384"
    },
    {
      "id": "OBS_2_REQUIRED_ID_WHEN_UNVERIFIED",
      "title": "Membership id is required even when nothing is verified",
      "detail": "loyalty_membership requires `id`, and the guidelines forbid raw stable member identifiers. For a provisional or prospective response the business must invent a non-identifying placeholder. The fixture uses the constant \"unverified\"."
    },
    {
      "id": "OBS_3_REDEMPTION_THRESHOLDS",
      "title": "Points-redemption thresholds are not tiers",
      "detail": "Stabile's program \"tiers\" are redemption thresholds (500 points → $5 off), not status ranks. membership_tier models status, and the spec defers redeemable balances to a payment instrument or a future redemption capability. The reference describes thresholds as benefit text only."
    },
    {
      "id": "OBS_4_CONDITIONAL_EARN_WARNING",
      "title": "Reusing membership_benefit_ineligible for an earn minimum",
      "detail": "The warning code is defined for monetary benefits whose conditions are not met. The reference reuses it when a cart is under the program's earn minimum, which may or may not be the intended use."
    }
  ]
}
