Select Page

A new knowledge base article has been published on our support portal.

Overview

This North52 rules engine example implements a fraud detection and order management system for Shopify orders. Shopify sends information to Dataverse via a webhook. This triggers a Flow and calls a custom action which is bound to a North52 Formula. The rules are evaluated and if fraud or a problem customer is determined by the rules, North52 connects via the Shopify API to update the order.

Key Features

  • Automated fraud prevention based on spending patterns
  • Risk-based decision making with different thresholds
  • Integration with Shopify using GraphQL APIs
  • Historical pattern analysis to identify unusual behavior
  • Manual review workflow for suspicious but not clearly fraudulent orders

This system helps prevent fraudulent orders while minimizing false positives by using the customer’s own purchase history as a baseline.

Rules for Shopify integration

Rule # Description
1 Fraud Assessment – Evaluates the current order against the customer’s historical patterns: High Risk (3x Average): If current order > 3× average order value:

  • Automatically cancels the order with reason “FRAUD”
  • Issues refund and restocks inventory
  • Updates order with “fraud-assessed” tag and cancellation note
2 Fraud Assessment – Evaluates the current order against the customer’s historical patterns: Medium Risk (1.5x Average): If current order > 1.5× average order value:

  • Puts order on hold for manual review
  • Adds tags: “on-hold, manual-review, problem-customer”
  • Adds note requiring manual verification
3 Problem Customer Check – Queries the system for previous problem cases:

  • If customer has 2+ previous incidents, puts current order on hold regardless of amount
  • Uses the same hold process as medium-risk orders

View this article in full on our support portal