Shopify

How to connect to Shopify?

Connect to Shopify using API Password

  1. Go to https://YOURSTORE.myshopify.com/admin/apps/private.

  2. Enable private development if it isn't enabled.

  3. Select the resources you want to allow access to. Acho only needs read-level access.

  4. The password under the Admin API section is what you'll use as the API Password for the integration

  5. On the next page, choose the tables that you want to sync. See here for more details on each table.

Install Acho in your Shopify Store (coming soon)

  1. Go to Acho App (coming soon) on Shopify App Store.

  2. Click "Add app" to install Acho App to your store.

  3. After installing Acho, you'll be redirected to Acho Studio. Sign in to Acho Studio if you haven't.

    • Resource Name: The name of the resource.

    • Start Date: The date you would like to start to retrieve data. The date should be entered in the format of YYYY-MM-DD, such as 2021-01-01.

  4. On the next page, choose the tables that you want to sync. See here for more details on each table.

  5. To confirm you have successfully installed Acho in your store. Log in to your store and select "App" on the side menu. You'll see Acho in one of your installed apps.

Connect to Shopify from Acho Studio (coming soon)

  1. Go to the Resources page and click the Add Resource button.

  2. In the "Select a data source" step, select Shopify under Apps.

  3. In the "Configure the data source" step, enter the following information:

    • Shop: The name of the Shopify store. Take a store URL, https://YOURSTORE.myshopify.com, as an example. The shop's name is "YOURSTORE".

    • Resource Name: The name of the resource.

    • Start Date: The date you would like to start to retrieve data. The date should be entered in the format of YYYY-MM-DD, such as 2021-01-01.

  4. On the next page, choose the tables that you want to sync. See here for more details on each table.

How to set up Data Sync?

Acho supports creating schedulers to retrieve the latest data from Shopify at a certain time interval. To see more details, you can visit here.

Available Data

For every third-party App integration, there are many tables that can be imported. Outside of the reference tables, here are some of the most used tables for your analytics.

Abandoned Checkouts

The Abandoned Checkouts table retrieves a list of abandoned or incomplete checkouts. A checkout is considered abandoned when a customer leaves the checkout after the first page without completing their purchase. Each Checkout object includes a URL to the online checkout, where the customer can complete their purchase.

Column Name

Description

id

The ID for the checkout.

abandoned_checkout_url

The recovery URL that's sent to a customer so they can recover their checkout.

billing_address

The mailing address that is associated with the payment method.

buyer_accepts_marketing

Whether the customer would like to receive email updates from the shop.

cart_token

The ID for the cart that's attached to the checkout.

closed_at

The date and time (ISO 8601 format) when the checkout was closed. If the checkout was not closed, then this value is null.

completed_at

The date and time (ISO 8601 format) when the checkout was completed. For abandoned checkouts, this value is null until a customer completes the checkout using the recovery URL.

created_at

The date and time (ISO 8601 format) when the checkout was created.

currency read-only

The three-letter code (ISO 4217 format) of the shop's default currency at the time of checkout. For the currency that the customer used at checkout, see presentment_currency.

customer

Information about the customer. For more information, see the Customer resource.

customer_locale

The two or three-letter language code, optionally followed by a region modifier. Example values: en, en-CA.

device_id

The ID of the Shopify POS device that created the checkout.

discount_codes

Discount codes that is applied to the checkout. Returns an empty array when no codes are applied. Each discount code has the following fields: - amount: The amount of the discount in presentment currency. - code: The discount code. - type: The type of discount. Valid values: percentage, shipping, fixed_amount. (default: fixed_amount)

email

The customer's email address.

gateway

The payment gateway that is used by the checkout. For abandoned checkouts, this value is always null.

landing_site

The URL for the page where the customer entered the shop.

line_items

A list of line items, each containing information about an item in the checkout.

location_id

The ID of the physical location where the checkout was processed.

note

The text of an optional note that a shop owner can attach to the order.

phone

The customer's phone number for receiving SMS notifications.

presentment_currency

The three-letter code (ISO 4217 format) of the currency that the customer used at checkout. For the shop's default currency, see currency.

referring_site

The website that is referred the customer to the shop.

shipping_address

The mailing address where the order will be shipped to.

shipping_lines

Information about the chosen shipping method.

source_name

Where the checkout originated. Valid values are "web", "pos", "iphone", and "android"

subtotal_price

The price of the checkout in presentment currency before shipping and taxes.

tax_lines

An array of tax line objects, each of which details a tax applicable to the checkout.

taxes_included

Whether taxes are included in the price.

token

A unique ID for a single checkout.

total_discounts

The total amount of discounts to be applied in presentment currency.

total_duties

The total duties of the checkout in presentment currency.

total_line_items_price

The sum of the prices of all line items in the checkout in presentment currency.

total_price

The sum of line item prices, all discounts, shipping costs, and taxes for the checkout in presentment currency.

total_tax

The sum of all the taxes applied to the checkout in presentment currency.

total_weight

The sum of all the weights in grams of the line items in the checkout.

updated_at

The date and time (ISO 8601 format) when the checkout was last modified.

user_id

The ID of the user who created the checkout.

Collects

The Collect table shows the connection between a product and a custom collection. A collection is a grouping of products that merchants can create to make their stores easier to browse. For every product in a custom collection, there is a collect that tracks the ID of both the product and the custom collection. A product can be in more than one collection and will have a collect connecting it to each collection.

Column Name

Description

id

The ID for the custom collection.

position

The position of this product in a manually sorted custom collection. The first position is 1. This value is applied only when the custom collection is sorted manually.

created_at

The position of this product in a manually sorted custom collection. The first position is 1. This value is applied only when the custom collection is sorted manually.

product_id

The unique numeric identifier for the product in the custom collection.

sort_value

This is the same value as position but padded with leading zeroes to make it alphanumeric-sortable. This value is applied only when the custom collection is sorted manually.

updated_at

The date and time (ISO 8601 format) when the collect was last updated.

collection_id

The ID of the custom collection containing the product.

Custom Collections

The Custom Collections table shows all the information for each custom collection. A custom collection is a grouping of products that a merchant can create to make their store easier to browse. The merchant creates a custom collection and then selects the products that will go into it.

Column Name

Description

id

The ID for the custom collection.

image

Image associated with the custom collection.

title

The name of the custom collection. (limit: 255 characters)

handle

A human-friendly unique string for the custom collection that is automatically generated from its title. This is used in shop themes by the Liquid templating language to refer to the custom collection.

body_html

The description of the custom collection, complete with HTML markup. Many templates display this on their custom collection pages.

sort_order

The order in which products in the custom collection appear. Possible values are alpha-asc, alpha-desc, best-selling, created, created-desc, manual, price-asc, and price-desc

updated_at

The date and time (ISO 8601 format) when the custom collection was last modified.

published_at

The time and date (ISO 8601 format) when the collection was made visible. Returns null for a hidden custom collection.

published_scope

Whether the collection is published to the Point of Sale channel. Possible values are web and global

template_suffix

The suffix of the liquid template being used. For example, if the value is custom, then the collection is using the collection.custom.liquid template. If the value is null, then the collection is using the default collection.liquid.

Custom Collections Image

Image information associated with a specific custom collection.

Column Name

Description

alt

Alternative text that describes the collection image.

src

The source URL that specifies the location of the image.

width

The width of the image in pixels.

height

The height of the image in pixels.

created_at

The time and date (ISO 8601 format) when the image was added to the collection.

Customers

The Customer resource stores information about a shop's customers, such as their contact details, their order history, the status of a customer's account, and whether they've agreed to receive email marketing.

Column Name

Description

id

A unique identifier for the customer.

note

A note about the customer.

tags

Tags that the shop owner has attached to the customer, formatted as a string of comma-separated values. A customer can have up to 250 tags. Each tag can have up to 255 characters.

email

The unique email address of the customer.

phone

The unique phone number (E.164 format) for this customer. Valid formats are: 6135551212, +16135551212, (613)555-1212, +1 613-555-1212

state

The state of the customer's account with a shop. Possible values are "disabled" (default), "invited", "enabled", and "declined".

currency

The three-letter code (ISO 4217 format) for the currency that the customer used when they paid for their last order.

addresses

A list of the ten most recently updated addresses for the customer.

last_name

The customer's last name.

created_at

The date and time (ISO 8601 format) when the customer was created.

first_name

The customer's first name.

tax_exempt

Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout.

updated_at

The date and time (ISO 8601 format) when the customer information was last updated.

total_spent

The total amount of money that the customer has spent across their order history.

orders_count

The number of orders associated with this customer.

last_order_id

The ID of the customer's last order.

verified_email

Whether the customer has verified their email address.

default_address

The default address for the customer.

last_order_name

The name of the customer's last order. This is directly related to the name field on the Order resource.

accepts_marketing

Whether the customer has consented to receive marketing material via email.

accepts_marketing_updated_at

The date and time (ISO 8601 format) when the customer consented or objected to receiving marketing material by email. Set this value whenever the customer consents or objects to marketing materials.

multipass_identifier

A unique identifier for the customer that's used with Multipass login.

Customer Address

The Customer Address resource represents stores the addresses that a customer has entered. Each customer can have multiple addresses associated with them.

Column Name

Type

Description

id

Integer

A unique identifier for the customer.

zip

String

The customer’s postal code, also known as zip, postcode, Eircode, etc.

city

String

The customer's city, town, or village.

name

String

The customer’s first and last names.

phone

String

The customer’s phone number at this address.

company

String

The customer’s company.

country

String

The customer's country.

default

Boolean

Whether the address is the default address.

address1

String

The customer's mailing address

address2

String

An additional field for the customer's mailing address.

province

String

The customer’s region name. Typically a province, a state, or a prefecture.

last_name

String

The customer’s last name.

first_name

String

The customer’s first name.

country_name

String

The customer’s normalized country name.

province_code

Sting

The two-letter code for the customer’s region.

Draft Orders

Draft Orders allow merchants to manually create orders on behalf of customers. The order is saved as a draft in the Shopify admin until it's marked as completed.

Column Name

Description

id

The ID of the draft order.

name

Name of the draft order.

note

The text of an optional note that a shop owner can attach to the draft order.

tags

A comma-separated list of additional short descriptors, commonly used for filtering and searching.

email

The customer's email address.

status

The status of a draft order as it transitions into an order. When a draft order is created it is set to open status. The invoice can then be sent to the customer, and status changes to invoice_sent. The draft order can then be paid, set to pending, or paid by credit card. In each case, the draft order is set to completed and an order is created. After a draft order is set to completed the only further modifications that can be made are adding tags or metafields. Valid values are open, invoice_sent, and completed.

currency

The three letter code (ISO 4217 format) for the currency used for the payment.

customer

Information about the customer.

order_id

The ID of the order that is created and associated with the draft order after the draft order is completed.

tax_lines

An array of tax line objects, each of which details a tax applicable to the order.

created_at

The date and time (ISO 8601 format) when the order was created in Shopify.

line_items

Product variant line item or custom line item associated to the draft order. Each draft order must include at least one line_item.

tax_exempt

Whether taxes are exempt for the draft order. If set to false, then Shopify refers to the taxable field for each line_item. If a customer is applied to the draft order, then Shopify uses the customer's tax_exempt field instead.

updated_at

The date and time (ISO 8601 format) when the order was last modified.

invoice_url

The URL for the invoice.

total_price

The sum of all the prices of all the items in the order, taxes, and discounts included.

completed_at

The date and time (ISO 8601 format) when the order is created and the draft order is completed.

shipping_line

ObjectA shipping_line object, which details the shipping method used.

taxes_included

Whether taxes are included in the order subtotal. Valid values are true or false.

billing_address

The mailing address that is associated with the payment method. This address is an optional field that won't be available on orders that do not require a payment method.

invoice_sent_at

The date and time (ISO 8601 format) when the invoice was emailed to the customer.

note_attributes

Extra information that is added to the order. Appears in the Additional details section of an order details page. Each array entry must contain a hash with name and value keys.

shipping_address

The mailing address to where the order will be shipped. This address is optional and will not be available on orders that do not require shipping.

applied_discount

The discount that is applied to the line item or the draft order object. Each draft order object can have one applied_discount object and each draft order line item can have its own applied_discount.

tax_exemptions

Whether the customer is exempt from paying specific taxes on their order.

total_tax

The sum of all the taxes applied to the order.

subtotal_price

The price of the order before shipping and taxes.

Discount Codes

The Discount Codes table retrieves information for each discount code, which can be entered at the checkout to apply the discount.

Column Name

Description

id

The ID for the discount code.

code

The case-insensitive discount code that customers use at checkout.

created_at

The date and time (ISO 8601 format) when the discount code was created.

updated_at

The date and time (ISO 8601 format) when the discount code was updated.

price_rule_id

The ID for the price rule that this discount code belongs to.

usage_count

The number of times that the discount code has been redeemed.

Order

The Order table retrieves information about orders for a store. Each order is a record of a complete purchase that includes details of the customer, their cart, and any transactions.

Column Name

Description

id

The ID of the order, used for API purposes. This is different from the order_number property, which is the ID used by the shop owner and customer.

app_id

The ID of the app that created the order.

billing_address

The mailing address that is associated with the payment method. This address is an optional field that won't be available on orders that do not require a payment method.

browser_ip

The IP address of the browser used by the customer when they placed the order.

buyer_accepts_marketing

Whether the customer consented to receive email updates from the shop.

cancel_reason

The reason why the order was canceled. Possible values are customer, fraud, inventory, declined, or other.

cart_token

The ID of the cart that's associated with the order.

checkout_token

A unique value when referencing the checkout that's associated with the order.

client_details

Information about the browser that the customer used when they placed their order.

closed_at

The date and time (ISO 8601 format) when the order was closed.

created_at

The autogenerated date and time (ISO 8601 format) when the order was created in Shopify. The value of this property cannot be changed.

currency

The three-letter code (ISO 4217 format) for the shop currency.

customer_locale

The two or three-letter language code, optionally followed by a region modifier.

email

The customer's email address.

financial_status

The status of payments associated with the order. Can only be set when the order is created.

fulfillment_status

The order's status in terms of fulfilled line items.

landing_site

The URL for the page where the buyer landed when they entered the shop.

name

The order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings. This is different from the id property, which is the ID of the order used by the API.

number

For internal use only. Each ID is unique to the shop. Numbers are sequential and start at 1000.

order_number

The order's position in the shop's count of orders starting at 1001. Order numbers are sequential and start at 1001.

order_status_url

The URL pointing to the order status web page, if applicable.

phone

The customer's phone number for receiving SMS notifications.

presentment_currency

The presentment currency that was used to display prices to the customer.

processed_at

The date and time (ISO 8601 format) when an order was processed.

processing_method

How the payment was processed.

referring_site

The website where the customer clicked a link to the shop.

source_name

Where the order originated. Can be set only during order creation, and is not writeable afterward.

subtotal_price

The price of the order in the shop currency after discounts but before shipping, taxes, and tips.

taxes_included

Whether taxes are included in the order subtotal.

test

Whether this is a test order.

token

A unique token for the order.

total_discounts

The total discounts that are applied to the price of the order in the shop currency.

total_line_items_price

The sum of all line item prices in the shop currency.

total_price

The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.

total_tax

The sum of all the taxes applied to the order in the shop currency. Must be positive.

total_tip_received

The sum of all the tips in the order in the shop currency.

total_weight

The sum of all line item weights in grams.

updated_at

The date and time (ISO 8601 format) when the order was last modified.

billing_address

The mailing address that is associated with the payment method. This address is an optional field that won't be available on orders that do not require a payment method.

cancel_reason

The reason why the order was canceled.

cancelled_at

The date and time ( ISO 8601 format) when the order was canceled.

client_details

Information about the browser that the customer used when they placed their order.

current_total_discounts

The current total discounts on the order in the shop currency. The value of this field reflects order edits, returns, and refunds.

current_total_discounts_set

The current total discounts on the order in the shop currency. The value of this field reflects order edits, returns, and refunds.

current_total_price

The current total price of the order that is presented in the shop currency. The value of this field reflects order edits, returns, and refunds.

current_total_price_set

The current total price of the order in shop and presentment currencies. The amount values associated with this field reflect order edits, returns, and refunds.

current_subtotal_price

The current subtotal price of the order that is presented in the shop currency. The value of this field reflects order edits, returns, and refunds.

current_subtotal_price_set

The current subtotal price of the order in shop and presentment currencies. The amount values associated with this field reflect order edits, returns, and refunds.

current_total_tax

The current total taxes charged on the order that is presented in the shop currency. The value of this field reflects order edits, returns, or refunds.

current_total_tax_set

The current total taxes charged on the order in shop and presentment currencies. The amount values associated with this field reflect order edits, returns, and refunds.

customer

Information about the customer. The order might not have a customer and apps should not depend on the existence of a customer object. This value might be null if the order was created through Shopify POS.

discount_applications

An ordered list of stacked discount applications.

discount_codes

A list of discounts that are applied to the order.

fulfillments

A list of fulfillments associated with the order.

line_items

A list of line item objects, each containing information about an item in the order.

location_id

The ID of the physical location where the order was processed. This property refers to the POS location. location_id will always be set to null for online orders.

note

An optional note that a shop owner can attach to the order.

note_attributes

Extra information that is added to the order. Appears in the Additional details section of an order details page. Each array entry must contain a hash with name and value keys.

original_total_duties_set

The original total duties charged on the order in shop and presentment currencies.

payment_details

An object containing information about the payment.

payment_gateway_names

The list of payment gateways used for the order.

refunds

A list of refunds applied to the order.

shipping_address

The mailing address to where the order will be shipped. This address is optional and will not be available on orders that do not require shipping.

shipping_lines

An array of objects, each of which details a shipping method used.

subtotal_price_set

The subtotal of the order in shop and presentment currencies.

tags

Tags attached to the order, formatted as a string of comma-separated values. Tags are additional short descriptors, commonly used for filtering and searching. Each individual tag is limited to 40 characters in length.

tax_lines

An array of tax line objects, each of which details a tax applicable to the order.

total_discounts_set

The total discounts that are applied to the price of the order in shop and presentment currencies.

total_line_items_price_set

The total of all line item prices in shop and presentment currencies.

total_outstanding

The total outstanding amount of the order hat is presented in the shop currency.

total_price_set

The total price of the order in shop and presentment currencies.

total_shipping_price_set

The total shipping price of the order, excluding discounts and returns, in shop and presentment currencies. If taxes_included is set to true, then total_shipping_price_set includes taxes.

total_tax_set

The total tax applied to the order in shop and presentment currencies.

user_id

The ID of the user logged into Shopify POS who processed the order, if applicable.

Order Risk

Order risks show the results of fraud checks that have been completed on an order and display a fraud analysis and recommendations on the details page of an order.

Column Name

Description

id

A unique numeric identifier for the order risk.

cause_cancel

Whether this order risk is severe enough to force the cancellation of the order. If true, then this order risk is included in the Order canceled message that's shown on the details page of the canceled order.

checkout_id

The ID of the checkout that the order risk belongs to.

display

Whether the order risk is displayed on the order details page in the Shopify admin. If false, then this order risk is ignored when Shopify determines your app's overall risk level for the order.

message

The message that's displayed to the merchant to indicate the results of the fraud check. The message is displayed only if display is set totrue.

order_id

The ID of the order that the order risk belongs to.

recommendation

The recommended action given to the merchant. Valid values are cancel, investigate, and accept.

score

For internal use only. A number between 0 and 1 that's assigned to the order. The closer the score is to 1, the more likely it is that the order is fraudulent.

source

The source of the order risk.

Refund

The Refund table show information about refunds for each order. Each refund is a record of money being returned to the customer. Use the calculate endpoint to make sure that any refund that you create is accurate.

Column Name

Description

id

The unique identifier for the refund.

created_at

The date and time (ISO 8601 format) when the refund was created.

duties

A list of duties that have been returned as part of the refund.

note

An optional note attached to a refund.

order_adjustments

A list of order adjustments attached to the refund. Order adjustments are generated to account for refunded shipping costs and differences between calculated and actual refund amounts.

processed_at

The date and time (ISO 8601 format) when the refund was imported. This value can be set to a date in the past when importing from other systems. If no value is provided, then it will be auto-generated as the current time in Shopify.

refund_duties

A list of refunded duties.

refund_line_items

A list of refunded line items.

transactions

A list of transactions involved in the refund. For more information, see the Transaction resource.

user_id

The unique identifier of the user who performed the refund.

Transaction

The Transaction table shows all the information for each transaction. Transactions are created for every order that results in an exchange of money.

Column Name

Description

id

The ID for the transaction.

amount

The amount of money included in the transaction.

authorization

The authorization code associated with the transaction.

authorization_expires_at

The date and time (ISO 8601 format) when the Shopify Payments authorization expires.

created_at

The date and time (ISO 8601 format) when the transaction was created.

currency

The three-letter code (ISO 4217 format) for the currency used for the payment.

device_id

The ID for the device.

error_code

A standardized error code, independent of the payment provider.

extended_authorization_attributes

The attributes associated with a Shopify Payments extended authorization period.

gateway

The name of the gateway the transaction was issued through. A list of gateways can be found on Shopify's payment gateways page.

kind

The transaction's type. Valid values are authorization, capture, sales, void, and refund.

location_id

The ID of the physical location where the transaction was processed.

message

A string generated by the payment provider with additional information about why the transaction succeeded or failed.

order_id

The ID for the order that the transaction is associated with.

payment_details

Information about the credit card used for this transaction.

parent_id

The ID of an associated transaction.

processed_at

The date and time (ISO 8601 format) when a transaction was processed. This value is the date that's used in the analytic reports. By default, it matches the created_at value. If you're importing transactions from an app or another platform, then you can set processed_at to a date and time in the past to match when the original transaction was processed.

receipt

A transaction receipt attached to the transaction by the gateway. The value of this field depends on which gateway the shop is using.

source_name

The origin of the transaction. This is set by Shopify and can't be overridden. Example values: web, pos, iphone, and android.

status

The status of the transaction. Valid values: pending, failure, success, and error.

test

Whether the transaction is a test transaction.

user_id

The ID for the user who was logged into the Shopify POS device when the order was processed, if applicable.

currency_exchange_adjustment

An adjustment on the transaction showing the amount lost or gained due to fluctuations in the currency exchange rate.

Product

The Product table retrieves information about a store's products, which are the individual items and services for sale in the store.

Column Name

Description

id

A unique identifier for the product. Each id is unique across the Shopify system. No two products will have the same id, even if they're from different shops.

body_html

A description of the product. Supports HTML formatting.

created_at

The date and time (ISO 8601 format) when the product was created.

handle

A unique human-friendly string for the product. Automatically generated from the product's title.

image

A list of product image objects, each one representing an image associated with the product.

options

The custom product properties. For example, Size, Color, and Material. Each product can have up to 3 options and each option value can be up to 255 characters. Product variants are made of up combinations of option values. Options cannot be created without values.

product_type

A categorization for the product used for filtering and searching products.

published_at

The date and time (ISO 8601 format) when the product was published.

published_scope

Whether the product is published to the Point of Sale channel.

status

The status of the product. Valid values are active, archived, or draft.

tags

A string of comma-separated tags that are used for filtering and search.

template_suffix

The suffix of the Liquid template used for the product page. If this property is specified, then the product page uses a template called "product.suffix.liquid", where "suffix" is the value of this property. If this property is "" or null, then the product page uses the default template "product.liquid". (default: null)

title

The name of the product.

updated_at

The date and time (ISO 8601 format) when the product was last modified.

variants

An array of product variants, each representing a different version of the product.

vendor

The name of the product's vendor.

Page

The Page table retrieves information and contents about web pages for an online store, such as an About us page, a Contact us page, or a page with customer testimonials.

Column Name

Description

id

The unique numeric identifier for the page.

author

The name of the person who created the page.

body_html

The text content of the page, complete with HTML markup.

created_at

The date and time (ISO 8601 format) when the page was created.

handle

A unique, human-friendly string for the page, generated automatically from its title. In online store themes, the Liquid templating language refers to a page by its handle.

metafield

Additional information attached to the Page object. For more information on attaching metadata to Shopify resources, see the Metafield resource.

published_at

The date and time (ISO 8601 format) when the page was published. Returns null when the page is hidden.

shop_id

he ID of the shop to which the page belongs.

template_suffix

The suffix of the Liquid template being used. For example, if the value is contact, then the page is using the page.contact.liquid template. If the value is an empty string, then the page is using the default page.liquid template.

title

he page's title.

updated_at

The date and time (ISO 8601 format) when the page was last updated.

PriceRule

The PriceRule table is to define the logic for a discount. Using the PriceRule resource, you can create discounts that specify a discount as a percentage, a fixed amount, or free shipping.

Column Name

Description

id

The ID for the price rule.

allocation_method

The allocation method of the price rule. Valid values: - each : The discount is applied to each of the entitled items. - across: The calculated discount amount will be applied across the entitled items. * Note: When the value of target_type is shipping_line, then this value must be each.

created_at

The date and time (ISO 8601 format) when the price rule was created.

updated_at

The date and time (ISO 8601 format) when the price rule was updated.

customer_selection

The customer selection for the price rule. Valid values: - all: The price rule is valid for all customers. - prerequisite: The customer must either belong to one of the customer saved searches specified by prerequisite_saved_search_ids, or be one of the customers specified by prerequisite_customer_ids.

ends_at

The date and time (ISO 8601 format) when the price rule ends. Must be after starts_at.

entitled_collection_ids

A list of IDs of collections whose products will be eligible to the discount. It can be used only with target_type set to line_item and target_selection set to entitled. It can't be used in combination with entitled_product_ids or entitled_variant_ids.

entitled_country_ids

A list of IDs of shipping countries that will be entitled to the discount. It can be used only with target_type set to shipping_line and target_selection set to entitled.

entitled_product_ids

A list of IDs of products that will be entitled to the discount. It can be used only with target_type set to line_item and target_selection set to entitled.

entitled_variant_ids

A list of IDs of product variants that will be entitled to the discount. It can be used only with target_type set to line_item and target_selection set to entitled.

once_per_customer

Whether the generated discount code will be valid only for a single use per customer. This is tracked using customer ID.

prerequisite_customer_ids

A list of customer IDs. For the price rule to be applicable, the customer must match one of the specified customers. Notice that if prerequisite_customer_ids is populated, then prerequisite_saved_search_ids must be empty.

prerequisite_quantity_range

The minimum number of items for the price rule to be applicable.

prerequisite_saved_search_ids

A list of customer saved search IDs. For the price rule to be applicable, the customer must be in the group of customers matching a customer saved search. Notice that if prerequisite_saved_search_ids is populated, then prerequisite_customer_ids must be empty.

prerequisite_shipping_price_range

The maximum shipping price for the price rule to be applicable.

prerequisite_subtotal_range

The minimum subtotal for the price rule to be applicable.

prerequisite_to_entitlement_purchase

The prerequisite purchase for a "Buy X Get Y" discount.

starts_at

The date and time (ISO 8601 format) when the price rule starts.

target_selection

The target selection method of the price rule. Valid values: - all: The price rule applies the discount to all line items in the checkout. - entitled: The price rule applies the discount to selected entitlements only.

target_type

The target type that the price rule applies to. Valid values: - line_item: The price rule applies to the cart's line items. - shipping_line: The price rule applies to the cart's shipping lines.

title

The title of the price rule. This is used by the Shopify admin search to retrieve discounts. It is also displayed on the Discounts page of the Shopify admin for bulk discounts. For non-bulk discounts, the discount code is displayed on the admin.

usage_limit

The maximum number of times the price rule can be used, per discount code.

prerequisite_product_ids

List of product ids that will be a prerequisites for a Buy X Get Y type discount.

prerequisite_variant_ids

List of variant ids that will be a prerequisites for a Buy X Get Y type discount.

prerequisite_collection_ids

List of collection ids that will be a prerequisites for a Buy X Get Y discount.

value

The value of the price rule. If if the value of target_type is shipping_line, then only -100 is accepted. The value must be negative.

value_type

The value type of the price rule. Possible values are fixed_amount and percentage. If target_type is shipping_line, then only percentage is accepted.

prerequisite_to_entitlement_quantity_ratio

Buy/Get ratio for a Buy X Get Y discount. prerequisite_quantity defines the necessary 'buy' quantity and entitled_quantity the offered 'get' quantity.

allocation_limit

The number of times the discount can be allocated on the cart - if eligible. This is only working with Buy X Get Y discount. The default value on creation will be null , which means an unlimited number of allocations.

Last updated