Omnichannel Metafields

aaronaaron Posts: 44Member
Since you can't write to Omnichannel variants I can't set Metafields for additional information. 
The docs talk about doing it through the Retail api instead. But I can't figure out where I need to write to on the Retail API to create Metafields for the eCom variants.

8 comments

  • Adrian SamuelAdrian Samuel Posts: 413Moderator, Lightspeed Staff moderator
    Hey @aaron, although you can't write to these metafields you can import them into the backoffice of eCom. More information about this can be found out here:

    The complete list of options you have to import into eCom can be found here:
    https://ecom-support.lightspeedhq.com/hc/en-us/articles/220320648-List-of-all-options-on-the-product-CSV
  • aaronaaron Posts: 44Member
    Hi @Adrian Samuel, so there is no way to fill the metafields from the Retail API? That is really annoying.
  • Adrian SamuelAdrian Samuel Posts: 413Moderator, Lightspeed Staff moderator
    @aaron Just so we're on the same page, could you specify what specific fields you need filled in?
  • aaronaaron Posts: 44Member
    Hi @Adrian Samuel,

    Lightspeed eCom has VariantMetafields. We had planned to use those to store additional information like expected delivery data and such so that the site builders can pull data from those. But we cannot find a way to access those through the Retail API since it is an Omnichannel shop.
  • aaronaaron Posts: 44Member
    Hi @Adrian Samuel,

    Lightspeed eCom has VariantMetafields. We had planned to use those to store additional information like expected delivery data and such so that the site builders can pull data from those. But we cannot find a way to access those through the Retail API since it is an Omnichannel shop.
    Hi @Adrian Samuel,

    Isn't there any way to store additional information in eCom variants when using Omnichannel through the Retail API?
  • Adrian SamuelAdrian Samuel Posts: 413Moderator, Lightspeed Staff moderator
    @aaron apologies about not getting back to you before, but in Omni-Channel accounts, your ability to write to eCom is limited due to the implementation as detailed in this list:

    https://developers.lightspeedhq.com/ecom/introduction/omnichannel/

    Could you detail what kind of data you would find useful to put into your eCom shop.
  • aaronaaron Posts: 44Member
    @Adrian Samuel,

    I would like to store information regarding delivery times (on variants), 2 static fields/values and one dynamic value.
    - If in stock: "delivery within 1 day if ordered before 16:00"
    - In stock with our supplier: "delivery between 1 and 3 days" (dynamic time frame, which we would update on change)
    - Out of stock: "contact customer support"

    We would store this data so that the builders of the website can grab it and display it on the website.
  • Adrian SamuelAdrian Samuel Posts: 413Moderator, Lightspeed Staff moderator
    @aaron what I would suggest is that you manually add delivery timeframes from the backoffice of eCom here:

     https://ecom-support.lightspeedhq.com/hc/en-us/articles/220661027-Add-delivery-times-NB-

    Then navigate to Products > then do bulk edit and then select the delivery timeframe information for the relevant items:






    Now to have dynamic content I would suggest you do one of two things:

    1) Insert some javascript to handle that logic by navigating to Settings > Website Settings > Web Extras and then enter your code in the custom JS section

    Note- this JS script will appear at the bottom of HTML body

    or 

    2) ShopScript, which essentially enables you to load a script over HTTPs via an API endpoint. You can choose whether this script will be embedded in the head or the body. More information about this can be found here:

    https://developers.lightspeedhq.com/ecom/endpoints/shopscript/
Sign In or Register to comment.