What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Unique ID

Unique ID

user04293u42o34
Visitor
1 0 0

I run a poster company. It's getting to the point where I am going to be moving a lot of the files to cloud storage. I'm wondering if there is a way in shopify where I can add a unique id tag lets just say I have a poster called "Abstract Farm Poster" and when an order comes up can it have a unique id like "1234" and then I can look up the id code in my cloud storage to print the file? I'm just trying to think of ways I can effectively manage this for when my workers print the orders. 

Replies 4 (4)

sahilsharma9515
Shopify Partner
1264 163 243

Hi @user04293u42o34 There are few ways through which you can achieve this.

 

  1. You can add the Unique ID in the product name itself, so that once the customer will place the order you will able to see the unique id of that product.
  2. You can add the Unique ID in the product SKU, so that once the customer will place the order you will able to see the unique id of that order through the SKU.
  3. The 2 above points doesn't need any code changes, now this option will need to add the custom code, i.e. We can add the metafields in all the products and that metafields data will show in the notes in the order section, To achieve this you need to add the custom code.

If you will unable to implement the same then I'm happy to do this for you, let me know. I can implement the code changes so that this will work well for you.

 

Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!

 

Best Regards

Sahil

- Your

 Coffee Tip 

can create magic in coding ❤️❤️

- Need a Shopify Developer? CHAT ON WHATSAPP or EMAIL ME !


- Hopefully the solution will help you. If yes then Please hit

 Like 

and

 Mark it as solution! ❤️


muhammadsalmank
Shopify Partner
26 1 4

Hi,

Why not just follow the real Shopify standard?

in shopify every product or product varient has a unique id.

it is called "variant_id": 44736251920649.

whenever you have any new order always take the variant id from order line.

and then you can map is with your cloud.

otherwise you can also use metafields ,Sku, or name.(but this is not recommended because any front end user can change it but product variant id no one can change)

i will highly recommend you to use variant id from every order line.

please inform me if you need help for finding the variant id from order lines through Rest or Graph API.

Thanks

 

 

 

 

 

MichielfromNL
Shopify Partner
12 0 7

Hi,
Tx for this answer!
It however raises the following question: are variants also unique across shops (shop instances) ? Same for inventoryitem id's and location id's ? This is relevant for us because we connect to / manage different shops & manage inventory for > 1. As fas as I can see they have a global scope but I can;t find any confirmation.
Tx!
 

-----
muhammadsalmank
Shopify Partner
26 1 4

Hi,

yes variants id is 100% unique.

you can use it .