Add to cart API with custom attribute (Globo Product Option)

Add to cart API with custom attribute (Globo Product Option)

ApoloTor
Visitor
2 0 0

Hi there!

 

I have an issue, where I cannot add a product to a cart through an API.

 

I am building a chatbot that provides a personalised recommendation for a product detail. To order such product I use Globo Product Option to get clients wishes (text area attribute). I've tried multiple options how to get the client's customised product to the cart, but I am yet to find a working solution.

 

The closest I got was to get or create a cart and populate it with a product through API from chatbot's side, but there is a problem - the cart created/found by the API is not matching the user's session on the website.

 

Then I tried to get the cart token from the websites' side and managed to do it, but failed to pass the token to the chatbot.

 

Any ideas or suggestions how I should proceed?

 

Thanks!

 

Replies 2 (2)

ScalaApps
Shopify Partner
73 2 13

It's probably because you're creating the cart before the customer adds anything to the cart.

Have you tried using cart transform functions instead?
https://shopify.dev/docs/api/functions/reference/cart-transform

 

Scala Apps



- If you find my reply helpful, please hit Like and Mark as Solution

- Se você achar minha resposta útil, por favor clique em Curtir e Marcar como Solução

Parcelamento/Installments | Hide sold variants | Apps | Blog
ApoloTor
Visitor
2 0 0

Hey! I think those are only available for Shopify Plus users, which I don't have.