Battle Test Event
A stress-test event exercising every nesting combination: oneOf/anyOf inside if/then/else, if/then/else inside oneOf/anyOf branches, nested conditionals inside conditionals, array items with all combos, and deeply nested objects.
DataLayer Examples
user_id options:
- String ID
- Integer ID
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": 98765,
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
contact_method options:
- Email Contact
- SMS Contact
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "sms",
"phone_number": "+1234567890"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
shipping_class options:
- Standard Parcel
- Freight
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "freight",
"requires_signature": true,
"pallet_count": 1
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
payment options:
- Credit Card
- Digital Wallet
- Bank Transfer
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"method": "digital_wallet",
"wallet_provider": "apple_pay",
"wallet_email": "user@example.com"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"method": "bank_transfer",
"bank_name": "First National Bank",
"reference_id": "TXN-2026-001"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
wallet_provider options:
- Known Provider
- Custom Provider
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
fulfillment options:
- Home Delivery
- Store Pickup
- Digital Fulfillment
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"fulfillment_method": "store_pickup",
"store_id": "STORE-42",
"pickup_time": {
"slot_type": "scheduled",
"datetime": "2026-03-15T14:00:00Z"
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"fulfillment_method": "digital",
"delivery_email": "buyer@example.com"
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
pickup_time options:
- Scheduled Time
- ASAP Pickup
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
discount options:
- Percentage Discount
- Fixed Discount
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "fixed",
"amount": 10
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
source options:
- Web Source
- App Source
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "app",
"app_version": "3.2.1",
"os": "ios"
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
conditional options:
- When condition is met
- When condition is not met
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"vat_number": "DE123456789"
});
conditional options:
- When condition is met
- When condition is not met
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"session_id": "sess-xyz-789"
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
conditional options:
- When condition is met
- When condition is not met
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"opt_out_reason": "too_many_emails"
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
conditional options:
- When condition is met
- When condition is not met
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"download_url": "https://example.com/download/abc",
"license_type": "perpetual"
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
conditional options:
- When condition is met
- When condition is not met
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cvv": "123"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
conditional options:
- When condition is met
- When condition is not met
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"zip_plus_four": "10001-1234"
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
conditional options:
- When condition is met
- When condition is not met
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"viewport_width": 1920,
"viewport_height": 1080
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
conditional options:
- When condition is met
- When condition is not met
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"recycling_fee": {
"applies": true,
"amount": 1.5
}
});
window.dataLayer.push({
"event": "checkout_complete",
"$schema": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"user": {
"account_type": "registered",
"user_id": "usr-abc-123",
"loyalty_tier": "gold",
"contact_method": {
"channel": "email",
"email_address": "user@example.com"
},
"preferences": {
"marketing_consent": true,
"frequency": "weekly",
"topics": [
"deals",
"new_arrivals"
]
}
},
"items": [
{
"item_type": "physical",
"name": "Wireless Headphones",
"price": 79.99,
"quantity": 2,
"weight_kg": 0.35,
"dimensions": {
"length": 20,
"width": 15,
"height": 8
},
"shipping_class": {
"class": "standard_parcel",
"estimated_days": 5
}
}
],
"payment": {
"currency": "USD",
"method": "credit_card",
"card_brand": "visa",
"last_four": "4242",
"cid": "1234"
},
"fulfillment": {
"type": "delivery",
"fulfillment_method": "home_delivery",
"address": {
"country": "US",
"city": "New York",
"street": "123 Main St",
"customs_declaration": {
"declared_value": 150,
"contents_description": "Electronics",
"hs_code": "8518.30"
}
}
},
"discount": {
"type": "percentage",
"value": 15
},
"metadata": {
"timestamp": "2026-02-24T12:00:00Z",
"source": {
"platform": "web",
"device_type": "desktop",
"browser": "Chrome",
"screen_width": 390,
"touch_capable": true
}
},
"tax": {
"rate": 0.0825,
"amount": 6.6,
"jurisdiction": "CA"
},
"state_exemption_code": "TX-EXEMPT-001"
});
Event Properties
| Property | Type | Constraints | Examples | Description |
|---|---|---|---|---|
| event | string | required | | The name of the event. |
const: "checkout_complete" | ||||
| $schema | string | const: "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json" | | Schema validation URL. |
| {}user | object | required | User information with conditional fields based on account type. Demonstrates: if/then/else with oneOf inside then branch, and nested if/then/else inside then branch. | |
| account_type | string | required | | Whether the user is a guest or registered. |
enum: [guest, registered] | ||||
user_id - Select one of the following options:The user's ID, which can be a string or integer. | ||||
A string-based user ID. | ||||
| user_id | string | | A string-based user ID. | |
A numeric user ID. | ||||
| If | ||||
| account_type | object | required | | |
const: "registered" | ||||
Registered users have a loyalty tier, preferences, and a contact method choice. | ||||
| loyalty_tier | string | required | | The user's loyalty program tier. |
enum: [bronze, silver, gold, platinum] | ||||
| {}contact_method | object | How to reach the registered user — oneOf inside a then branch. | ||
Select one of the following options: | ||||
Contact via email. | ||||
| channel | string | required | | The contact channel identifier. |
const: "email" | ||||
| email_address | string | required | | The user's email address. |
format: email | ||||
Contact via SMS. | ||||
| {}preferences | object | User notification preferences with nested if/then/else (if/then/else inside if/then). | ||
| marketing_consent | boolean | required | | Whether the user consented to marketing. |
| If | ||||
| marketing_consent | object | required | | |
const: true | ||||
Consenting users specify their preferred frequency. | ||||
| frequency | string | required | | How often to send marketing messages. |
enum: [daily, weekly, monthly] | ||||
| topics | array | | Marketing topics of interest. | |
Non-consenting users only have an opt-out reason. | ||||
Guest users only have a session ID. | ||||
| []items | array | required | Cart items with if/then/else in array items, and oneOf inside then/else branches. | |
minItems: 1 | ||||
| item_type | string | required | | Whether this is a physical or digital item. |
enum: [physical, digital] | ||||
| name | string | required | | Item name. |
| price | number | required | | Item price in the transaction currency. |
minimum: 0 | ||||
| quantity | integer | minimum: 1 | | Number of units. |
default: 1 | ||||
| If | ||||
| item_type | object | required | | |
const: "physical" | ||||
Physical items have weight, dimensions, and a shipping class choice (oneOf inside then). | ||||
| weight_kg | number | minimum: 0.01 | | Item weight in kilograms. |
| {}dimensions | object | Package dimensions in centimeters. | ||
| length | number | | Length in cm. | |
| width | number | | Width in cm. | |
| height | number | | Height in cm. | |
| {}shipping_class | object | Shipping classification — oneOf inside a then branch. | ||
Select one of the following options: | ||||
Regular parcel shipping. | ||||
| class | string | required | | The shipping class identifier. |
const: "standard_parcel" | ||||
| estimated_days | integer | minimum: 1 | | Estimated delivery days. |
Heavy/oversized freight shipping. | ||||
Digital items have a download URL and license type. | ||||
| If | ||||
| item_type | object | required | | |
const: "physical" | ||||
Physical items have weight, dimensions, and a shipping class choice (oneOf inside then). | ||||
| weight_kg | number | minimum: 0.01 | | Item weight in kilograms. |
| {}dimensions | object | Package dimensions in centimeters. | ||
| length | number | | Length in cm. | |
| width | number | | Width in cm. | |
| height | number | | Height in cm. | |
| {}shipping_class | object | Shipping classification — oneOf inside a then branch. | ||
Select one of the following options: | ||||
Regular parcel shipping. | ||||
| class | string | required | | The shipping class identifier. |
const: "standard_parcel" | ||||
| estimated_days | integer | minimum: 1 | | Estimated delivery days. |
Heavy/oversized freight shipping. | ||||
Digital items have a download URL and license type. | ||||
| {}payment | object | required | Payment details — anyOf with if/then/else inside one of the anyOf branches. | |
| currency | string | required | | ISO 4217 currency code. |
pattern: /^[A-Z]{3}$/ | ||||
Select any of the following options:Payment details — anyOf with if/then/else inside one of the anyOf branches. | ||||
Payment by credit card — includes if/then/else based on card brand (if/then/else inside anyOf). | ||||
Payment by digital wallet. | ||||
Payment by bank transfer. | ||||
| {}fulfillment | object | required | Fulfillment details — anyOf with different fulfillment types, some containing nested if/then/else. | |
| type | string | required | | Fulfillment type. |
enum: [delivery, pickup, digital] | ||||
Select any of the following options:Fulfillment details — anyOf with different fulfillment types, some containing nested if/then/else. | ||||
Home delivery with if/then/else based on whether it's international. | ||||
In-store pickup. | ||||
Purely digital delivery. | ||||
| {}discount | object | Applied discount — either a percentage or a fixed amount. | ||
Select one of the following options: | ||||
A percentage-based discount. | ||||
| type | string | required | | The discount type identifier. |
const: "percentage" | ||||
| value | number | required | | Discount percentage (0-100). |
minimum: 0 | ||||
maximum: 100 | ||||
A fixed-amount discount. | ||||
| {}metadata | object | Event metadata with oneOf at property level, containing if/then/else inside one of the oneOf branches. | ||
| timestamp | string | format: date-time | | When the event occurred. |
| {}source | object | Where the event originated — oneOf with if/then/else inside a branch. | ||
Select one of the following options: | ||||
Event from a web browser, with if/then/else based on device type. | ||||
| platform | string | required | | The source platform identifier. |
const: "web" | ||||
| device_type | string | required | | The type of device. |
enum: [desktop, mobile, tablet] | ||||
| browser | string | | Browser name. | |
| If | ||||
| device_type | object | required | | |
const: "mobile" | ||||
Mobile web sessions include screen size and touch capability. | ||||
| screen_width | integer | | Screen width in pixels. | |
| touch_capable | boolean | | Whether the device supports touch. | |
Non-mobile web sessions include viewport dimensions. | ||||
Event from a native app. | ||||
| If | ||||
| {}payment | object | |||
| currency | object | const: "USD" | | ISO 4217 currency code. |
USD transactions require tax information. Demonstrates: if/then/else directly inside a then branch (if inside if). | ||||
| {}tax | object | US tax details. | ||
| rate | number | required | | Tax rate as a decimal (e.g. 0.0825 for 8.25%). |
minimum: 0 | ||||
maximum: 1 | ||||
| amount | number | required | | Calculated tax amount. |
minimum: 0 | ||||
| jurisdiction | string | | Tax jurisdiction (state). | |
| If Check if tax jurisdiction is California. | ||||
| {}tax | object | |||
| jurisdiction | object | const: "CA" | | Tax jurisdiction (state). |
California transactions require additional recycling fee info (if/then/else directly inside a then branch). | ||||
| {}recycling_fee | object | California recycling fee details. | ||
| applies | boolean | required | | Whether a recycling fee applies. |
| amount | number | minimum: 0 | | Recycling fee amount. |
Non-California USD transactions may include a state-specific exemption code. | ||||
Non-USD transactions may include a VAT number. | ||||
View Raw JSON Schema
{
: "https://json-schema.org/draft/2020-12/schema",
: "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json",
"title": "Battle Test Event",
"description": "A stress-test event exercising every nesting combination: oneOf/anyOf inside if/then/else, if/then/else inside oneOf/anyOf branches, nested conditionals inside conditionals, array items with all combos, and deeply nested objects.",
"x-tracking-targets": [
"web-datalayer-js"
],
"type": "object",
"required": [
"event",
"user",
"items",
"payment",
"fulfillment"
],
"properties": {
"$schema": {
"type": "string",
"description": "Schema validation URL.",
"const": "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/web/battle-test-event.json"
},
"event": {
"type": "string",
"const": "checkout_complete",
"description": "The event name.",
"examples": [
"checkout_complete"
]
},
"user": {
"type": "object",
"description": "User information with conditional fields based on account type. Demonstrates: if/then/else with oneOf inside then branch, and nested if/then/else inside then branch.",
"required": [
"account_type"
],
"properties": {
"account_type": {
"type": "string",
"description": "Whether the user is a guest or registered.",
"enum": [
"guest",
"registered"
],
"examples": [
"registered"
]
},
"user_id": {
"description": "The user's ID, which can be a string or integer.",
"oneOf": [
{
"title": "String ID",
"type": "string",
"description": "A string-based user ID.",
"examples": [
"usr-abc-123"
]
},
{
"title": "Integer ID",
"type": "integer",
"description": "A numeric user ID.",
"examples": [
98765
]
}
]
}
},
"if": {
"properties": {
"account_type": {
"const": "registered"
}
},
"required": [
"account_type"
]
},
"then": {
"description": "Registered users have a loyalty tier, preferences, and a contact method choice.",
"properties": {
"loyalty_tier": {
"type": "string",
"description": "The user's loyalty program tier.",
"enum": [
"bronze",
"silver",
"gold",
"platinum"
],
"examples": [
"gold"
]
},
"contact_method": {
"description": "How to reach the registered user — oneOf inside a then branch.",
"oneOf": [
{
"title": "Email Contact",
"type": "object",
"description": "Contact via email.",
"properties": {
"channel": {
"type": "string",
"const": "email",
"description": "The contact channel identifier."
},
"email_address": {
"type": "string",
"format": "email",
"description": "The user's email address.",
"examples": [
"user@example.com"
]
}
},
"required": [
"channel",
"email_address"
]
},
{
"title": "SMS Contact",
"type": "object",
"description": "Contact via SMS.",
"properties": {
"channel": {
"type": "string",
"const": "sms",
"description": "The contact channel identifier."
},
"phone_number": {
"type": "string",
"description": "The user's phone number.",
"pattern": "^\\+[0-9]{10,15}$",
"examples": [
"+1234567890"
]
}
},
"required": [
"channel",
"phone_number"
]
}
]
},
"preferences": {
"type": "object",
"description": "User notification preferences with nested if/then/else (if/then/else inside if/then).",
"required": [
"marketing_consent"
],
"properties": {
"marketing_consent": {
"type": "boolean",
"description": "Whether the user consented to marketing.",
"examples": [
true
]
}
},
"if": {
"properties": {
"marketing_consent": {
"const": true
}
},
"required": [
"marketing_consent"
]
},
"then": {
"description": "Consenting users specify their preferred frequency.",
"properties": {
"frequency": {
"type": "string",
"description": "How often to send marketing messages.",
"enum": [
"daily",
"weekly",
"monthly"
],
"examples": [
"weekly"
]
},
"topics": {
"type": "array",
"description": "Marketing topics of interest.",
"items": {
"type": "string"
},
"examples": [
[
"deals",
"new_arrivals"
]
]
}
},
"required": [
"frequency"
]
},
"else": {
"description": "Non-consenting users only have an opt-out reason.",
"properties": {
"opt_out_reason": {
"type": "string",
"description": "Why the user declined marketing.",
"examples": [
"too_many_emails"
]
}
}
}
}
},
"required": [
"loyalty_tier"
]
},
"else": {
"description": "Guest users only have a session ID.",
"properties": {
"session_id": {
"type": "string",
"description": "Temporary session identifier for guest users.",
"examples": [
"sess-xyz-789"
]
}
},
"required": [
"session_id"
]
}
},
"items": {
"type": "array",
"description": "Cart items with if/then/else in array items, and oneOf inside then/else branches.",
"minItems": 1,
"items": {
"type": "object",
"required": [
"item_type",
"name",
"price"
],
"properties": {
"item_type": {
"type": "string",
"description": "Whether this is a physical or digital item.",
"enum": [
"physical",
"digital"
],
"examples": [
"physical"
]
},
"name": {
"type": "string",
"description": "Item name.",
"examples": [
"Wireless Headphones"
]
},
"price": {
"type": "number",
"description": "Item price in the transaction currency.",
"minimum": 0,
"examples": [
79.99
]
},
"quantity": {
"type": "integer",
"description": "Number of units.",
"minimum": 1,
"default": 1,
"examples": [
2
]
}
},
"if": {
"properties": {
"item_type": {
"const": "physical"
}
},
"required": [
"item_type"
]
},
"then": {
"description": "Physical items have weight, dimensions, and a shipping class choice (oneOf inside then).",
"properties": {
"weight_kg": {
"type": "number",
"description": "Item weight in kilograms.",
"minimum": 0.01,
"examples": [
0.35
]
},
"dimensions": {
"type": "object",
"description": "Package dimensions in centimeters.",
"properties": {
"length": {
"type": "number",
"description": "Length in cm.",
"examples": [
20
]
},
"width": {
"type": "number",
"description": "Width in cm.",
"examples": [
15
]
},
"height": {
"type": "number",
"description": "Height in cm.",
"examples": [
8
]
}
}
},
"shipping_class": {
"description": "Shipping classification — oneOf inside a then branch.",
"oneOf": [
{
"title": "Standard Parcel",
"type": "object",
"description": "Regular parcel shipping.",
"properties": {
"class": {
"type": "string",
"const": "standard_parcel",
"description": "The shipping class identifier."
},
"estimated_days": {
"type": "integer",
"description": "Estimated delivery days.",
"minimum": 1,
"examples": [
5
]
}
},
"required": [
"class"
]
},
{
"title": "Freight",
"type": "object",
"description": "Heavy/oversized freight shipping.",
"properties": {
"class": {
"type": "string",
"const": "freight",
"description": "The shipping class identifier."
},
"requires_signature": {
"type": "boolean",
"description": "Whether delivery requires a signature.",
"examples": [
true
]
},
"pallet_count": {
"type": "integer",
"description": "Number of pallets.",
"minimum": 1,
"examples": [
1
]
}
},
"required": [
"class",
"requires_signature"
]
}
]
}
}
},
"else": {
"description": "Digital items have a download URL and license type.",
"properties": {
"download_url": {
"type": "string",
"format": "uri",
"description": "URL to download the digital item.",
"examples": [
"https://example.com/download/abc"
]
},
"license_type": {
"type": "string",
"description": "License model for the digital item.",
"enum": [
"single-use",
"perpetual",
"subscription"
],
"examples": [
"perpetual"
]
}
}
}
}
},
"payment": {
"type": "object",
"description": "Payment details — anyOf with if/then/else inside one of the anyOf branches.",
"required": [
"currency"
],
"properties": {
"currency": {
"type": "string",
"description": "ISO 4217 currency code.",
"pattern": "^[A-Z]{3}$",
"examples": [
"USD"
]
}
},
"anyOf": [
{
"title": "Credit Card",
"description": "Payment by credit card — includes if/then/else based on card brand (if/then/else inside anyOf).",
"properties": {
"method": {
"type": "string",
"const": "credit_card",
"description": "The payment method identifier."
},
"card_brand": {
"type": "string",
"description": "Card network.",
"enum": [
"visa",
"mastercard",
"amex"
],
"examples": [
"visa"
]
},
"last_four": {
"type": "string",
"description": "Last four digits of the card.",
"pattern": "^[0-9]{4}$",
"examples": [
"4242"
]
}
},
"required": [
"method",
"card_brand",
"last_four"
],
"if": {
"properties": {
"card_brand": {
"const": "amex"
}
},
"required": [
"card_brand"
]
},
"then": {
"description": "Amex cards require a CID (4-digit security code).",
"properties": {
"cid": {
"type": "string",
"description": "4-digit Card Identification Number for Amex.",
"pattern": "^[0-9]{4}$",
"examples": [
"1234"
]
}
},
"required": [
"cid"
]
},
"else": {
"description": "Non-Amex cards use a 3-digit CVV.",
"properties": {
"cvv": {
"type": "string",
"description": "3-digit Card Verification Value.",
"pattern": "^[0-9]{3}$",
"examples": [
"123"
]
}
}
}
},
{
"title": "Digital Wallet",
"description": "Payment by digital wallet.",
"properties": {
"method": {
"type": "string",
"const": "digital_wallet",
"description": "The payment method identifier."
},
"wallet_provider": {
"description": "The wallet provider, either a known name or a custom string.",
"oneOf": [
{
"title": "Known Provider",
"type": "string",
"enum": [
"apple_pay",
"google_pay",
"paypal"
],
"examples": [
"apple_pay"
]
},
{
"title": "Custom Provider",
"type": "string",
"pattern": "^custom_",
"description": "A custom wallet provider prefixed with 'custom_'.",
"examples": [
"custom_klarna"
]
}
]
},
"wallet_email": {
"type": "string",
"format": "email",
"description": "Email linked to the wallet account.",
"examples": [
"user@example.com"
]
}
},
"required": [
"method",
"wallet_provider"
]
},
{
"title": "Bank Transfer",
"description": "Payment by bank transfer.",
"properties": {
"method": {
"type": "string",
"const": "bank_transfer",
"description": "The payment method identifier."
},
"bank_name": {
"type": "string",
"description": "Name of the bank.",
"examples": [
"First National Bank"
]
},
"reference_id": {
"type": "string",
"description": "Transfer reference number.",
"examples": [
"TXN-2026-001"
]
}
},
"required": [
"method",
"bank_name",
"reference_id"
]
}
]
},
"fulfillment": {
"type": "object",
"description": "Fulfillment details — anyOf with different fulfillment types, some containing nested if/then/else.",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"description": "Fulfillment type.",
"enum": [
"delivery",
"pickup",
"digital"
],
"examples": [
"delivery"
]
}
},
"anyOf": [
{
"title": "Home Delivery",
"description": "Home delivery with if/then/else based on whether it's international.",
"properties": {
"fulfillment_method": {
"type": "string",
"const": "home_delivery",
"description": "The fulfillment method identifier."
},
"address": {
"type": "object",
"description": "Delivery address.",
"required": [
"country",
"city"
],
"properties": {
"country": {
"type": "string",
"description": "ISO 3166-1 alpha-2 country code.",
"examples": [
"US"
]
},
"city": {
"type": "string",
"description": "City name.",
"examples": [
"New York"
]
},
"street": {
"type": "string",
"description": "Street address.",
"examples": [
"123 Main St"
]
}
},
"if": {
"properties": {
"country": {
"not": {
"const": "US"
}
}
},
"required": [
"country"
]
},
"then": {
"description": "International addresses require a customs declaration.",
"properties": {
"customs_declaration": {
"type": "object",
"description": "Customs information for international shipments.",
"properties": {
"declared_value": {
"type": "number",
"description": "Declared value for customs.",
"examples": [
150
]
},
"contents_description": {
"type": "string",
"description": "Description of package contents.",
"examples": [
"Electronics"
]
},
"hs_code": {
"type": "string",
"description": "Harmonized System tariff code.",
"examples": [
"8518.30"
]
}
},
"required": [
"declared_value",
"contents_description"
]
}
},
"required": [
"customs_declaration"
]
},
"else": {
"description": "Domestic US addresses may include a ZIP+4.",
"properties": {
"zip_plus_four": {
"type": "string",
"description": "Extended ZIP code.",
"pattern": "^[0-9]{5}-[0-9]{4}$",
"examples": [
"10001-1234"
]
}
}
}
}
},
"required": [
"fulfillment_method",
"address"
]
},
{
"title": "Store Pickup",
"description": "In-store pickup.",
"properties": {
"fulfillment_method": {
"type": "string",
"const": "store_pickup",
"description": "The fulfillment method identifier."
},
"store_id": {
"type": "string",
"description": "ID of the pickup store.",
"examples": [
"STORE-42"
]
},
"pickup_time": {
"description": "When to pick up — anyOf inside an anyOf branch.",
"anyOf": [
{
"title": "Scheduled Time",
"type": "object",
"description": "A specific scheduled pickup time.",
"properties": {
"slot_type": {
"type": "string",
"const": "scheduled",
"description": "The pickup slot type identifier."
},
"datetime": {
"type": "string",
"format": "date-time",
"description": "Scheduled pickup date and time.",
"examples": [
"2026-03-15T14:00:00Z"
]
}
},
"required": [
"slot_type",
"datetime"
]
},
{
"title": "ASAP Pickup",
"type": "object",
"description": "Pick up as soon as possible.",
"properties": {
"slot_type": {
"type": "string",
"const": "asap",
"description": "The pickup slot type identifier."
},
"estimated_ready_minutes": {
"type": "integer",
"description": "Estimated minutes until ready.",
"minimum": 5,
"examples": [
30
]
}
},
"required": [
"slot_type"
]
}
]
}
},
"required": [
"fulfillment_method",
"store_id"
]
},
{
"title": "Digital Fulfillment",
"description": "Purely digital delivery.",
"properties": {
"fulfillment_method": {
"type": "string",
"const": "digital",
"description": "The fulfillment method identifier."
},
"delivery_email": {
"type": "string",
"format": "email",
"description": "Email to send digital items to.",
"examples": [
"buyer@example.com"
]
}
},
"required": [
"fulfillment_method",
"delivery_email"
]
}
]
},
"discount": {
"description": "Applied discount — either a percentage or a fixed amount.",
"oneOf": [
{
"title": "Percentage Discount",
"type": "object",
"description": "A percentage-based discount.",
"properties": {
"type": {
"type": "string",
"const": "percentage",
"description": "The discount type identifier."
},
"value": {
"type": "number",
"description": "Discount percentage (0-100).",
"minimum": 0,
"maximum": 100,
"examples": [
15
]
}
},
"required": [
"type",
"value"
]
},
{
"title": "Fixed Discount",
"type": "object",
"description": "A fixed-amount discount.",
"properties": {
"type": {
"type": "string",
"const": "fixed",
"description": "The discount type identifier."
},
"amount": {
"type": "number",
"description": "Discount amount in the transaction currency.",
"minimum": 0,
"examples": [
10
]
}
},
"required": [
"type",
"amount"
]
}
]
},
"metadata": {
"type": "object",
"description": "Event metadata with oneOf at property level, containing if/then/else inside one of the oneOf branches.",
"properties": {
"timestamp": {
"type": "string",
"format": "date-time",
"description": "When the event occurred.",
"examples": [
"2026-02-24T12:00:00Z"
]
},
"source": {
"description": "Where the event originated — oneOf with if/then/else inside a branch.",
"oneOf": [
{
"title": "Web Source",
"type": "object",
"description": "Event from a web browser, with if/then/else based on device type.",
"required": [
"platform",
"device_type"
],
"properties": {
"platform": {
"type": "string",
"const": "web",
"description": "The source platform identifier."
},
"device_type": {
"type": "string",
"description": "The type of device.",
"enum": [
"desktop",
"mobile",
"tablet"
],
"examples": [
"desktop"
]
},
"browser": {
"type": "string",
"description": "Browser name.",
"examples": [
"Chrome"
]
}
},
"if": {
"properties": {
"device_type": {
"const": "mobile"
}
},
"required": [
"device_type"
]
},
"then": {
"description": "Mobile web sessions include screen size and touch capability.",
"properties": {
"screen_width": {
"type": "integer",
"description": "Screen width in pixels.",
"examples": [
390
]
},
"touch_capable": {
"type": "boolean",
"description": "Whether the device supports touch.",
"examples": [
true
]
}
}
},
"else": {
"description": "Non-mobile web sessions include viewport dimensions.",
"properties": {
"viewport_width": {
"type": "integer",
"description": "Browser viewport width in pixels.",
"examples": [
1920
]
},
"viewport_height": {
"type": "integer",
"description": "Browser viewport height in pixels.",
"examples": [
1080
]
}
}
}
},
{
"title": "App Source",
"type": "object",
"description": "Event from a native app.",
"required": [
"platform",
"app_version"
],
"properties": {
"platform": {
"type": "string",
"const": "app",
"description": "The source platform identifier."
},
"app_version": {
"type": "string",
"description": "Semantic version of the app.",
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$",
"examples": [
"3.2.1"
]
},
"os": {
"type": "string",
"description": "Operating system.",
"enum": [
"ios",
"android"
],
"examples": [
"ios"
]
}
}
}
]
}
}
}
},
"if": {
"properties": {
"payment": {
"properties": {
"currency": {
"const": "USD",
"description": "ISO 4217 currency code."
}
}
}
}
},
"then": {
"description": "USD transactions require tax information. Demonstrates: if/then/else directly inside a then branch (if inside if).",
"properties": {
"tax": {
"type": "object",
"description": "US tax details.",
"properties": {
"rate": {
"type": "number",
"description": "Tax rate as a decimal (e.g. 0.0825 for 8.25%).",
"minimum": 0,
"maximum": 1,
"examples": [
0.0825
]
},
"amount": {
"type": "number",
"description": "Calculated tax amount.",
"minimum": 0,
"examples": [
6.6
]
},
"jurisdiction": {
"type": "string",
"description": "Tax jurisdiction (state).",
"examples": [
"CA"
]
}
},
"required": [
"rate",
"amount"
]
}
},
"if": {
"description": "Check if tax jurisdiction is California.",
"properties": {
"tax": {
"properties": {
"jurisdiction": {
"const": "CA",
"description": "Tax jurisdiction (state)."
}
}
}
}
},
"then": {
"description": "California transactions require additional recycling fee info (if/then/else directly inside a then branch).",
"properties": {
"recycling_fee": {
"type": "object",
"description": "California recycling fee details.",
"properties": {
"applies": {
"type": "boolean",
"description": "Whether a recycling fee applies.",
"examples": [
true
]
},
"amount": {
"type": "number",
"description": "Recycling fee amount.",
"minimum": 0,
"examples": [
1.5
]
}
},
"required": [
"applies"
]
}
}
},
"else": {
"description": "Non-California USD transactions may include a state-specific exemption code.",
"properties": {
"state_exemption_code": {
"type": "string",
"description": "State-specific tax exemption code.",
"examples": [
"TX-EXEMPT-001"
]
}
}
}
},
"else": {
"description": "Non-USD transactions may include a VAT number.",
"properties": {
"vat_number": {
"type": "string",
"description": "EU VAT identification number.",
"pattern": "^[A-Z]{2}[0-9A-Z]+$",
"examples": [
"DE123456789"
]
}
}
}
}