Solved

Can the store metafield be used as a custom table?

seandz
Excursionist
52 3 10

I would like to create a custom table that stores a totally new type of information. As a result I am thinking of storing it on a sub-property of the store metafield. Something like this:

 

store.trades.firstName

store.trades.lastName

store.trades.tradeDate

store.trades.itemsQuantities

 

In SQL the last field, items would be a separate table. Here I'm thinking of simply stringifying an array.

 

Is this the best approximation of a custom table for this use case or is there a better way?

Accepted Solution (1)

Visely-Team
Shopify Partner
1843 210 488

This is an accepted solution.

If you are looking to keep data on the Shopify side, that's the best you can get.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog

View solution in original post

Replies 2 (2)

Visely-Team
Shopify Partner
1843 210 488

This is an accepted solution.

If you are looking to keep data on the Shopify side, that's the best you can get.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
seandz
Excursionist
52 3 10

Thank you. If I opt to use Cloud Firestore or other external database, is it safe to save auth credentials in a public app? Or can individual store owners see the code of public Shopify Apps they use?