Power BI Connector for Shopify

Build 25.0.9454

DiscountsCodeBasic

Lists basic code discounts (fixed/percentage off, minimums).

Table-Specific Information

Select

The connector uses the Shopify API to process WHERE clause conditions built with the following columns and operators. The connector processes other filters client-side within the connector.

  • Title supports the '=, !=' comparison operators.
  • DiscountClass supports the '=' comparison operator.
  • EndsAt supports the '=, !=, <, >, >=, <=' comparison operators.
  • StartsAt supports the '=, !=, <, >, >=, <=' comparison operators.
  • CreatedAt supports the '=, <, >, >=, <=' comparison operators.
  • UpdatedAt supports the '=, <, >, >=, <=' comparison operators.

For example, the following queries are processed server-side:

  SELECT * FROM DiscountsCodeBasic WHERE Title = 'Val1'
  SELECT * FROM DiscountsCodeBasic WHERE DiscountClass = 'Val1'
  SELECT * FROM DiscountsCodeBasic WHERE EndsAt = '2023-01-01 11:10:00'
  SELECT * FROM DiscountsCodeBasic WHERE StartsAt = '2023-01-01 11:10:00'
  SELECT * FROM DiscountsCodeBasic WHERE CreatedAt = '2023-01-01 11:10:00'
  SELECT * FROM DiscountsCodeBasic WHERE UpdatedAt = '2023-01-01 11:10:00'

Insert

The following columns can be used to create a new record:

Title, EndsAt, StartsAt, UsageLimit, RecurringCycleLimit, AppliesOncePerCustomer, CombinesWithOrderDiscounts, CombinesWithProductDiscounts, CombinesWithShippingDiscounts, CustomerGetsAppliesOnSubscription, CustomerGetsAppliesOnOneTimePurchase, DiscountCustomerAllAllCustomers, DiscountMinimumQuantityGreaterThanOrEqualToQuantity

The following pseudo-columns can be used to create a new record:

Code, AppliesOnEachItem, DiscountAmount, ProductsToAdd, ProductsToRemove, AddAllCustomers, CustomersToAdd, CustomersToRemove, CustomerSegmentsToAdd, CustomerSegmentsToRemove

Update

The following columns can be updated:

Title, EndsAt, StartsAt, UsageLimit, RecurringCycleLimit, AppliesOncePerCustomer, CombinesWithOrderDiscounts, CombinesWithProductDiscounts, CombinesWithShippingDiscounts, CustomerGetsAppliesOnSubscription, CustomerGetsAppliesOnOneTimePurchase, DiscountCustomerAllAllCustomers, DiscountMinimumQuantityGreaterThanOrEqualToQuantity

The following pseudo-columns can be used to update a record:

Code, AppliesOnEachItem, DiscountAmount, ProductsToAdd, ProductsToRemove, AddAllCustomers, CustomersToAdd, CustomersToRemove, CustomerSegmentsToAdd, CustomerSegmentsToRemove

Delete

You can delete entries by specifying the following column:

Id

Columns

Name Type ReadOnly References Description
Id [KEY] String True

The globally unique identifier of the discount code record.

Title String False

The display title of the discount.

Status String True

The current status of the discount, such as active or expired.

Summary String True

A detailed summary of the discount and how it is applied.

CodesCount Int True

The number of unique discount codes generated for this discount.

CodesCountPrecision String True

The level of precision applied to the discount code count value.

DiscountClass String True

The classification of the discount, used for determining compatibility with other discounts.

EndsAt Datetime False

The date and time when the discount ends. Returns null for open-ended discounts.

ShortSummary String True

A short summary of the basic discount code (for example, '10% off all products' or '$5 off orders over $25').

StartsAt Datetime False

The date and time when the discount becomes active.

UsageLimit Int False

The maximum number of times this discount can be used across all customers.

AsyncUsageCount Int True

The number of times the discount has been used. This value is updated asynchronously and might differ from the actual usage count.

HasTimelineComment Bool True

Indicates whether timeline comments have been added to the discount record.

RecurringCycleLimit Int False

The maximum number of billing cycles in which this discount can apply to subscriptions.

AppliesOncePerCustomer Bool False

Indicates whether the discount can be redeemed only once per customer.

CreatedAt Datetime True

The date and time when the discount record was created.

UpdatedAt Datetime True

The date and time when the discount was last updated.

CombinesWithOrderDiscounts Bool False

Indicates whether the discount can be combined with order-level discounts.

CombinesWithProductDiscounts Bool False

Indicates whether the discount can be combined with product-level discounts.

CombinesWithShippingDiscounts Bool False

Indicates whether the discount can be combined with shipping-level discounts.

CustomerGetsAppliesOnSubscription Bool False

Indicates whether the discount applies to subscription items.

CustomerGetsAppliesOnOneTimePurchase Bool False

Indicates whether the discount applies to regular one-time purchase items.

DiscountCustomerAllAllCustomers Bool False

Indicates whether the discount can be applied by all customers. This value is always true.

DiscountMinimumQuantityGreaterThanOrEqualToQuantity String False

The minimum number of items required for the discount to apply.

TotalSalesAmount Decimal True

The total sales amount attributed to this discount, expressed as a decimal money value.

TotalSalesCurrencyCode String True

The currency code of the total sales amount attributed to this discount.

Pseudo-Columns

Pseudo-columns are fields that can only be used in the types of statements under which they are explicitly listed. They are not standard columns but instead provide additional functionality for specific operations.

Name Type Description
Code String

The code customers must enter to redeem the discount.

AppliesOnEachItem Bool

Indicates how the discount is applied. If true, it applies to each entitled item individually. If false, the discount amount is split across all entitled items.

DiscountAmount Decimal

The value of the discount, expressed as a decimal money amount.

ProductsToAdd String

A comma-separated list of product Ids to include in the discount.

ProductsToRemove String

A comma-separated list of product Ids to exclude from the discount.

AddAllCustomers Bool

Indicates whether all customers are automatically eligible for the discount.

CustomersToAdd String

A comma-separated list of customer Ids to include as eligible for the discount.

CustomersToRemove String

A comma-separated list of customer Ids to remove from discount eligibility.

CustomerSegmentsToAdd String

A comma-separated list of customer segment Ids to include as eligible for the discount.

CustomerSegmentsToRemove String

A comma-separated list of customer segment Ids to remove from discount eligibility.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9454