Summary Card
The SummaryCard
component displays basic information about the state of a discount and can display more advanced configuration options if any OptionalSectionsProps
are passed. None, any, or all optional sections can be displayed. We recommend displaying as many sections as you have data for, in order to give as much information to the user about their discount as possible.
Name |
Type |
Description |
Required |
header |
HeaderProps |
The header properties. |
Yes |
performance |
PerformanceProps |
The performance sections properties. |
Yes |
activeDates |
ActiveDatesProps |
Displays the start and end dates of the discount. |
No |
additionalDetails |
string[] |
Additional text that you want to display. |
No |
appliesToPurchaseType |
AppliesToPurchaseTypeProps |
The purchase type that the discount applies to (one time, subscription, or both). |
No |
combinations |
CombinationsProps |
How the discount combines with other discounts. |
No |
customerEligibility |
CustomerEligibilityProps |
Which customers the discount applies to. |
No |
maximumShippingPrice |
MaximumShippingPriceProps |
The maximum allowable shipping price that the discount can apply to. |
No |
minimumRequirements |
MinimumRequirementsProps |
The minimum purchase requirements for the discount to apply. |
No |
recurringPayment |
RecurringPaymentProps |
How the discount applies to orders with recurring payments. |
No |
selectedCountries |
SelectedCountriesProps |
The countries that the discount applies to. |
No |
usageLimits |
UsageLimitsProps |
The number of times that the discount can be used. |
No |
Name |
Type |
Description |
Required |
discountMethod |
DiscountMethod |
The method of the current discount (either code or discount ). |
Yes |
appDiscountType |
string |
The discount type of the current discount. This value should be the appDiscountType.title returned from the API. |
Yes |
discountDescriptor |
string |
The discount title for automatic discounts, or the discount code for code discounts. |
Yes |
isEditing |
boolean |
Whether the discount is currently being edited. |
No |
discountStatus |
DiscountStatus |
The status of the discount. |
No |
Name |
Type |
Description |
Required |
isEditing |
boolean |
Whether the discount is currently being edited. |
Yes |
status |
DiscountStatus |
The status of the discount (active, expired, or scheduled). |
No |
usageCount |
number |
The number of times that the discount has been used. |
No |
hasReports |
boolean |
Whether the shop has enabled the reports feature. |
No |
discountMethod |
DiscountMethod |
The discount method (either code or automatic ). Used to control whether a text input or a code generator is shown. |
No |
totalSales |
MoneyInput |
The total number of sales that have been made with the discount. |
No |
Name |
Type |
Description |
Required |
startDate |
DateTime |
The start date of the discount, formatted as an ISO 8601 timestamp in UTC. |
Yes |
endDate |
DateTime | null |
The end date of the discount, formatted as an ISO 8601 timestamp in UTC. |
Yes |
Name |
Type |
Description |
Required |
purchaseType |
PurchaseType |
The purchase type that the discount applies to (one time, subscription, or both). |
Yes |
Name |
Type |
Description |
Required |
combinesWith |
CombinableDiscountTypes |
The discount classes that can be combined with this discount. |
Yes |
Name |
Type |
Description |
Required |
eligibility |
Eligibility |
Who the discount applies to (all customers, specific customers, specific customer groups). |
Yes |
selectedCustomerSegments |
CustomerSegment[] |
The specific customer segments that the discount applies to. |
No |
selectedCustomers |
Customer[] |
The specific customers that the discount applies to. |
No |
Name |
Type |
Description |
Required |
maximumShippingPrice |
PositiveNumericString |
The maximum shipping price, displayed when the user selects to exclude shipping rates. |
Yes |
currencyCode |
CurrencyCode |
The currency code that should be used to format the input value. |
Yes |
Name |
Type |
Description |
Required |
requirementType |
RequirementType |
The type of minimum requirement (none, subtotal, or quantity). |
Yes |
quantity |
PositiveNumericString |
The minimum quantity requirement for the discount. |
No |
subtotal |
PositiveNumericString |
The minimum subtotal requirement for the discount. |
No |
currencyCode |
CurrencyCode |
The currencyCode that should be used to format the subtotal amount. |
No |
Name |
Type |
Description |
Required |
isRecurring |
boolean |
Whether a discount is applicable for recurring payments. |
Yes |
recurringPaymentType |
RecurringPaymentType |
The type of recurring payments (first payment, multiple payments, or all payments). |
Yes |
recurringPaymentLimit |
PositiveNumericString |
If the discount is available for RecurringPaymentType.MultiplePayments, then this value displays how many payments the discount is available for. |
No |
Name |
Type |
Description |
Required |
countrySelectionType |
CountrySelectionType |
The country selection type that the discount applies to (either all countries or selected countries). |
Yes |
selectedCountries |
CountryCode[] |
The list of country codes where the discount applies. |
Yes |
Name |
Type |
Description |
Required |
totalUsageLimit |
PositiveNumericString | null |
The total number of times that a discount can be used. |
Yes |
oncePerCustomer |
boolean |
Whether a discount can only be used once per customer. |
Yes |