Akinon Release Notes (05/12/2025) are now live! Click here to learn what's new.
LogoLogo
API Reference
  • Home
  • Quick Start
  • Tutorials
  • Technical Guides
  • Release Notes
  • Glossary
  • Welcome to Akinon Technical Guides
  • ACC
    • ACC CLI
    • Create Application via CLI
    • Deploy Environment Variables
    • App Store for Developers
  • Omnitron
    • Product Types
    • Product Categorization
    • Splitting a Merged Order Item
  • Commerce
    • Shipping Rules Calculator
    • Data Source Shipping Options
    • Attribute Based Shipping Options
    • Filtering Products
    • Conversation & Messages
    • Sitemap Configuration
    • Weight-Based Product Sales
    • Group Attribute Sets
    • Contract Management
    • Find in Store for Whippy Ware
    • Plugins
    • Remote Price
    • E-mail Templates
    • Loyalty Accounts
    • Search Structure
    • User Segmentation & Rules
    • Promotions
  • OMS
    • Getting Started with OMS
    • Basic Setup
    • Scenarios
    • Capacity Feature
    • Package Management
      • Packages
      • Transfer
      • States
    • Commands
      • Packages
        • Package Command Parameters
        • DeAllocate Package Reservations Command
        • Channel Based Complete Packaging without Shipment Command
        • Complete Packaging with Shipment Command
        • Complete Packaging without Shipment Command
        • Package Refuse with Denial Reason Command
        • Product Not Found & Wrong Product Command
        • Product Not Found & Wrong Product Command Advanced
        • Package Packed for Refund Command
        • Block The Package For Action Command
        • Unblock the Package For Action Command
        • Update The Package’s Invoice
        • Manual Planning Command
      • Transfer
        • Transfer Order Advanced Command
        • Product for Transfer Not Found & Wrong Product Command
        • Transfer Delivered Command
        • Transfer Dispatch Command
        • Transfer Ready for Dispatch Command
        • Transfer Out Of Stock
      • Shipment
        • Shipment Order Command
        • Package Advanced Shipment Command
        • Ship The Package Command
        • Ship The Package without Shipment Integration Command
        • Update The Package’s Shipment Status Command
        • Update Shipment Info of Package Command
    • Inventory Locations & Engine
      • Properties & Domain Relation
      • Customization
      • Inventory Engine
    • Fulfillment
      • Shipments
      • Invoice Integration
    • Webhooks
      • Webhook Examples
        • Order Webhook
        • Package Webhook
        • Shipment Webhook
        • Stock Location Webhook
        • Transfer Webhook
    • Integrating OMS with Seller Center
  • Instore
    • Getting Started
    • Cash Register Integration
    • OTP (One Time Password) Process
    • Services
      • Password Reset Services
  • Marketplace Dashboard
    • N11 Marketplace Setup Configurations
    • Trendyol Marketplace Setup Configurations
    • Walmart Marketplace Setup Configurations
    • Amazon Marketplace Setup Configurations
    • Hepsiburada Marketplace Setup Configurations
  • Project Zero
    • Django
      • Basic Setup
      • Project Structure
        • Templates & Components
        • Private Dependencies
        • Omnife Project Submodule
        • Webpack
        • ESLint Rules
        • Bundles
        • Multilanguage & Translation
        • Environmental File
        • Custom Error Pages
        • Icon Font
      • Page Types
        • Static Pages & Flatpages
        • Account Page
          • Template Rendering in Account Pages
          • Forms & Validation
        • Basket Page
          • Redux Basket State
          • Basket Page - View
        • Checkout
          • Redux Checkout State
          • View & Template Rendering
          • Masking & Validation
      • Theming & Styling
      • Widgets
      • SEO Management
      • Extending Project Zero
    • Next.js
      • Basic Setup
      • Deployment
      • Static Assets
      • Plugins
      • Widgets
      • Icons
      • Localization
      • SEO Management
      • Advanced Usage
      • Data Fetching
        • Client
          • Account
          • Address
          • Basket
          • Checkout
          • Misc
          • Product
          • User
          • Wishlist
        • Server
          • Category
          • Flat Page
          • List
          • Menu
          • Product
          • SEO
          • Special Page
          • Widget
  • App Maker
    • Setup Your Environment
    • Plugin Quickstart
    • Create Project
    • Setup Existing Project
    • Deploy Project
    • Users and Roles
    • Add Public Key
    • App Maker CLI
    • Create App on Stores
      • Creating App on Apple App Store
      • Creating App on Google Play Store
    • Mobile App Framework
      • Configuration
      • Framework
      • Project Structure
        • Structure
        • Data Containers
        • Pages
      • Dependency Integration
        • Plugins
        • Akinon Plugin Adapter
  • Akifast
    • HPP
      • Getting Started
      • Authorization
      • Payment Session Creation
        • Key Points Before Creating a Payment Session
        • Creating Payment Session
        • Redirecting to the Payment Page
        • Errors Encountered During Payment Session Creation
      • Merchant Services
        • Shipping Query URL
        • Agreement Query URL
        • Other URLs
  • B2B
    • Getting Started
    • B2B Setup
  • Adds-on
    • Invoicer
      • Introduction
      • Invoice & Pay On Delivery Service
  • Channel App Template
    • Introduction
    • Installation and Usage
    • Development Steps
      • Folder Structure
      • Starting Step
      • Encoding the Sales Channel
        • Introduction
        • Setup
        • Products
        • Product Price
        • Product Stock
        • Product Image
        • Orders
        • Product Data
      • Adding a New Command to Akinon
      • Listening for External Requests
    • Architecture
      • Introduction
      • Integration
      • Services (Flows)
        • Introduction
        • Product Service
        • Price Service
        • Stock Service
        • Image Service
        • Order Service
  • Multi Regional Settings
    • Multi Regional Settings
Powered by GitBook

© 2025 Akinon. All rights reserved.

On this page
  • Rule Structure and Shipping Option Rules
  • Calculators for Determining Fees for Shipping Options

Was this helpful?

  1. Commerce

Shipping Rules Calculator

Rule Structure and Shipping Option Rules

The rule structure is a flexible framework that generates results by applying 'and', 'or', and 'not' logic operations on specially crafted sets of rules, where an unlimited number of nested sub-rules can be written. While 'or' and 'and' rules should have a 'children' field, the 'not' rule should have a 'child' field. Each special rule also has different fields that it needs to have.

{
   "children": [
    {
      ...(rule1)
    },
    {
      "children": [
        {
          "child": {
            ...(rule2)
          },
          "name": "Not Rule",
          "slug": "not-rule"
        },
        {
          "child": {
            ...(rule3)
          },
          "name": "Not Rule",
          "slug": "not-rule"
        }
      ],
      "name": "And Rule",
      "slug": "and-rule"
    }
  ],
  "name": "Or Rule",
  "slug": "or-rule"
}

The logical equivalent of the above rule structure can be expressed as:

(rule1 or ((not rule2) and (not rule3)))

This means the shipping option with this rule structure will be shown if either rule1 is satisfied or both rule2 and rule3 are not satisfied simultaneously.

WeightRule

A rule that checks if the individual weights of all items in the cart are less than or equal to the specified maximum value.

{ 
"weight_field": "the product attribute name containing the weight value",
  "max_weight": 10 (maximum product weight value), 
  "name": "Weight Rule",
  "slug": "weight-rule"
}

HeightRule

A rule that ensures the individual lengths of all items in the cart are less than or equal to the specified maximum value.

{  
  "height_field": "the product attribute name containing the height value",
  "max_height": 10 (maximum product height value),
  "name": "Weight Rule",
  "slug": "Weight-rule"
}

CityRule

Allows for the creation of a rule based on the city information of the shipping address. If shipping is desired to specific cities listed in the 'cities' field, the 'exclude' field can be removed from the rule. If this field is set to True, shipping will be done to cities outside the specified city list. The IDs correspond to the city IDs in the database.

{
  "cities": [
    id1,
    id2
  ],
  "exclude": True,
  "name": "City Rule",
  "slug": "City-rule"
}

CountryRule

Enables the creation of a rule based on the country information of the shipping address. If shipping is desired to specific countries listed in the 'countries' field, the 'exclude' field can be removed from the rule. If this field is set to True, shipping will be done to countries outside the specified country list. The IDs correspond to the country IDs in the database.

{
  "countries": [
    "id1",
    "id2"
  ],
  "exclude": true,
  "name": "Country Rule",
  "slug": "Country-rule"
}

TownshipRule

Facilitates the creation of a rule based on the district information of the shipping address. If shipping is desired to specific districts listed in the 'townships' field, the 'exclude' field can be removed from the rule. If this field is set to True, shipping will be done to districts outside the specified district list. The IDs correspond to the district IDs in the database.

{
  "townships": [
    id1,
    id2
  ],
  "exclude": True,
  "name": "Township Rule",
  "slug": "Township-rule"
}

DistrictRule

Allows for the creation of a rule based on the neighborhood information of the shipping address. If shipping is desired to specific neighborhoods listed in the 'districts' field, the 'exclude' field can be removed from the rule. If this field is set to True, shipping will be done to neighborhoods outside the specified neighborhood list. The IDs correspond to the neighborhood IDs in the database.

{
  "townships": [
    id1,
    id2
  ],
  "exclude": True,
  "name": "Township Rule",
  "slug": "Township-rule"
}

TimeRule

Enables the determination of the time interval during which the shipping option will be available.

{
  "start_time": "baslangic saati",
  "end_time": "bitis saati",
  "name": "Time Rule",
  "slug": "time-rule"
}

DayOfWeekRule

Allows for the determination of the days on which the shipping option will be visible. Days should be entered in English in the 'days' field.

{
  "days": [
    "monday",
    "tuesday"
  ],
  "name": "Day Of Week Rule",
  "slug": "day-of-week-rule"
}

BasketAmountRule

Enables the creation of a rule based on the discounted basket amount. If the discounted basket amount is greater than or equal to the specified 'max_total_amount' value, the shipping option will be displayed.

{
  "max_total_amount": 200,
  "name": "Basket Amount Rule",
  "slug": "basket-amount-rule"
}

TotalProductAmountRule

Allows for the creation of a rule based on the undiscounted total basket amount. If the undiscounted total basket amount is greater than or equal to the specified 'max_total_amount' value, the shipping option will be displayed.

{
  "max_total_amount": 200,
  "name": "Total Product Amount Rule",
  "slug": "total-product-amount-rule"
}

ProductAttributeRule

Enables the creation of a rule based on product attributes. It checks whether all or any of the products in the cart have a certain value for the selected attribute. If 'any' is selected, at least one product must have the specified value for the selected attribute. If 'all' is selected, all products must comply with this rule. According to the following rule, if the value of the 'attribute_1' attribute for all products in the cart is 'value_1', the relevant shipping option is displayed.

{
  "attribute_field": "attribute_1",
  "attribute_value": "value_1",
  "func": "all",
  "name": "Product Attribute Rule",
  "slug": "product-attribute-rule"
}

RetailStoreRule

This rule ensures that the shipping option only appears when the option for delivery from the retail store is selected.

{
  "name": "Retail Store Rule",
  "slug": "retail-store-rule"
}

Calculators for Determining Fees for Shipping Options

FixedPriceCalculator

Enables setting a fixed shipping fee for all purchases. It applies only to the shipping option for which the calculator is entered. When entered in this way, shipping promotions are not considered.

{
  "fixed_price": 9.9,
  "name": "Fixed Price Calculator",
  "slug": "fixed-price-calculator"
}

AmountBasedCalculator

Enables the determination of shipping fees based on the basket total. If the basket total is less than the specified upper limit, it provides the fixed shipping fee; otherwise, it provides the discounted price. When entered in this way, shipping promotions are not considered.

{
  "upper_limit": 500,
  "fixed_price": 9.9,
  "discount_price": 4.9,
  "name": "Amount Based Calculator",
  "slug": "amount-based-calculator"
}

DiscountBasedCalculator

Enables the calculation of shipping fees considering shipping promotions. If the shipping discount condition is met, the shipping fee will be as determined in the campaign; otherwise, the shipping fee generated by the calculator entered with 'base_shipping' is shown.

{
  "base_shipping": "fixed-price-calculator",
  "fixed_price": "9.9",
  "name": "Discount Based Calculator",
  "slug": "discount-based-calculator"
}
PreviousCommerceNextData Source Shipping Options

Was this helpful?