> 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 Flows ## Article: Sample Flows ## Article Link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/custom-discount-triggers-integration-service-plugin/sample-flows.md ## Article Content: # Sample Flows This article presents sample flows your can support. You aren't limited to these exact flows, but they can be a helpful jumping off point as you plan your Custom Discount Triggers integration. ## Offer a happy hour discount Your app can allow sites to offer customers a happy hour discount. With a custom trigger based on the time an order is placed, an [automatic discount](https://support.wix.com/en/article/wix-stores-creating-automatic-discounts) can be applied. To create a custom trigger for a happy hour discount: 1. Configure your app with custom triggers that are retrieved by Wix when [List Triggers](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/custom-discount-triggers-integration-service-plugin/list-triggers.md) is called. For example, give a custom trigger these properties: - `"id"`: `"happy-hour-trigger"` - `"name"`: `"Happy Hour, weekdays, 16\:00-18\:00"` 2. [Create a discount rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/discount-rules/create-discount-rule.md) that includes the amount of the discount to apply, which items to apply the discount to, and which custom trigger to use to trigger the rule. 3. Wix calls [Get Eligible Triggers](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/custom-discount-triggers-integration-service-plugin/get-eligible-triggers.md) when actions are taken on the cart or checkout entities/pages. Your app should determine if the time of the customer's action should trigger the Happy Hour discount rule to apply. If so, the customer will see the discounted price. ## Offer a sale on digital products Your app can allow sites to offer discounts on certain types of products, such as, digital products. To create a custom trigger for a digital discount: 1. Configure your app with custom triggers that are retrieved by Wix when [List Triggers](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/custom-discount-triggers-integration-service-plugin/list-triggers.md) is called. For example, give a custom trigger these properties: - `"id"`: `"digital-sale-trigger"` - `"name"`: `"Digital products discount"` 2. [Create a discount rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/discount-rules/create-discount-rule.md) that includes the amount of the discount to apply, which category of items to apply the discount to, and which custom trigger to use to trigger the rule. 3. Wix calls [Get Eligible Triggers](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/custom-discount-triggers-integration-service-plugin/get-eligible-triggers.md) when actions are taken on the cart or checkout entities/pages. Use [Get Product](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/get-product.md) to check the `productType` and determine if the product a customer views triggers the digital discount rule to apply. If so, the customer will see the discounted price.