Smart Checkout API

en: How does to identify smart checkout orders through API order’s response?

pt-br: Como identificar pedidos com smart checkout através da resposta de pedido de API?

1 Like

What do you mean when you say “orders with SmartCheckout”? In theory, every order placed in VTEX goes through SmartCheckout.

I mean buying with no registration and logging in, like in this page:

Is there any way to differentiate from client’s orders logged in?
Thanks.

In other words, do you want to find a way to identify whether this is a customer’s first purchase?

Galmanza, hi.

You could use the vtexid api to find out if the client is logged in or not.
You could send this captured information to the “openTextField” field of the order.

Example:

let isLogged = true;

vtexjs.checkout.getOrderForm()
  .then(function(orderForm) {
    return vtexjs.checkout.sendAttachment('openTextField', { value: isLogged });
  }).done(function(orderForm) {
    console.log("openTextField preenchido com: ", orderForm.openTextField);
  });
1 Like

Actually I want to know if some order was made with a client registered or not.
On the image I sent, the clients can buy with no registration, only using requested data, and I want to know if the API orders response differentiate this type of ordem from orders done with clients logged in (registered on the clients site).

Hello ecarlosvao, actually I’m only consuming the API through clients credentials, the data I have avaliable is just the response from the entities (orders, customers, etc), the information I want to know is if there is some field, some information on API orders response that tells if some order was done with the client logged in or not.
Thanks.

You will not find this information in any of the tables. Sorry, @Galmanza.

2 Likes

Apreciate your answer, that was the confirmation I needed, thanks ecarlosvao!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.