> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Sample Flow ## Article: Sample Flow ## Article Link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/validations/validations-integration-service-plugin/sample-flow.md ## Article Content: # Validation Violations: Sample Use Cases & Flows This article presents sample flows your app can support. You aren't limited to this exact flow, but it can be a helpful jumping off point as you plan your Validations integration. ## Validate a coupon code for a Wix checkout 1. A site visitor adds a coupon code to their Wix checkout. 2. Wix sends a [Get Validation Violations](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/validations/validations-integration-service-plugin/get-validation-violations.md) service plugin request to your app. 3. Your server validates the request. If the coupon code is valid, the validation is successful and the service plugin returns an object containing an empty list. If the coupon isn't valid, the validation isn't successful. In this case, Wix eCommerce expects an object containing the validation violations, and the severity and target of the violations. Example of a violations response from your app: ```json { "violations": [{ "severity": "ERROR", "target": { "other": { "name": "OTHER_DEFAULT" } }, "description": "Can't apply coupon because minimum cart value has not been reached.", }] } ``` 4. With this validation violation, the site visitor can't proceed with the checkout. ## Validate a line item's quantity In this flow, due to limited quantity of white wine, a site visitor can't add more than 5 cases of white wine to their cart. ### App configuration prerequisites When configuring your app, set the `validateInCart` property to `true` in the extension’s configuration file. This validates a site visitor's cart in addition to a site visitor's checkout. ### The flow 1. A site visitor adds 6 cases of white wine to their cart, which exceeds the quantity that is permitted for this line item. 2. Wix sends a [Get Validation Violations](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/validations/validations-integration-service-plugin/get-validation-violations.md) service plugin request to your app. 3. Your server validates the request and finds it unsuccessful. Wix eCommerce expects an object containing the validation violations, and the severity and target of the violations. Example of a violations response from your app: ```json { "violations": { "severity": "ERROR", "target": { "line_item": { "name": "LINE_ITEM_DEFAULT", "id": "00000000-0000-0000-0000-000000000001" } }, "description": "Can't proceed with checkout. Remove 1 case of white wine from your cart.", } } ``` 4. After this validation violation, the site visitor removes 1 case of white wine to proceed to Wix Checkout. 5. Again Wix sends a [Get Validation Violations](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/validations/validations-integration-service-plugin/get-validation-violations.md) service plugin request to your app. 6. Your server validates the request and finds it successful. In this case, Wix eCommerce expects an object containing an empty list.