How To Store Data for End Processing

How To Store Data for End Processing

merlin4191426
Visitor
2 0 0

Hi!,

Thank you in advance to anyone who takes the time to read this, I appreciate it.

I have an issue, and I am barely functional doing this stuff, so I will try my best to use the right wording. But if what I am saying does not make sense, I am probably using the wrong word. Hopefully it will make sense in context.

I am working on creating a custom order flow in Shopify for my website. I am trying to start a food delivery business, and I am doing so without funding, so I am using ChatGPT to try and beat my head against it until it works. And to be fair, while I am sure the code is a nightmare, we have mostly gotten there.

Until I started doing some deeper testing and found out the method it had for us to move information through the system has flaws. Mostly that it simply cannot handle any volume. We were using line items, but those have limits, and order customizations for multiple meals on a single order destroy those limits apparently.

So I have spent the last day and a half working with the idiot box trying to figure out a way to get this done. I thought we had it, metaobjects, until I found out you cant store info on them in the order flow. You have to use an API call to access them, which to my understanding when we need to do this potentially dozens of times across an order, might add in some ways for bad actors to get at stuff. Or at least that is my current understanding, I may have been lied to.

And while maybe it would not add security risks, maybe it would, and I don't like playing with things like that when I don't know enough about it. But it got me thinking, this cannot be a unique issue. I can't be the first person on Shopify who may need to store some info, maybe a good bit per order, in a way that can then be accessed once the order is placed. So ChatGPT and my own lack of understanding are almost certainly the issue, and not Shopify.

As such, I figured it was time to ask real brains, and stop relying on the idiot box. When I figure out the right answer I can tell it and we can move forward.

So, preface out of the way, what is the best way to store custom information like meal customizations or days the order is for, or the week the order is for, in a way where it can easily move through the Shopify system and then either be pullable using the normal order export feature, or be accessible to a python program using an API call. Ideally in a way where we wont face an issue where the system is full and we don't get all of the order info.

Again, thank you for the help!

Reply 1 (1)

PaulNewton
Shopify Partner
7032 629 1481

@merlin4191426  Hi 👋 take step back from the issue:

tl;dr What is the GOAL https://xyproblem.info/  and don't bury the ledes: give information first, background storytime later.

 

This isn't mainly a shopify-technical yet this is human problem statement making problem.

Collect your thoughts remove as much cruft from this as possible because there's like 6 questions buried in the description needing 15 different explanations or clarifications/tutelage of technical misunderstandings that may not even be needed because of the xyproblem :  https://meta.stackexchange.com/questions/18584/how-to-ask-a-smart-question , http://www.catb.org/~esr/faqs/smart-questions.html 

 

Cherry picking,

  • Orders should have a limit of ~500 individual line-items, if your breaking that for some reason that's often a failing of business logic or the information architecture trying to force some process that does not fit shopify's use cases. Meanwhile the creation of many orders is the "volume" shopify is actually built for not individual orders with infinite line items.
    • If it doesn't affect price or a sku or inventory does it really need to be a line item and not a line item property, cart attributes, order metafields, or order note.
  • Metaobjects are secure in the same was as every other shopify resource and should not be readable/accessible/insecure unless you've purposefully/mistakenly made them insecure.
  • If your getting truncated data review and adhere to the rate limits docs https://shopify.dev/docs/api/usage/rate-limits 

 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org