I am building a simple returns portal for my Shopify business and would really appreciate some help on my thinking! (I am a novice with Bubble)
All the app needs to do is the following:
Retrieve a customer’s order from Shopify (using order number + email). I have built the API connector for this already
Allow the user to select certain order items from the order to be returned
Make one final external API call with the details of what is being returned
Relevantly, I don’t need anything to persist over time. The user doesn’t need to be able to come back to look up their return details at a later date. The app essentially serves the purpose of a form to lookup their order details, and then communicate what is being returned
Am I stupid for thinking this could be done without using the Bubble database? Simply using custom state & URL params instead?
You are most certainly not stupid! You can do this entirely with state variables attached to a repeating group.
Populate a repeating group with the data coming from the endpoint you have connected to your API connector. Add a checkbox to each.
Add a state to the repeating group, in my example, it is a list of text
Add workflows to the checkbox, (when checkbox value is changed)
Set the state to your repeating groups state list:plus item , whatever data you want
Then make a second workflow with the opposite effect when the check box is unchecked.
here are screenshots for my example
Then when the user hits submit, you can just send the data in the repeating group state!
Excellent, thank you @anthony.schanen !
I’ve been able to make a lot of progress
One thing I’m struggling on right now is, where you see the line item cost in USD (this is pulled from API) - I would like to run a calculation on that and show it’s output instead. I’ve worked out how to do this using custom state by following this tutorial - Using Custom States - Bubble Docs - however, I don’t seem to be able to set custom states of items inside a repeating group - is this expected behaviour?