CData Python Connector for Shopify

Build 23.0.8839

DiscountsCodeBasic

Returns a list of discounts.

Table-Specific Information

Select

The connector uses the Shopify API to process WHERE clause conditions built with the following columns and operators:

  • Title supports the '=,!=' comparison operators.
  • DiscountClass supports the '=' comparison operators.
  • StartsAt supports the '=,!=,<,>,>=,<=' comparison operators.

The connector processes other filters client-side within the connector.

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

SELECT * FROM DiscountsCodeBasic WHERE Title='VALUE'

SELECT * FROM DiscountsCodeBasic WHERE DiscountClass='VALUE'

SELECT * FROM DiscountsCodeBasic WHERE StartsAt<'2000-01-01 01:00:00.0'

Insert

INSERT statements are mapped to the 'discountCodeBasicCreate' GraphQL mutation.

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

UPDATE statements are mapped to the 'discountCodeBasicUpdate' GraphQL mutation.

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 updated:

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

DELETE

DELETE statements are mapped to the 'discountCodeDelete' GraphQL mutation.

You can delete entries by specifying the Id.

Columns

Name Type ReadOnly References Description
Id [KEY] String True

A globally-unique ID.

Title String False

The title of the discount.

Status String True

The status of the discount.

Summary String True

A detailed summary of the discount.

CodeCount Int True

The number of redeem codes for the discount.

DiscountClass String True

The class of the discount for combining purposes.

EndsAt Datetime False

The date and time when the discount ends. For open-ended discounts, use 'null'.

ShortSummary String True

A short summary of the discount.

StartsAt Datetime False

The date and time when the discount starts.

UsageLimit Int False

The maximum number of times that the discount can be used.

AsyncUsageCount Int True

The number of times that the discount has been used.

HasTimelineComment Bool True

Indicates whether there are any timeline comments on the discount.

RecurringCycleLimit Int False

The number of times a discount applies on recurring purchases (subscriptions).

AppliesOncePerCustomer Bool False

Whether the discount can be applied only once per customer.

CreatedAt Datetime True

The date and time when the discount was created.

CombinesWithOrderDiscounts Bool False

Combines with order discounts.

CombinesWithProductDiscounts Bool False

Combines with product discounts.

CombinesWithShippingDiscounts Bool False

Combines with shipping discounts.

CustomerGetsAppliesOnSubscription Bool False

Whether the discount applies on subscription items.

CustomerGetsAppliesOnOneTimePurchase Bool False

Whether the discount applies on regular one-time-purchase items.

DiscountCustomerAllAllCustomers Bool False

Whether the discount can be applied by all customers. This value is always 'true'.

DiscountMinimumQuantityGreaterThanOrEqualToQuantity String False

The minimum quantity of items that's required for the discount to be applied.

TotalSalesAmount Decimal True

Decimal money amount.

TotalSalesCurrencyCode String True

Currency of the money.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements, to offer a more granular control over the tuples that are returned from the data source, or as parameters in INSERT statements.

Name Type Description
Code String

The code to use the discount.

AppliesOnEachItem Bool

If true, then the discount is applied to each of the entitled items. If false, then the amount is split across all of the entitled items.

DiscountAmount Decimal

The value of the discount.

ProductsToAdd String

A simple, comma-separated list of products IDs to add.

ProductsToRemove String

A simple, comma-separated list of products IDs to remove.

AddAllCustomers Bool

Whether all customers can use this discount.

CustomersToAdd String

A simple, comma-separated list of customers IDs to add.

CustomersToRemove String

A simple, comma-separated list of customers IDs to remove.

CustomerSegmentsToAdd String

A simple, comma-separated list of customers IDs to add.

CustomerSegmentsToRemove String

A simple, comma-separated list of customers IDs to remove.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839