Shopify · Create a discount code — A code for a percentage or an amount off the order — makes a code customers type at checkout. Use it to send a new customer a welcome code, or a code of their own after a complaint.

Who can do this

Workspace Admins and Editors, on every plan. Viewers see the step's settings but cannot change them.

Before you start

A Shopify connection with the discounts permissions — see Connect Shopify.

Steps

  1. Select + where the step should go. In the step picker, open Apps, select Shopify, then Create a discount code.
  2. In Connection, choose your Shopify connection.
  3. In Code, what customers type — DIWALI15. For a code of the customer's own, use a value from an earlier step, such as WELCOME- followed by their id.
  4. In Off, choose A percentage or An amount.
  5. In Value, 15 — 15 for 15%, or the amount off in the store's currency.
  6. Optional: in Uses, how many times the code can be used in all — Optional — how many times in all. Empty: no limit.
  7. Optional: switch on Once per customer.
  8. Select Run this step to try it. This makes a real code in the store.

Output

Field What it is
code The code, as Shopify saved it.
id Shopify's id for the code.
priceRuleId The discount it belongs to in Shopify.
valueType percentage or fixed_amount.
value The value as Shopify keeps it — negative, such as -15.0.

Good to know

  • Each run makes a new discount in Shopify, named after the code, with one code in it. It shows under Discounts in Shopify admin.
  • It applies to the whole order, for every product and every customer, and starts the moment it is made. It has no end date — end it in Shopify when it should stop.
  • An amount is taken off the order once, shared across its items.
  • Codes are unique. Shopify refuses a code the store already has.

If something goes wrong

What you see Why What to do
Value is not a number above zero. Value is empty, zero, or has a sign or a word in it. Type a number — 15, not 15% or ₹ 15.
A percentage discount cannot be over 100. A percentage with a value over 100. Use 100 or less, or choose An amount.
Shopify refused: code must be unique. … The store has a code like this already. Use another code — add the customer's id or the date.
Code is empty when the step ran — an earlier step may not have given the value it names. The value came out empty. Check the value it reads.
Shopify refused: … Check the connection's details on Connections. The app does not have the discounts permission. See Connect Shopify.