Mass update item barcodes?

darryl_ssdarryl_ss Member Posts: 65

Hi,

We need to add our existing barcodes to all the items in Lightspeed, can all the items be updated with custom barcodes?

Thanks,

Tags:

9 comments

  • gregaricangregarican Member Posts: 511 

    Not sure what you mean by barcodes. If the barcoded information is a item number/SKU, then that's just a Retail item field. You can update the various item fields via the API for sure.

    Saw your other question about updating stock availability and pricing via the API. This is also doable. Here's where this is documented --> https://developers.lightspeedhq.com/retail/endpoints/Item/#put-update-an-item.

  • darryl_ssdarryl_ss Member Posts: 65

    Thanks @gregarican, I read elsewhere that you could not update stock via the api without creating sale/purchase orders, but you're saying that you can directly put the stock and pricing values?

    Re the barcodes, the barcodes generated by Lightspeed do not match the barcodes from our old system, so I shall need to put them via the api.

    Thanks

  • darryl_ssdarryl_ss Member Posts: 65

    Hi,

    I'm still looking for an answer to this question. All of our stock is labelled up with existing barcodes from a previous system that we are yet to switch from.

    Which key on items holds this information please? And if it's the systemSku, is that a field that can be created/updated?

    Thanks.

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 351 moderator

    Hi @darryl_ss

    You cannot update the systemSKU, because these are automated number which can conflict when you're changing this. What you can do is to you the code in a different field you don't use, like customSKU. https://developers.lightspeedhq.com/retail/endpoints/Item/#put-update-an-item

  • darryl_ssdarryl_ss Member Posts: 65
    edited July 9

    Hi @LucienVersendaal, thank you for responding. customSku is for our sku's though and we would need to keep those.

    Please advise:

    When you scan a barcode into LS. Which fields are searched please? For instance would it be practical to use the EAN or UPC field for our barcodes. And, are there any negative impacts using this approach. I.e labels?

    Also, if I were to wipe the account and push all stock again, using the barcode as the systemSku, would the API accept that?

    Post edited by darryl_ss on
  • darryl_ssdarryl_ss Member Posts: 65

    @Lightspeed Ok, so it seems that you can't force a systemSku.

    Is there a way to setup the label so it uses a different field to produce the barcode?

    Thanks

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 351 moderator

    @darryl_ss

    Which field are you want to use for your "old" barcodes? Do you have an empty field?

  • darryl_ssdarryl_ss Member Posts: 65
    edited July 9

    Hi @LucienVersendaal,

    I think that I have a solution, I just need to get to the store and test, or may be you can confirm or reject?

    I have spoke with Lightspeed support today who have enabled the print templates on the account.

    I think this may work:

    <img class="ean8" src="/barcode.php?type=label&amp;number={{ Label.Item.ean }}&amp;ean8=1&amp;noframe=1">
    <img class="ean" src="/barcode.php?type=label&amp;number={{ Label.Item.ean }}&amp;noframe=1">
    
    Post edited by darryl_ss on
  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 351 moderator

    Hi @darryl_ss,

    You can use that but this is also very sensitive to errors because barcode generator specifically needs a 12-digit number so that it can generate the 13th of the EAN itself. 

    So you would think "okay, just enter 12 digits in the field". Then he prints it as a barcode, but when scanning is done, the system searches for 13 digits while only 12 are in it.

    Via javascript I also extracted the last digit of the code to generate the barcode, but that was less convenient. The trim () function in twig is unfortunately not in our twig version

Sign In or Register to comment.