The ValidateNationalAddressCode order rule action is an automated quality control feature that identifies orders containing invalid or unverified Saudi Arabia national address codes. When this rule runs on an order, it validates the national address code format and verifies it against the official Saudi National Address database, helping you catch potential delivery issues before orders are processed.
Param Value: (Blank)
What the ValidateNationalAddressCode rule does
When the ValidateNationalAddressCode rule is triggered, the system automatically examines the order's national address code and performs a two-stage validation process. If the code is invalid or cannot be verified, the system flags the order for your attention.
How the validation process works
The validation process follows these steps:
The rule checks if a National Address Code exists on the order.
If a code is present, it validates the format. The code must be exactly 8 characters containing only uppercase letters and numbers.
If the format is invalid, the system automatically adds a tag called InvalidNationalAddressCode-Format to the order.
If the format is valid, the system queries the Saudi National Address Service API to verify the code exists in the official database.
If the API lookup fails or the code is not found, the system adds a tag called InvalidNationalAddressCode-Lookup to the order.
If the code passes both format and lookup validation, the system adds a ValidAddressCode tag to confirm the address is verified.
If no National Address Code is present on the order, the rule completes successfully with a confirmation message.
What happens when invalid address codes are found
When the rule detects invalid address codes, it automatically tags the order with one of two specific tags:
InvalidNationalAddressCode-Format: The code doesn't meet the required 8-character alphanumeric format.
InvalidNationalAddressCode-Lookup: The code format is correct but couldn't be verified in the Saudi National Address database.
These tags make it easy for you to:
Quickly identify problematic orders in your order list by filtering for the invalid address code tags.
Set up alerts or notifications for orders that need address verification.
Create workflows to route these orders to specific team members for review and correction.
Prevent orders with unverified addresses from progressing through your fulfilment process.
Distinguish between format errors, which may be typos, and lookup failures, which may indicate incorrect codes.
