Tracking chatbot-driven conversions on Shopify by linking user sessions with Orders API data

In that same Cart Update API call, you could also leave a cart attribute which is readable from the order’s API / webhooks:

That way you tie the upsell to your app.

Normally what you’re referring to is called a sales channel, where the order.source itself is an app. But in your case, it sounds like you’re just adding a chat window to the Shopify online store, so the order.source is still the same online store.

But the line item itself could be attributed back to your app.