Technical integrations
Read Shopify Order Risk With GraphQL Without Flattening Every Assessment Into One Score

Preserve Shopify's order risk summary and its individual assessments as separate parts of the data model. Do not average provider assessments into a new universal score or replace the summary recommendation with whichever signal looks most severe. Your interface should show what Shopify recommends and the assessments on which operators may need more context.
The illustrative query uses Admin GraphQL API version 2026-07, reviewed on 6 September 2026. It has not been run against a live store. Confirm access and validate the operation against the version deployed by your application.
Read the summary and assessments together
Shopify's OrderRiskSummary reference separates recommendation from assessments. The assessment reference then provides risk level, provider and facts for each assessment.
query ReadOrderRisk($id: ID!) {
order(id: $id) {
id
risk {
recommendation
assessments {
riskLevel
provider { id title }
facts { description sentiment }
}
}
}
}
The order ID must belong to the authorized installation being queried. Keep the response associated with that installation even if your database stores globally shaped Shopify identifiers.
The operation reads operational risk context. It does not cancel an order, hold fulfillment or contact a buyer. Any merchant decision belongs in a separate, explicitly authorized workflow.
Preserve source attribution
Shopify documents a null assessment provider as an assessment supplied by Shopify. Do not display that case as “unknown vendor” merely because the provider object is absent. Distinguish this documented null meaning from a request that failed to return usable assessment data.
For an app-supplied assessment, retain its provider identity and display name. If a name changes later, consider whether the current display or historical label best serves your review record, while preserving the stable source identifier.
Facts are provider-specific explanatory information. The RiskFact object supplies description and sentiment fields; a sentiment is not a numeric probability of fraud.
Do not compare one provider's phrasing or number of facts with another's as though they share a calibrated scale. The merchant needs attribution so it can interpret the signal in its actual context.
Design the rendering hierarchy
Show the summary recommendation first, clearly labeled as the source recommendation. Below it, group assessments by provider and display each assessment's risk level and relevant facts.
| Data element | Suitable interface treatment | Misleading treatment to avoid |
|---|---|---|
| Summary recommendation | Separate labeled recommendation | Recomputed average of assessments |
| Assessment risk level | Provider-specific assessment | Universal probability |
| Fact sentiment | Context attached to the fact | Automatic merchant verdict |
| No recommendation | Explicit unavailable or none state | Green approval by default |
| Failed refresh | Last known data with freshness warning | Empty list interpreted as safe |
Preserve the raw enum alongside any human-readable label. An unfamiliar future value should produce a safe fallback label and a compatibility signal, not crash the entire order view.
Escape descriptions as text in the interface. Provider-supplied content should not be inserted as executable markup. A useful explanation does not need permission to run code in the merchant's browser.
Work through a hypothetical conflicting assessment
Suppose a hypothetical order has an INVESTIGATE recommendation, one low-risk assessment and another assessment containing a concerning fact. A flattened “average score” might appear reassuring and hide the reason Shopify recommends review.
The correct rendering shows the recommendation and both attributed assessments. An operator can then understand the conflict without the integration inventing a new risk decision.
Now suppose the summary returns no recommendation and an empty assessment list. The interface should say that no recommendation or assessments were supplied in this successful response. It should not claim that the order passed fraud screening.
Finally, suppose the API request fails. That is not equivalent to either of the previous states. Preserve the last successful observation where available and make the refresh failure visible.
Store merchant decisions independently
If your application records a merchant review decision, keep it in a separate record with the order reference, reviewer and decision time. Do not overwrite Shopify's recommendation to make the source appear to agree with the merchant.
A later source assessment can change while the merchant's earlier decision remains part of the operational history. Display enough timing context to show which information was available when the decision was recorded, without pretending that every local observation is a source change event.
Validate meaning before broad rollout
Use fixtures covering multiple providers, a Shopify-supplied assessment, no recommendation, an empty list, an unfamiliar enum and an API error. The important test is whether each state remains distinguishable to an operator.
Compare a small authorized sample with Shopify Admin and the documented fields. Confirm that provider attribution, recommendation and facts are preserved and that the integration has not introduced an unsupported combined score.
The resulting view should help merchants read the available evidence in context. Its value comes from faithful presentation and clear merchant ownership, not from manufacturing a more precise-looking risk number than the source actually provides.
See how Lower Chargeback presents Shopify risk signals for merchant review.
Related reading in this collection: