How does shopware set values for line items

I’m trying to figure which logic is used to set line item values for shopware cart to solve the following problem, I have injected a dynamic form in the PDP and created a promise based function that creates a serializable JSON object from the filled form data, I would like to attach this JSON object to the cart items conditionally. So… Where can I find the logic responsible for resolving cart items addition?