Menu
Feedback
Start here


Known issues
Simultaneous sending of information generates data loss in the API
ID: 280390
Backlog
Published on 5/12/2022
Last update on 6/29/2022

Summary

Simultaneous requests to the orderForm API to include "itemAttachment" (item attachments, in fact) and also to change the item's value (through a telesales user) will cause the data of that same moment to be lost.

This is because this API is not prepared to receive simultaneous requests, with a "lock" feature, so that the data received is processed in series.

The context of a second request may not take into account the first that has just been received. Even if the first one has been registered, the second one can end up regressing the new data, thus ignoring the previous request.

Scenario discussed among the product team here.

Simulation

  • have a cart with several items that have "itemAttachment"
  • populate these multiple attachments with simultaneous requests, so that there is overlap between requests

or

  • enter a telesales user and try to manually change the price in the cart
  • in some moments at the time of this change, the price stays with the previous state

Workaround

To avoid the scenario, the data must be sent one at a time, with a new request only after the previous request's response.

In graphic example, scenario with overlap, which generates problems:

||||| ||||| ||||| |||||

{"base64":"  ","img":{"width":1832,"height":124,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":46684,"url":"https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/known-issues/Checkout/simultaneous-sending-of-information-generates-data-loss-in-the-api_1.png"}}
​ Suggested, non-overlapping scenario with one request after another:

||||| ||||| ||||| |||||

(consider each line as a request, and the |||||​ as the time of the request, representing its beginning and end, just like a "waterfall" of requests)

Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX community.
Join our community
Request support from VTEX
For personalized assistance, contact our experts.
Open a support ticket
GithubDeveloper portalCommunityFeedback