How are option ID's generated? #329
-
We need to know how option ID's are generated as we create an option in our CMS and then send that option to Swell so it can create the variants and then we receive the variants back from Swell and put them into our CMS. If we send just the option name to Swell we get some issues so we are thinking it's due to us not having an ID and just sending the name. We tried UUID library to generate id's and although it fixed some issue it created others, thanks.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
@JoeMatkin we use Mongo Object IDs (data type is You can use this npm library to generate them: https://www.npmjs.com/package/bson-objectid. Note creating any record or object will always accept a custom object ID if supplied in the request |
Beta Was this translation helpful? Give feedback.
@JoeMatkin we use Mongo Object IDs (data type is
objectid
in models)You can use this npm library to generate them: https://www.npmjs.com/package/bson-objectid. Note creating any record or object will always accept a custom object ID if supplied in the request