Marking Order Risk as High, Medium or Low based on Risk Analysis.

Shopify Partner
8 0 0

Hi Team,

My requirement is to retrieve Order Risk info for any Order and based on the risks mark an Order as High, Medium or Low for a backend Order Management System. For this, after some observation, I choose to relate these risk levels to "recommendation" property of the risk object. The highest value is choosen and it is mapped accordingly (Cancel = High, Investigate = Medium, Accept = Low).

For most of the cases, it was working fine, but for one of the order I found that the highest recommendation is "Cancel" but the Order is marked as "Medium" risk level in Shopify. A careful look at the risk analysis showed the "source" property of risk object with "cancel" "recommendation" had value as "Internal". Is it that a "internal" "source" is not considered while following the above rule. Although the above rule is no where mentioned in Shopify documentation, with observation I choose that.

Could someone explain the exact creteria to mark an Order risk level based on order risk  api call data.

Thanks in advance,

Amit Gupta

Shopify Partner
2 0 1

Hey Amit -

Know this is months later, but I think I figured this out and wanted to pass along my findings to you on the off chance it was still useful.  When you iterate through the OrderRisks associated with a given Order, you should find one with a message attribute that reads 'Shopify recommendation'.  The score of this particular OrderRisk should come back as 0.0, 0.5, or 1.0, which as far as I can tell, corresponds directly to Shopify's low, medium, or high risk level assessment.