Skip to main content
Migrate to Polaris

Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.

Discounts

Discount details pages display information about a specific discount, including its type, value, conditions, and usage limits. Extensions on these pages help merchants manage promotional campaigns and customize discount workflows.

  • Sync discounts externally: Push discount codes and rules to external marketing platforms, email services, or affiliate networks.
  • Validate discount rules: Check discount configurations against business rules or inventory levels before activation.
  • Generate discount reports: Create performance reports showing discount usage, revenue impact, and customer redemption patterns.
  • Bulk discount management: Apply changes to multiple discounts at once, such as extending expiration dates or adjusting values.
  • Schedule promotions: Set up automated discount activation and deactivation based on marketing calendars or inventory triggers.

Anchor to Discount details targetsDiscount details targets

Use action targets to extend the discount details page with workflows. Action targets open as modal overlays from the More actions menu.

The examples demonstrate fetching data from Shopify's direct API or your app's backend.

admin.discount-details.action.render

Renders an admin action extension on the discounts details page. Merchants can access this extension from the More actions menu. Use this target to provide workflows that operate on discounts data, such as syncing with external systems, exporting discounts information, or managing credit terms.

Extensions at this target can access discount data through the data property in the Action Extension API. The action renders in a modal overlay, providing space for multi-step workflows, forms, and confirmations.

Anchor to Discount details action (should render) ,[object Object]Discount details action (should render) target

admin.discount-details.action.should-render

Controls the render state of an admin action extension on the discounts details page. Use this target to conditionally show or hide your action extension based on the discount's properties, such as status, configuration, or specific business requirements.

This target returns a boolean value that determines whether the corresponding action extension appears in the More actions menu. The extension evaluates each time the page loads.

Support
Components (0)
APIs (1)

Supported components

-

Available APIs


Anchor to Discount index targetsDiscount index targets

Use action targets to extend the discount index page with bulk operations and workflows that help merchants manage multiple discounts efficiently.

admin.discount-index.action.render

Renders an admin action extension on the discounts index page. Merchants can access this extension from the More actions menu. Use this target to provide workflows that operate on discounts data, such as syncing with external systems, exporting discounts information, or managing credit terms.

Extensions at this target can access discount data through the data property in the Action Extension API. The action renders in a modal overlay, providing space for multi-step workflows, forms, and confirmations.

Anchor to Discount index action (should render) ,[object Object]Discount index action (should render) target

admin.discount-index.action.should-render

Controls the render state of an admin action extension on the discounts index page. Use this target to conditionally show or hide your action extension based on the discount's properties, such as status, configuration, or specific business requirements.

This target returns a boolean value that determines whether the corresponding action extension appears in the More actions menu. The extension evaluates each time the page loads.

Support
Components (0)
APIs (1)

Supported components

-

Available APIs


  • Differentiate discount types: Discounts come in multiple types (basic, BXGY, free shipping, automatic vs code-based). Before displaying discount actions, check the discount type using GraphQL to ensure your extension supports it. For example, POS sync may only work with certain discount types.
  • Validate discount dates: Always check startsAt and endsAt when displaying or syncing discounts. Syncing expired or not-yet-active discounts to external systems can create customer confusion and needs special handling or filtering.
  • Provide clear feedback: Discounts workflows often involve external systems. Always provide clear success and error messages, and help merchants understand what happened and what to do next if something goes wrong.
  • Handle discount combinations: Shopify has complex discount combination rules. If your extension recommends or creates discounts, validate that they're compatible with existing discount configurations to avoid conflicts that prevent customers from completing checkouts.
  • Account for attribution delays: Discount usage counts (asyncUsageCount) update asynchronously and may lag by several minutes. When displaying real-time analytics, indicate that counts are approximate and mention the last update time if available from your system.


Was this page helpful?