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
  • 1. Insert Products
  • 2. Update Products
  • 3. Delete Products
  • 4. Check Delete Products
  • 5. Check Products
  • Source Code

Was this helpful?

  1. Channel App Template
  2. Development Steps
  3. Encoding the Sales Channel

Products

Tasks related to product integration under channel_app_template.app.tasks.

1. Insert Products

This task retrieves the products that need to be inserted into the sales side of Akinon for the first time and sends these products to the command located at channel.commands.products.SendInsertedProducts. This command generates product information for the sales channel.

If desired, the product data can be enriched with the parameter values listed below.

The parameters and their descriptions for the insert_products service within ProductService are as follows:

:::infoNOTE Parameters for the insert_products service within Product Service

  • add_mapped: Mapping information is added to the product data. Mapping Data in the Product.

  • add_stock: Product stock information is added to the product data. Stock Data in the Product.

  • add_price: Product price information is added to the product data. Price Data in the Product.

  • add_categories: Product category information is added to the product data. Category Data in the Product.

  • is_sync: Indicates whether the status is obtained immediately when the product is sent to the sales channel. It specifies whether the process is Synchronous or Asynchronous. :::

class SendInsertedProducts(integration, objects=None, batch_request=None, **kwargs)

get_data()

This function prepares the data to be sent in the request for transmitting products from Omnitron to the sales channel. The response should return a list of products.

transform_data(data)

This function takes the response from the validated_data function as a parameter. It is used when changes need to be made to the data before sending it to the sales channel. It returns the final version of the data to be sent.

send_request(transformed_data)

This function takes the response from the transform_data function as a parameter. It sends the data to the relevant endpoint of the sales channel. The response should return either the response itself or the data received with the response.

:::infoNote Care should be taken regarding data types when returning data, as the response will be passed to the normalize_response function. :::

normalize_response(data, validated_data, transformed_data, response)

This function is where we gather and finalize the data used to transmit our products to the sales channel during the insert_product step. The response from this function will be directly used in the insert_products function.

If the process is asynchronous, the remote_batch_id returned from the sales channel should be processed in the batch_request.

remote_batch_id = response.get("remote_batch_request_id")
self.batch_request.remote_batch_id = remote_batch_id
return "", report, data

:::infoNote The response returned from this part must consist of three components:

  • response_data: This is the processed data returned from the sales channel. It can be of type string or list. If there is no data to be used in the returned response, returning an empty string is sufficient. If the response is to be used, it must be of list type, and the elements within it must be of type ProductBatchRequestResponseDto.

  • report: These are the error reports created while processing the response from the sales channel.

  • data: This is the first parameter our function receives, which is the response from the get_data function.

Example return:

return response_data, report, data

:::

2. Update Products

This function retrieves products that have previously been inserted into Akinon but need to be updated. It sends these products to the command channel.commands.products.SendUpdatedProducts. This command updates the existing product information in the sales channel.

If needed, the product data can be enriched with the parameter values listed below.

The parameters and explanations for the update_products service within ProductService are as follows:

:::infoNOTE Parameters for the update_products service within Product Service

  • add_mapped: Mapping information is added to the product data. Mapping Data in the Product.

  • add_stock: Product stock information is added to the product data. Stock Data in the Product.

  • add_price: Product price information is added to the product data. Price Data in the Product.

  • add_categories: Product category information is added to the product data. Category Data in the Product.

  • is_sync: Indicates whether the status is obtained immediately when the product is sent to the sales channel. It specifies whether the process is Synchronous or Asynchronous. :::

class SendUpdatedProducts(integration, objects=None, batch_request=None, **kwargs)

get_data()

This function prepares the data to be sent in the request for transmitting updates from Omnitron to the sales channel for the products that have been sent. The response should return a list of products.

validated_data(data)

This function takes the response from the get_data function as a parameter. It is used when there is a need to validate the products to be updated in the sales channel. If no validation is required, it should return the data passed as a parameter.

transform_data(data)

This function takes the response from the validated_data function as a parameter. It is used when changes need to be made to the data before sending it to the sales channel. It returns the final version of the data to be sent.

send_request(transformed_data)

This function takes the response from the transform_data function as a parameter. It sends the data to the relevant endpoint of the sales channel. The response should return either the response itself or the data received with the response.

:::infoNote Care should be taken regarding data types when returning data, as the response will be passed to the normalize_response function. :::

normalize_response(data, validated_data, transformed_data, response)

This function is where we gather and finalize the data used to update our products in the sales channel during the update_product step. The response from this function will be directly used in the update_products function.

If the process is asynchronous, the remote_batch_id returned from the sales channel should be processed in the batch_request.

remote_batch_id = response.get("remote_batch_request_id")
self.batch_request.remote_batch_id = remote_batch_id
return "", report, data

:::infoNote The response returned from this part must consist of three components:

  • response_data: This is the processed data returned from the sales channel. It can be of type string or list. If there is no data to be used in the returned response, returning an empty string is sufficient. If the response is to be used, it must be of list type, and the elements within it must be of type ProductBatchRequestResponseDto.

  • report: These are the error reports created while processing the response from the sales channel.

  • data: This is the first parameter our function receives, which is the response from the get_data function.

Example return:

return response_data, report, data

:::

3. Delete Products

This function retrieves products that have previously been inserted into Akinon but are requested to be deleted. It sends these products to the command channel.commands.products.SendDeletedProducts. This command deletes the existing products in the sales channel.

If needed, the execution of the command can be enriched with the following parameter:

  • is_sync: Indicates whether the deletion status is obtained immediately when the product is sent to the sales channel. It specifies whether the process is synchronous or asynchronous.

class SendDeletedProducts(integration, objects=None, batch_request=None, **kwargs)

get_data()

This function prepares the data to be sent in the request for transmitting the products to be deleted from Omnitron to the sales channel. The response should return a list of products.

validated_data(data)

This function takes the response from the get_data function as a parameter. It is used when there is a need to validate the products to be deleted in the sales channel. If no validation is required, it should return the data passed as a parameter.

transform_data(data)

This function takes the response from the validated_data function as a parameter. It is used when changes need to be made to the data before sending it to the sales channel. It returns the final version of the data to be sent.

send_request(transformed_data)

This function takes the response from the transform_data function as a parameter. It sends the data to the relevant endpoint of the sales channel. The response should return either the response itself or the data received with the response.

:::infoNote This part requires careful attention to data types when returning data, as the response will be passed to the normalize_response function. :::

normalize_response(data, validated_data, transformed_data, response)

This function is where we gather and finalize the data used to convey the information that products have been deleted to the sales channel during the delete_product step. The response from this function will be directly used in the delete_products function.

If the process is asynchronous, the remote_batch_id returned from the sales channel should be processed in the batch_request.

remote_batch_id = response.get("remote_batch_request_id")
self.batch_request.remote_batch_id = remote_batch_id
return "", report, data

:::infoNote The response returned from this section must consist of three components:

  • response_data: This is the processed data returned from the sales channel. It can be of type string or list. If there is no data to be used in the returned response, returning an empty string is sufficient. If the response is to be used, it must be of list type, and the elements within it must be of type ProductBatchRequestResponseDto.

  • report: These are the error reports created while processing the response from the sales channel.

  • data: This is the first parameter our function receives, which is the response from the get_data function.

Example return:

return response_data, report, data

:::

4. Check Delete Products

This function sends previously requested deletions to the sales channel for products whose deletion status is unknown due to asynchronous processing. It uses the command in channel.commands.products.CheckDeletedProducts to inquire about the status of deletion requests sent to the sales channel.

class CheckDeletedProducts(integration, objects=None, batch_request=None, **kwargs)

get_data()

This function prepares the necessary data to check the status of deletion requests sent to the sales channel. It should return a BatchRequest as a response.

validated_data(data)

This function takes the response from the get_data function as a parameter. It is used to validate products for which the deletion status is being queried. If no validation is needed, it should return the given data.

transform_data(data)

This function takes the response from the validated_data function as a parameter. It is used if any modifications are needed before sending data to the sales channel. It returns the final version of the data to be sent.

send_request(transformed_data)

This function takes the response from the transform_data function as a parameter. It is the endpoint where the data is sent to the sales channel. It should return either the response or the data received with the response.

:::infoNote Care should be taken regarding data types when returning data, as this part will be passed to the normalize_response function. :::

normalize_response(data, validated_data, transformed_data, response)

This function gathers and finalizes the data used to read whether products have been deleted during the check_delete_products step. The response from this function will be directly used in the delete_products function.

:::infoNote The response returned from this section must consist of three components:

  • response_data: This is the processed data returned from the sales channel. It can be of type string or list. If there is no data to be used in the returned response, returning an empty string is sufficient. If the response is to be used, it must be of list type, and the elements within it must be of type ProductBatchRequestResponseDto.

  • report: These are the error reports created while processing the response from the sales channel.

  • data: This is the first parameter our function receives, which is the response from the get_data function.

Example return:

return response_data, report, data

:::

5. Check Products

This function sends products for which creation or update requests were previously made to Akinon’s sales side but for which the results are unknown due to asynchronous processing. It uses the command in channel.commands.products.CheckProducts to inquire about the status of the creation or update requests sent to the sales channel.

class CheckProducts(integration, objects=None, batch_request=None, **kwargs)

get_data()

This function prepares the necessary data to check the status of creation or update requests sent to the sales channel. It should return a BatchRequest as a response.

validated_data(data)

This function takes the response from the get_data function as a parameter. It is used if there needs to be validation on the BatchRequest for which the creation or update status is being queried. If no validation is needed, it should return the given data.

transform_data(data)

This function takes the response from the validated_data function as a parameter. It is used if any modifications are needed before sending data to the sales channel. It returns the final version of the data to be sent.

send_request(transformed_data)

This function takes the response from the transform_data function as a parameter. It is the endpoint where the data is sent to the sales channel. It should return either the response or the data received with the response.

:::infoNote Care should be taken regarding data types when returning data, as this part will be passed to the normalize_response function. :::

normalize_response(data, validated_data, transformed_data, response)

This function gathers and finalizes the data used to read whether products have been created or updated during the check_products step. The response from this function will be directly used in the get_product_batch_requests function.

:::infoNote The response returned from this section must consist of three components:

  • response_data: This is the processed data returned from the sales channel. It can be of type string or list. If there is no data to be used in the returned response, returning an empty string is sufficient. If the response is to be used, it must be of list type, and the elements within it must be of type ProductBatchRequestResponseDto.

  • report: These are the error reports created while processing the response from the sales channel.

  • data: This is the first parameter our function receives, which is the response from the get_data function.

Example return:

return response_data, report, data

:::

Source Code

Source Code of the channel.commands.products Item:

from typing import List, Tuple, Any

from channel_app.channel.commands.products import (
    SendInsertedProducts as AppSendInsertedProducts,
    SendUpdatedProducts as AppSendUpdatedProducts,
    SendDeletedProducts as AppSendDeletedProducts,
    CheckProducts as AppCheckProducts,
    CheckDeletedProducts as AppCheckDeletedProducts
)
from channel_app.core.data import (
    ProductBatchRequestResponseDto,
    ErrorReportDto
)
from omnisdk.omnitron.models import Product, BatchRequest

class SendInsertedProducts(AppSendInsertedProducts):
    param_sync = True

    def get_data(self) -> List[Product]:
        raise NotImplementedError

    def validated_data(self, data) -> object:
        raise NotImplementedError

    def transform_data(self, data) -> object:
        raise NotImplementedError

    def send_request(self, transformed_data) -> object:
        raise NotImplementedError

    def normalize_response(self, data, validated_data, transformed_data,
                           response) -> Tuple[
                                         List[ProductBatchRequestResponseDto],
                                         List[ErrorReportDto],
                                         Any]:
        raise NotImplementedError

class SendUpdatedProducts(AppSendUpdatedProducts):
    param_sync = True

    def get_data(self) -> List[Product]:
        raise NotImplementedError

    def validated_data(self, data) -> object:
        raise NotImplementedError

    def transform_data(self, data) -> object:
        raise NotImplementedError

    def send_request(self, transformed_data) -> object:
        raise NotImplementedError

    def normalize_response(self, data, validated_data, transformed_data,
                           response) -> Tuple[ProductBatchRequestResponseDto,
                                              ErrorReportDto, Any]:
        raise NotImplementedError

class SendDeletedProducts(AppSendDeletedProducts):
    param_sync = True

    def get_data(self) -> List[Product]:
        raise NotImplementedError

    def validated_data(self, data) -> object:
        raise NotImplementedError

    def transform_data(self, data) -> object:
        raise NotImplementedError

    def send_request(self, transformed_data) -> object:
        raise NotImplementedError

    def normalize_response(self, data, validated_data, transformed_data,
                           response) -> Tuple[ProductBatchRequestResponseDto,
                                              ErrorReportDto, Any]:
        raise NotImplementedError

class CheckProducts(AppCheckProducts):

    def get_data(self) -> BatchRequest:
        raise NotImplementedError

    def validated_data(self, data) -> object:
        raise NotImplementedError

    def transform_data(self, data) -> object:
        raise NotImplementedError

    def send_request(self, transformed_data) -> object:
        raise NotImplementedError

    def normalize_response(self, data, validated_data, transformed_data,
                           response) -> Tuple[List[ProductBatchRequestResponseDto],
                                              ErrorReportDto, Any]:
        raise NotImplementedError

class CheckDeletedProducts(AppCheckDeletedProducts):

    def get_data(self) -> BatchRequest:
        raise NotImplementedError

    def validated_data(self, data) -> object:
        raise NotImplementedError

    def transform_data(self, data) -> object:
        raise NotImplementedError

    def send_request(self, transformed_data) -> object:
        raise NotImplementedError

    def normalize_response(self, data, validated_data, transformed_data,
                           response) -> Tuple[List[ProductBatchRequestResponseDto],
                                              ErrorReportDto, Any]:
        raise NotImplementedError
PreviousSetupNextProduct Price

Was this helpful?