Insert Object in RG without Bubble Database or External API as sources

Hello everyone,
Is there anyway to insert an object in a RG without having to either

  • create a data type (and therefore insert it into the database)
  • call an external API

My usecase is the following :

I’m trying to build a shopping cart, I need to compile different types of data on my page to display them in the cart, but I want to wait to have the complete order to proceed a call to my API

I don’t want to

  • add the items to Bubble DB
  • call my API each time there is a modification in the cart

Do you know any workaround / plug-in?
Thank you!

You don’t want to store items in a user’s cart? Seems like that would be a terrible user experience.

I guess you can theoretically save items to a custom state but I’d strongly recommend you save it to the DB instead

Hello @code-escapee
I am not using Bubble DB because I have my own DBs (sql and redis) and data structures, the cart is purely temporary and I don’t want it to be persistent in any way.
Correct me if I’m wrong but custom states are mostly for basic types if I don’t want to create a data type

You are correct. It would have to be a list of product IDs etc.

You can’t create objects in Bubble natively. If you insist on not using the DB, you can try to create a pseudo object using text states and convert that during the API call workflow.

1 Like

Hello @ihsanzainal84, thank you for the trick, I have quickly looked into it and I think that would perfectly do the job

I will try to implement the work flow and keep this feed updated on how to do it precisely, from what I understand it’s a matter of type assertion through API work flow and return data from API step as json pseudo object (plain text) and some json parsing in between.

More details coming soon

Thanks again @ihsanzainal84!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.