Order Line check / Shopify Product Matching

Hi,

I have a scenario catching webhooks from our order platform to create orders in Shopify.
The webhook contains multiple orders lines and product SKUs.

To submit the order lines to Shopify i need to supply the variant ID. So i search the shopify products and have a filter that is ‘webhook SKU’ = ‘shopify SKU’ so i can map fields like variant ID.

Is this the best way to do this?

And if there’s no match between the systems the order line is simple dropped but execution is deemed successful. Whats the best way to check the order lines submitted vs order lines processed and present an error if they differ?

Cheers

Jonny