---
schema_version: "1"
id: b4ea565aa6ab56d8c8a9eacbb0e38bd309137301b1e180a22236a72d27e586ea
title: JSON-LD Examples by Scope
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_json_ld_examples.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_json_ld_examples.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: dc88535c9eae52022fc033b69ab368a05bd5bcd6a1b030e65c2f37da3ef55d86
description: Use these B2C Commerce JSON-LD templates as starting points for each page meta tag scope.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# JSON-LD Examples by Scope

Use these B2C Commerce JSON-LD templates as starting points for each page meta tag scope.

You can create a JSON-LD rule in any scope that page meta tags support. Each scope exposes different data to your `${...}` tokens. Enter tokens without surrounding quotation marks; B2C Commerce quotes each resolved value as a JSON string. For the complete list of objects and operators available in each scope, see [Meta Tag Syntax](https://help.salesforce.com/s/articleView?id=cc.b2c_meta_tag_rule_syntax.htm&release=264.0.0&type=5 "The rule syntax supports the following different operations that are optimized for page meta tag content generation. Also, script operators are not valid for each scope.").

  
| Scope | Pages | Available data |
| --- | --- | --- |
| Product Detail Page | Product detail pages (PDP) | Product, ProductPrice, ProductImageURL, Category, Site |
| Product Listing Page | Category and product listing pages (PLP) | Category, search refinements, Site |
| Content Detail Page | Content detail pages (CDP) | Content, Folder, Site |
| Content Listing Page | Content folder and listing pages (CLP) | Folder, Site |
| Home Page | Site home page | Site |

These examples use common Schema.org types with a few product, category, content, and site attributes. Adjust the attributes to match your catalog and content, and validate the output.

## Product Detail Page

Emit a `Product` for the product on the page.

```
{
    "@context": "https://schema.org",
    "@type": "Product",
    "name": ${Product.name},
    "brand": ${Product.brand},
    "offers": {
        "@type": "Offer",
        "price": ${ProductPrice.min},
        "priceCurrency": ${ProductPrice.currency}
    }
}
```

## Product Listing Page

Emit a `CollectionPage` for the category. A rule resolves against a single object, so you can't list each product on the page—describe the category instead.

```
{
    "@context": "https://schema.org",
    "@type": "CollectionPage",
    "name": ${Category.displayName},
    "url": ${OriginalRequestURL}
}
```

## Content Detail Page

Emit an `Article`, or another appropriate type, for the content asset on the page.

```
{
    "@context": "https://schema.org",
    "@type": "Article",
    "headline": ${Content.name},
    "url": ${OriginalRequestURL}
}
```

## Content Listing Page

Emit a `CollectionPage` for the content folder.

```
{
    "@context": "https://schema.org",
    "@type": "CollectionPage",
    "name": ${Folder.displayName},
    "url": ${OriginalRequestURL}
}
```

## Home Page

Emit a `WebSite` for your storefront.

```
{
    "@context": "https://schema.org",
    "@type": "WebSite",
    "name": ${Site.displayName},
    "url": ${OriginalRequestURL}
}
```

## Fallbacks with Operators

B2C Commerce omits the entire block if the resolved content isn't valid JSON. Use the `ELSE` operator to fall back to a value that's always present when a token can resolve empty. A product's localized name can be empty in some locales, but its ID is always set, so `Product.ID` is a safe fallback for the name:

```
{
    "@context": "https://schema.org",
    "@type": "Product",
    "name": ${Product.name ELSE Product.ID},
    "offers": {
        "@type": "Offer",
        "price": ${ProductPrice.min},
        "priceCurrency": ${ProductPrice.currency}
    }
}
```

Choose a fallback that's accurate data. Don't substitute a placeholder, such as a constant brand name, unless you are sure it's correct in all cases. Operators substitute a value, but they don't remove a whole `"key": value` line and its trailing comma, so for a field that's genuinely optional, leave it out of the template rather than fabricating a value.