Structured data for product SEO
On this page
Product availability information is determined by the availability date, price visibility, inventory status, and discontinuation status. The price displayed is either the sale price or the list price, ensuring accurate product information is always presented to customers and search engines.
What page data looks like
The page data looks something like this:
```html
```
To generate the data, StoreConnect gets information from the following fields:
| Structured Data Field | Source |
|---|---|
| sku | Product2.ProductCode |
| gtin | Product2.s_c__UPC__c |
| images | Array of product image URLs |
| name | Product2.s_c__Display_Name__c |
| description | Product2.s_c__Search_Description_Markdown__c, then the Summary, then brand, name and meta description |
| brand[name] | Product2.Brand_Id__c.Name |
| offers[@type=Offer][itemCondition] | Product2.s_c__Condition__c |
| offers[@type=Offer][availability] | See below on Availability Calculation |
| offers[@type=Offer][price] | The Product Sale Price if present otherwise the List Price |
| offers[priceCurrency] | s_c__Store__c.currencyisocode for multi-currency orgs or s_c__Store__c.s_c__Currency__c |
| offers[url] | URL that the product is available on the website |
Availability calculation
The availability can be set to either In Stock or Out of Stock.
A product is shown as in stock if all of the following are true:
- It has an
s_c__Available_On__cin the past - It has a price and that price is not hidden
- It has available inventory or has
s_c__Track_Inventory__cunchecked - It has no
s_c__Discontinued_On__cvalue or it exists and is in the future - It has any variant with all of the above
Price calculation
The price shown is set to the price or the sale price if present.
Optional rich data
Beyond the core product data above, StoreConnect can add warranty, shipping, rating, return policy, and physical attribute data to the same JSON-LD block. Each of these is optional and renders only when the product (or, for return policy, the store) actually carries the data, so a product with none of it configured produces exactly the output shown above.
Optional rich data requires StoreConnect v22.0.6 or later. On v22.0.0 to v22.0.5, the fields exist in Salesforce but nothing from them appears in the structured data.
The data comes from fields on the Product (Product2) and Store objects that sync to the website like every other StoreConnect field, so there is nothing to configure: fill in the field and the structured data follows on the next sync.
| Structured data | Source field |
|---|---|
warranty.description |
Product Warranty (Markdown) |
warranty.durationOfWarranty |
s_c__Warranty_Duration__c, s_c__Warranty_Unit__c |
aggregateRating |
s_c__Rating_Value__c, s_c__Review_Count__c, s_c__Best_Rating__c |
offers.shippingDetails weight and dimensions |
Shipping Weight, Shipping Height, Width, Length and their units (published once Shipping Charges or Shipping Cost is set) |
offers.shippingDetails.shippingRate |
s_c__Shipping_Charges__c, s_c__Shipping_Cost__c |
offers.hasMerchantReturnPolicy |
s_c__Return_Window_Days__c, s_c__Return_Policy_Category__c, s_c__Return_Policy_Country__c, s_c__Restocking_Fee__c |
color, material, pattern, size |
s_c__Color__c, s_c__Material__c, s_c__Pattern__c, s_c__Size__c |
How each type of data is output:
- Warranty uses the existing warranty text (Product Warranty (Markdown)) as the description. Warranty data is only added when the product has warranty text; a Warranty Duration on its own outputs nothing. A duration is only asserted when you enter a Warranty Duration, so free-text warranties such as “lifetime guarantee” are never given a made-up term. When a duration is entered without a unit, months are assumed.
- Ratings render only when the review count is greater than zero and the rating value is between 1 and the best rating. Best Rating defaults to 5, and a Best Rating below 1 is treated as 5.
- Color, material, pattern and size are output as the product’s own schema.org properties. On a product with variants, each variant reports its own values, which is what the variant axes in the structured data point at.
- Shipping units are converted from the Shipping Weight Unit and Shipping Dimensions Unit picklists to the UN/CEFACT codes search engines expect (for example
kilogrambecomesKGM). A product with a unit the site does not recognize still outputs the value, without a unit code. Shipping details are published only once you set Shipping Charges or a Shipping Cost on the product; a weight alone publishes nothing. Setting Shipping Charges to Free outputs a shipping rate of zero; Billed, or leaving it blank, outputs the Shipping Cost when one is set. Both affect structured data only: what a customer pays at checkout still comes from your Shipping Rates. A variant without its own Shipping Charges or Shipping Cost uses its master’s; a variant with its own Shipping Cost publishes it even when the master ships free. - Return policy falls back to the store. The three Default Return Policy fields on the Store (
s_c__Return_Window_Days__c,s_c__Return_Policy_Category__c,s_c__Return_Policy_Country__c) apply to every product that does not set its own, so you can describe your policy once. The country code must be a two-letter ISO code such asAU,GBorUS. Search engines require the country, so no return policy is output until a country is set on the product or the store; set the store default once to cover every product. A return window alone means a finite return window of that many days; choose Returns Not Permitted or Unlimited Return Window as the category when no window applies. Return Policy Unspecified outputs no policy, and so does any category value that is not one of the three above. Variants without their own return policy, shipping or rating fields take their master product’s; a warranty duration is never inherited, because the variant’s warranty text can differ from the master’s.
Where to find the fields in Salesforce
On the StoreConnect Product record page, the new fields sit with the sections they belong to: shipping fields under Shipping Information, warranty fields under Page Content beside the warranty text, rating fields under SEO, and two new sections, Product Attributes and Return Policy, on the SEO tab. The Store record page gains a Return Policy section under SEO & Site Data.
:::note If your org has customized the StoreConnect page layouts or Lightning record pages for Product or Store, the upgrade does not change your copies. Add the fields to your own layouts and record pages to see them. :::
Color, material, size, and pattern from traits
The four physical attribute fields on the Product (Color, Material, Size, Pattern) can be typed in by hand, but they are also kept in step with product traits automatically. When a product carries a trait whose Trait Type is named Color (US or British spelling), Material, Size, or Pattern, the trait’s value is written to the matching Product field whenever the trait is added, changed, or removed.
- A trait always wins over a hand-typed value for the field it covers. Removing the trait clears the field again.
- Fields with no matching trait are left alone, so a hand-typed Material survives a change to a Color trait.
- A variant inherits each attribute from its master product when it has no trait of its own for that attribute. A variant’s own trait always takes precedence.
- When two traits of the same type are assigned to one product, the most recently modified one wins.
- Trait Type names are matched by name only; a Trait Type called “Fabric” or “Hue” does not populate these fields.
When you upgrade to the package version that introduces these fields, existing products that already carry Color, Material, Size, or Pattern traits are backfilled in the background shortly after the upgrade completes.
Breadcrumb structured data
In addition to product data, StoreConnect automatically outputs schema.org/BreadcrumbList JSON-LD on product pages, category pages, and search pages. This helps search engines understand your site’s navigation hierarchy and can generate breadcrumb trails in search results.
Breadcrumb structured data is not output on article or blog pages, static pages, or article category pages.
What is not included
The following schema types are not generated automatically:
- Individual reviews (
Review) — only the aggregate rating described above is output, and only when the rating fields are populated; review text displayed on the page is not included - Organization and WebSite schema — not currently implemented
Validate your structured data
Structured data follows the schema.org Product vocabulary. To confirm your pages output valid, eligible markup:
- Use Google’s Rich Results Test to check whether a page is eligible for rich results in Google Search.
- Use the Schema.org Validator to check the JSON-LD against the schema.org specification generally, independent of any one search engine.
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.