TDV Adapter for Square

Build 23.0.8839

OrderDiscounts

The list of all discounts associated with the order.

Table Specific Information

Select

The adapter uses the Square API to process search criteria that refer to the OrderId and LocationId, while other filters are processed client side within the adapter.

Retrieve all the OrderDiscounts found in every order of your Square account.

SELECT * FROM OrderDiscounts

You can retrieve all order OrderDiscounts from an order by specifying the OrderId.

 SELECT * FROM OrderDiscounts WHERE OrderId = 'TzratjkPk9rhOuLYvSXeznmVvIx5PVlZpg72GfPQGBxckDeeWNBN8yqnf11qTrg3W3AelXC1kB' 

You can also use the IN operator to specify multiple OrderIds in the WHERE clause.

SELECT * FROM OrderDiscounts WHERE OrderId IN ('XKKB7LD30TpfNyW3e843ziklKh4vWEvweQyL5l4ESJLH3N2XXNBN8yqnf11qTrg3W3AelXC1kB', 'pxICohrEXPDtoUitiZhG1um5uhp5WI7CRMHknbuKpaj53PXfWNBN8yqnf11qTrg3W3AelXC1kB', '6j8avtXB5fIaPZ9H12beiZP7sCSiqguGhHpwmECsEaENswJnWNBN8yqnf11qTrg3W3AelXC1kB')

Columns

Name Type Description
Id String A unique ID that identifies the discount only within this order
LocationId String The Id of the location.
AppliedAmount Integer The amount of discount actually applied to the line item
AppliedCurrency String The type of currency, in ISO 4217 format
AmountMoneyAmount Integer The total declared monetary amount of the discount amount_money is not set for percentage-based discounts
AmountMoneyCurrency String The type of currency, in ISO 4217 format
Name String The discount's name
Percentage String The percentage of the discount
Scope String Indicates the level at which the discount applies

The allowed values are OTHER_DISCOUNT_SCOPE, LINE_ITEM, ORDER.

Type String The type of the discount

The allowed values are UNKNOWN_DISCOUNT, FIXED_PERCENTAGE, FIXED_AMOUNT, VARIABLE_PERCENTAGE, VARIABLE_AMOUNT.

CatalogObjectId String The catalog object ID
CatalogVersion Integer The version of the catalog object that this discount references

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
OrderId String The order's unique ID.

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