Flexify Flexify

Support Shipping information in metafields (Premium feature)

Do you need to provide shipping information for some products in the feed? Add this information in the feed using our option to attribute mapping rules.

If you need to include detailed shipping information for your products in the feed, Flexify offers a robust solution by allowing you to use attribute mapping rules to input this data. Because shipping information must be structured precisely, a simple text string won't suffice. Instead, you'll use a JSON object that Flexify will convert into the required XML format for the feed.

Structured Data Requirements

Shipping information needs to be provided in an XML structure, which is outlined below and detailed in Google's support documentation:

<g:shipping>
 <g:country>US</g:country>
 <g:region>MA</g:region>
 <g:service>Express</g:service>
 <g:price>15.99 USD</g:price>
 <g:min_handling_time>1</g:min_handling_time>
 <g:max_handling_time>3</g:max_handling_time>
 <g:min_transit_time>2</g:min_transit_time>
 <g:max_transit_time>5</g:max_transit_time>
</g:shipping>

Step-by-Step Guide to Setting Up Shipping Information with Flexify

  1. Create a Product or Variant Metafield in Shopify:
    • Go to your Shopify admin panel and navigate to the 'Settings' and then 'Custom data'.
    • Under 'Products metafields' (or 'Variants metafields' if applicable), click on 'Add definition'.
    • Name the definition (e.g., "my_fields.shipping") and set the content type to JSON.
    • Populate the metafield with a JSON structure as detailed below:

      Only with the required attributes:

      [
      {
      "country": "US",
      "region": "CA",
      "service": "Ground",
      "price": "9.99 USD"
      },
      {
      "country": "US",
      "region": "NY",
      "service": "Air",
      "price": "15.99 USD"
      }
      ]

      For multiple shipping options:
      {
      "country": "US",
      "region": "MA",
      "service": "Express",
      "price": "15.99 USD",
      "min_handling_time": 1,
      "max_handling_time": 3,
      "min_transit_time": 2,
      "max_transit_time": 5
      }

      Example with all supported attributes:

      {
      "country": "US",
      "region": "MA",
      "service": "Express",
      "price": "15.99 USD",
      "min_handling_time": 1,
      "max_handling_time": 3,
      "min_transit_time": 2,
      "max_transit_time": 5
      }

    • Save your metafield definition: product.metafields.my_fields.shipping.

      Product Metafield JSON
  2. Enter Shipping Data on the Shopify Product Pages:
    • On each product page, you will find a section for metafields.
    • Input your shipping data in the JSON format that mirrors the XML structure needed. Make sure the JSON is correctly formatted to avoid parsing errors.


  3. Configure Flexify to Map the Metafields:
  4. Verify and Test:
    • Review the shipping information on the Flexify product preview page to ensure that it appears correctly.
    • Make adjustments if necessary and re-test to confirm everything is configured properly.


Once you have successfully implemented the JSON schema and entered your shipping data according to this format, the structured information will be reflected in your Flexify feed. You can see the results directly in your Flexify feed, as shown in the screenshot provided below.

Flexify Feed XML

By following these steps, you can effectively include structured shipping information in your product feeds, enhancing the accuracy and detail of your shipping data as displayed on your Meta platform. This not only improves the clarity for your customers but also aligns with requirements for platforms that use detailed shipping attributes to better serve potential buyers.