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
  • Integration
  • Omnitron Integration
  • Sales Channel Integration
  • Command Interface
  • Tasks

Was this helpful?

  1. Channel App Template
  2. Architecture

Integration

Integration

The integration parts are defined using the Command design pattern through a common parent class. Default commands have been developed in the OmnitronIntegration and ChannelIntegration classes for the required flows.

The commands are invoked sequentially at the point where the task methods are defined. The output of one command serves as the input for the next, which means they produce output in the appropriate format and accept input accordingly. Therefore, it is strongly recommended to adhere to the defined interfaces.

class BaseIntegration

To integrate with any system you must create a class which inherits from BaseIntegration. This class was designed to work with command design pattern which basically defines a task procedure interface. All defined commands override some of the default base methods according to their requirements.

do_action(key: str, **kwargs) → Any

Runs the command given with the key and supplies the additional parameters to the command.

Parameters:

  • key – Command key

  • kwargs – Any additional parameters can be specified, for example objects must be supplied if you want to provide input to the action.

Responses:

Result of the command.

do_action_async_run(key: str, **kwargs) → Any

Runs the command given with the key asynchronously and supplies the additional parameters to the command.

Parameters:

  • key – Command key

  • kwargs – Any additional parameters can be specified, for example objects must be supplied if you want to provide input to the action.

Responses:

Result of the command.

property catalog: Catalog

Retrieves the catalog object using the catalog_id stored in the self.

Side effect: It stores the result in the self.catalog_object, if catalog is updated on the currently running task you must delete self.catalog_object and re-call this method.

property channel: Channel

Retrieves the channel object using the channel_id stored in the self.

Side effect: It stores the result in the self.channel_object, if channel is updated on the currently running task you must delete self.channel_object and re-call this method.

Omnitron Integration

The Omnitron Integration is a class within the Channel App Template that interacts with the Omnitron services to perform CRUD(Create, Retrieve, Update, Delete) operations, gather data from various services, and convert the data into the appropriate format.

Within this integration, there are commands defined for different purposes. For example, commands for creating products, deleting products, and updating stock are some of the key operations. You can refer to the documentation for a full list of all available commands.

All commands under the OmnitronIntegration class use DTO (Data Transfer Object) classes for both input and output to provide a standard interface and to prevent the need for re-writing the same logic in each project. This approach ensures that, as long as the data is converted to the same format, the commands will continue to work across different projects developed for various markets.

In an ideal scenario, there will be no need to subclass the OmnitronIntegration class, and it can be used directly. While there may be some changes in the communication between Omnitron and the Channel App Template, the underlying models and structures will mostly remain stable, meaning the likelihood of needing different development for market A and market B is minimal.

class OmnitronIntegration

(create_batch=True, content_type=None)

Communicates with the Omnitron API services through the commands defined. It manages OmnitronApiClient object on enter and exit methods.

init(create_batch=True, content_type=None)

Some environment parameters are stored in the integration object for convenience.

Parameters:

  • create_batch Flag to decide whether a batch request to be created.

Sales Channel Integration

The Sales Channel Integration is a class within the Channel App Template that interacts with the services of the market where sales are intended. It handles CRUD operations, collects data from various services, and converts the data into the appropriate format.

If a client class is to be written to connect with the Sales Channel services, or if requests are made without using any wrapper structure (e.g., directly using the requests library), it is recommended to define the necessary objects and configuration variables in the __init__ method of this class.

The commands in the ChannelIntegration class include a default method called __mocked_request, which operates with mock data. These methods are intended to function as templates, providing a complete workflow. Since there are different connections and services for each market, applying a universal solution is technically not possible. Channel App developers should extend these commands and override the sendmethod to complete the command. In the new send method, they should send requests to the market’s services and convert the data into the DTO objects expected by the Omnitron commands.

class ChannelIntegration

Communicates with the Channel API services through the commands defined.

If an API Client class is developed, initialization and deletion should be handled in ChannelIntegration class so that commands have easier access to the API object.

Command Interface

The Command Interface is a design pattern that defines standard methods for operations to be performed. By overriding the parts of default methods like run, send, fetch, etc., that vary according to the specific needs of different commands, minimal changes can be made to develop various commands. This way, requirements such as error handling, overall flow, and status management for additional modules are not redefined for each individual command.

class CommandInterface

get_data() → object

This method fetches the input data for the command.

transform_data(data) → object

This method can be used to format the input data before it is executed on the run method.

validated_data(data) → dict

If the input data needs to satisfy some conditions or contain required a parameter, the validation is done here.

send(validated_data) → object

If the command sends a request using input data to achieve the main object of the command, it is recommended to place those operations in this method.

Parameters:

  • validated_data

Tasks

Tasks are methods that run at regular intervals and complete a workflow by executing different commands consecutively. They serve as entry points for the application. Commands are not called independently; instead, they are defined to run within a task, ensuring that only that specific command is executed within the task. Tasks are executed regularly according to a schedule defined in Celery or can be manually triggered through Flower. Tasks are the building blocks that create workflows. For more detailed information on this topic, you can refer to the Flows section.

PreviousIntroductionNextServices (Flows)

Was this helpful?