How to import Volume Discount offer with conditional logic - guide

Modified on Wed, 8 Jul at 8:55 AM

Overview

For Function Version Volume Offers, merchants can import Smart Rules directly using the "Sample with Conditions" template.

Please note this way of importing is advised only for merchants with advanced JSON knowledge. Otherwise, the suggested way is to import offers regularly without conditions, and then manually add conditions in app.


There are two import templates available:

Template

When to use

Sample without Conditions

Create offers without Smart Rules. Conditions can be added later from the app.

Sample with Conditions

Create offers along with Smart Rules in a single import.

Note: Export always includes Smart Rules columns.


Smart Rule Columns

The template contains three Smart Rule columns.

Column

Required

Accepted Values

Apply Match

Optional

all, any

Condition Sets

Optional

JSON Array

Suppression

Optional

JSON Object

If all three columns are blank, the offer is imported without Smart Rules.



Apply Match

Determines how multiple condition groups are evaluated.

Value

Description

all

Every condition group must match

any

At least one condition group must match


Supported Apply Conditions

Field

Operators

Value

customer_tag

is, is_not

Single tag

order_count

>=, <

Number

cart_subtotal

greater_than, less_than, between

Number

cart_quantity

greater_than, less_than, between

Number

geo_country

is, is_not

ISO country code(s)

market_country

is, is_not

ISO country code(s)

customer_type

first_order, repeat_customer

No value required


Supported Suppression Conditions

Suppression prevents a discount from being applied even if Apply conditions pass.

Supported fields:

Field

Operators

customer_tag

is

order_count

>=, <


Customer Tag Behavior

Scenario

Customer Tag = "is"

Customer Tag = "is not"

Guest Customer

Does not match

Matches

Logged-in customer with tag

Matches

Does not match

Logged-in customer without tag

Does not match

Matches


JSON Format

Apply Match

all

or

any


Condition Sets

Must be a JSON Array.

Example:

[

 {

   "match":"all",

   "conditions":[

     {

       "field":"customer_tag",

       "operator":"is",

       "value":"vip"

     }

   ]

 }

]


Suppression

Must be a JSON Object.

Example:

{

 "match":"any",

 "conditions":[

   {

     "field":"customer_tag",

     "operator":"is",

     "value":"employee"

   }

 ]

}


Valid ISO code

AC  AE  AF  AG  AI  AL    AM  AN  AO  AQ  AR  AS    AT  AU  AW  AZ  BA  BB

BD  BE  BF  BH  BI  BJ    BM  BN  BO  BR  BS  BT    BW  BY  BZ  CA  CF  CG

CH  CI  CK  CL  CM  CN    CO  CR  CS  CT  CU  CV    CX  CY  CZ  DE  DK  DM

DO  DZ  EC  EE  EG  EH    EK  EQ  ER  ES  ET  EV    FI  FJ  FK  FM  FO  FR

GA  GB  GD  GE  GF  GG    GH  GI  GL  GM  GN  GO    GP  GR  GS  GT  GU  GW

GY  HK  HN  HQ  HR  HT    HU  ID  IE  IL  IM  IN    IO  IQ  IR  IS  IT  JE

JM  JN  JO  JP  JQ  JU    KE  KG  KH  KI  KN  KS    KW  KY  KZ  LA  LB  LC

LI  LK  LR  LS  LT  LU    LV  LY  MA  MC  MD  MG    MH  MK  ML  MM  MN  MO

MP  MQ  MR  MS  MT  MU    MV  MW  MX  MY  MZ  NA    NC  NE  NF  NG  NI  NL

NO  NP  NR  NZ  OM  PA    PE  PF  PH  PK  PL  PM    PN  PR  PS  PT  PW  PY

QA  RE  RO  RS  RU  RW    SA  SB  SC  SD  SE  SG    SH  SI  SJ  SK  SL  SM

SO  SR  ST  SY  SZ  TD    TF  TG  TH  TJ  TK  TM    TN  TO  TR  TT  TV  TW

TZ  UA  UG  UN  US  UY    UZ  VA  VC  VE  VG  VN    VU  WF  WL  WS  XX  YE

YT  ZA  ZM  ZW



Import Tips

  • Use the Sample with Conditions template when importing Smart Rules.

  • Keep JSON in a single Excel cell.

  • Do not modify or reorder column headers.

  • Exported files can be imported back without changes.

  • Blank Smart Rule columns create offers without conditions.



Common Import Errors

Error

Reason

Invalid Condition Sets JSON

Invalid JSON format

Condition Sets must be a JSON array

Used object instead of array

Invalid Suppression JSON

Invalid JSON

Suppression must be a JSON object

Used array instead of object

Wrong template

Columns were modified


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article