• Admin help
    • Overview
    • Hero dashboard
      • Overview
      • Components library
      • Commerce dashboard
        • Overview
        • Product catalog
        • Commerce settings
      • Help & support
      • Audit log

23 Jul, 2024
Last edited: 21 Jan, 2025, 6:59 PM
Commerce settings

The MainCross market schema in JSON is a powerful tool for defining marketplace configurations, taxonomy, and dynamic smart filtering to enhance online shopping experiences and boost conversion rates. Unleash your marketplaces potential today!

Market schema#

The MainCross market schema in JSON is used to define:

  1. config (optional)
  2. workflow (optional)
  3. taxonomy (optional)
  4. one or more marketplaces, with search & smart filtering (mandatory)
{
  "config": {},
  "workflow": {},
  "taxonomy": {},
  "markets": []
}

Config#

The config key defines some basic commerce parameters. It is optional, and all keys under it are optional.

"config": {
  "channelProductPurchase": {
    "allowed": true
  }
}

Currently the following config is supported:

Products can be defined at a network level in the Marketplace, and at a channel level in Channel Shopfronts. By default, Products defined at a channel level are not purchasable.

If the Network Operator wants to allow channel-linked products to be purchased, then the allowed key should be set as true.

Workflow#

The workflow key defines the workflow attached to product purchase. It is optional, and all keys under it are optional.

"workflow": {
  "enquiry": {
    "url": ""
  }
}

Currently the following workflow is supported:

Any resource from this network can be connected to products to capture enquiries.

  • If any product cannot be purchased, then an "Enquire about product" button on each product page will automatically appear, linked to this default resource.
  • Conversely, if a product CAN be purchased, then the enquire button is NOT shown.

Any resource may be used as desired which serves the purpose of "product enquiry" - a Form Post, a Static Page with embedded form or contact block, the Contact destination, etc. (It might be absurd to link an Event Post to the Product Enquiry button)

  1. The full resource URL should be set as the value for the url key.
  2. The resource URL must be from the network, ie an external resource cannot be linked.
  3. The default resource can be overridden at a product level.

Product Classification and Smart Filtering#

Products can be organized and categorized in a structured and systematic manner, allowing for efficient retrieval and understanding of product information.

The following product classification methods are supported:

  1. Taxonomy
  2. Attributes
  3. Tags
Read the help article on Product Classification and Smart Filtering before setting up the schema:

MainCross Social+

Product Classification and Smart Filtering | MainCross Social+

Product classification methods enable Smart Filtering which enhances online shopping with dynamic facets that adapt to user searches. This innovative...

Taxonomy#

Taxonomy is very important for marketplaces offering diverse products and lots of products.

The taxonomy key defines two level of hierarchy - category and sub-category.

Each category can have multiple sub-categories.

The value key should be a unique code per category or sub-category, and should not be changed for the lifetime, as long as there is at least 1 product in that category.

The label is the human readable value of the category and will be displayed to the visitor in the filter dropdown. This may be tweaked occasionally, as required.

However it would be absurd to start with a mapping of C1 = Electronics and C2 = Clothing, and then switch the two at a later point in the schema. That would mean that articles of clothing that were previous tagged as C2 will start being displayed as Electronics.

  "taxonomy": {
    "categories": [
      {
        "value": "C1",
        "label": "Electronics",
        "sub_categories": [
          {
            "value": "C1.1",
            "label": "Mobiles"
          },
          {
            "value": "C1.2",
            "label": "Cameras"
          },
          {
            "value": "C1.3",
            "label": "Radios"
          },
          {
            "value": "C1.4",
            "label": "Laptops"
          }
        ]
      },
      {
        "value": "C2",
        "label": "Clothing",
        "sub_categories": [
          {
            "value": "C2.1",
            "label": "Tops"
          },
          {
            "value": "C2.2",
            "label": "Bottoms"
          }
        ]
      },
      {
        "value": "C3",
        "label": "Digital goods"
      }
    ]
  },

If a filter on Category is desired:

  1. Add the attribute value category to the facet_by field.
  2. Under fieldToLabel, map the category key to a desired human readable label for display in the filter.

If a filter on Sub-category is desired:

  1. Add the attribute value sub_category to the facet_by field.
  2. Under fieldToLabel, map the sub_category key to a desired human readable label for display in the filter.

Attributes#

If one is running a marketplace with similar products, then taxonomy may be overkill. Instead one may opt for a simpler product classification via product attributes.

Upto 5 attributes can be defined for the marketplace using the keys generic_field_1 to generic_field_5.

  1. Add the attribute value generic_field_<X> to the facet_by field.
  2. Under fieldToLabel, map the generic_field_<X> key to a desired human readable label for display in the filter.

Tags#

The simplest method of product classification is to use tags.

If a filter on Seller name is desired:

  1. Add the value seller.name to the facet_by field.
  2. Under fieldToLabel, map the seller.name key to a desired human readable label for display in the filter.

If a filter on Manufacturer name is desired:

  1. Add the value manufacturer.name to the facet_by field.
  2. Under fieldToLabel, map the manufacturer.name key to a desired human readable label for display in the filter.

If a filter on freeform hashtags are desired:

  1. Add the value tags to the facet_by field.
  2. Under fieldToLabel, map the tags key to a desired human readable label for display in the filter.

One or more Marketplaces#

The markets key is defined as an array of JSON objects. Each JSON object defines a Marketplace. A minimum of 1 JSON object in the array is required.

At this time, only 1 Marketplace can be defined.
  "markets": [
    {
      "search": {
        "helpText": "You can search for anything: a name of a product, manufacturer, seller, product attributes, etc",
        "facet_by": "category, sub_category, generic_field_1, generic_field_2, seller.name, manufacturer.name, tags"
      },
      "fieldToLabel": {
        "category": "Category",
        "sub_category": "Sub category",
        "generic_field_1": "Rating",
        "generic_field_2": "Warranty",
        "seller.name": "seller",
        "manufacturer.name": "manufacturer",
        "tags": "hashtags"
      }
    }
  ]

Within each market, both keys are mandatory.

  1. search key
  2. helpText key: Optional short help text to be displayed below the search bar.
  3. facet_by field: Used to enable Smart Filters, and can have the following fields (all optional): category, sub_category, seller.name, manufacturer.name, tags, generic_field_1, generic_field_2, generic_field_3 generic_field_4, generic_field_5
  4. Each field is mapped to a human readable label for display on the site.
  5. fieldToLabel key - this defines the mapping from the internal field name in the facet_by key to a human readable label, depending on the Operators requirement. Examples:
  6. One may map category to "collection"
  7. One may map generic_field_1 to "material" and generic_field_2 to "color"
  8. One may map generic_field_1 to "screen resolution", generic_field_2 to "memory" and generic_field_3 to "CPU"
  9. One may map manufacturer.name to "brand"
  10. A filter will appear only for the facet_by fields defined in fieldToLabel.

Adding the schema in the dashboard#

The full fledged JSON editor allows the schema to be created or edited, or even pasted (if created using another tool). Some errors are flagged and can even be auto-corrected by the editor.

It is essential to save fully valid configuration, else the market will crash 😜.
Article is helpful?
Save, embed, share, report