• What is the Ekyam SDK?

Ekyam’s SDK is the primary interface for developers to access, control and extend the Ekyam Retail data. It allows the developers to not only just build connections but add new layers of intelligence and automation.  Ekyam’s SDK is a primary Python-based framework for developers to create custom connectors. These connectors allow Ekyam to integrate with and access data from virtually any system, including proprietary platforms, thereby extending Ekyam’s “connect anything”. Additionally, there is a strategic roadmap to release native SDK’s for other key enterprise and key web technology stacks, including JAVA and GO to support a wider developer ecosystem.

• Purpose of Ekyam’s SDK

The three core development pillars for Ekyam’s SDK:
  1. Build Custom Connectors: The custom connectors will be able to seamlessly integrate any proprietary or niche data source (ERP, warehouse system, or a marketing tool) into the Ekyam system.  
For instance: A retailer uses a proprietary system to manage custom orders and the system that the retailer uses has no API. A developer uses the Ekyam SDK to build a custom connector that reads data directly from this system’s database, and transforms it into a standard Ekyam Data Standards. These high-value custom orders then seamlessly flow into the ERP and fulfillment workflows. 
  1. Create Intelligent Automations: The custom connectors are designed  by developers to execute complex workflows, thereby leveraging the full context of Retail Knowledge Graph (RKG) and Universal Ledger to build custom logics. 
For instance: A developer uses the Ekyam SDK’s WorkFlowManager to create a “Smart Returns” process. When a return is initiated, the workflow programmatically checks the customer’s lifetime value with the help of RKG, analyzes the return reason using the AIEnrichmentClient, and checks for potential frauds.
  1. Develop Standalone Retail Applications: The developers will build entirely new applications (advance analytics dashboards, custom merchandising tools etc) that use Ekyam as their intelligent back-end for real-time, unified retail data. 
For instance: A merchandising team wants a real-time “Product Performance Dashboard” that uses the sales data from Shopify, POS Systems, and Amazon with inventory data from their WMS and marketing data from CRM. A developer builds a stand-alone web application that uses Ekyam SDK to query the Universal Ledger and RKG. The app provides a unified, live view of product performance that would be impossible to build without Ekyam’s centralized data. In addition to the above pillars, Ekyam’s SDK includes a “Retail Transformation Toolkit”, which is specifically designed to perform data tasks in retail. This kit includes functionalities for: 
  • Data Normalization: Standardize disparate data formats into a consistent schema.
  • Data Validation: Implement rules to ensure data quality and integrity.
  • Code and Unit Conversions: Assists in converting product codes, measurement units or currency formats.

• Core Components of the SDK

These are the building blocks that the developer will be using for developing Ekyam connectors. 
  1. SecureConnectionManager: It handles the secure storage and management of credentials that are needed to connect to external systems. A developer declares the authentication type ( OAuth 2.0, API Key). This component efficiently handles the complex token refresh loops, signature generation and secure vaulting so credentials are never exposed in the connector code. 
For instance: On connecting to Shopify, enter the API key into Ekyam. This stores the key securely, so the custom connector can access Shopify without exposing the password in the code. 
  1. DataMapper (Reader and Writer Engine):  This component translates data from any external format to the Ekyam Internal Data standards. A DataMapper defines a rule, ensuring that the data is understood by the system each time. A developer may use the DataMapper to define how the data from a custom source needs to be read and understood by Ekyam; and how Ekyam’s standard data should be written back to the system in its required format.
  2. Schema and Ontology Toolkit: This toolkit works with the DataMapper. Developers use this to ensure the data their custom application reads or writes is perfectly structured to become part of the Ekyam Retail Knowledge Graph. The DataMapper translates data to be used by Retail Knowledge Graph. 
  3. RetailTransformationEngine: The developers can use these helpers during the mapping process to add intelligence. It can be used for: 
    • Hierarchical Category Mapping: This is used for intelligently mapping a flat category string from a legacy system to Ekyam’s structured multi-level category model. 
    • Sentiment Analysis: This analysis takes the unstructured text like a review or support email to return a structured response.  
  4. AIEnrichmentClient: This component provides a direct interface for developers to send data to Ekyam’s AI services for processing, allowing the custom connectors or applications to think beyond simple data transformation. For instance: If a developer wants to send a list of basic products to the client, it can use Ekyam’s AI to write a description. Also, a developer can pass unstructured customer review text to the client, and the AI can analyze this and return with a structured object. The new structured data can then be used for advanced analytics. 
  5. WorkflowManager: This component allows developers to create, trigger and manage Ekyam Workflows. A custom application can be used to build a new automation process to trigger an existing workflow with a specific data payload. 
  6. EventLogClient: This component gives the access to the developer to build custom monitoring dashboards or external alerting systems to track integrations and provides a record of every transaction that flows through the platform.
  7. ExceptionhandlingFramework:
    It is a crucial component for building connectors. Ekyam’s SDK provides a set of specific, pre-defined exception classes (eg, Authentication Error, Data Validation Error).  When a developer raises these exceptions, the Ekyam platform can intelligently handle the failure by initiating an automatic retry or creating a detailed alert for the user.

• Why build with the Ekyam SDK?

This section will help the users to understand the advantages of using Ekyam SDK that differentiates it from the generic tools or direct API interaction. The Ekyam SDK is necessary for developers to integrate a new data source directly into Ekyam’s core systems: Universal Ledger (for a unified data view), AI Engine (for Intelligent enrichment and analysis), and Workflow engines (for automated processes). This capability is especially beneficial for connecting to systems like proprietary internal ERPs, integrating with SaaS applications, and handling a complex custom authentication flow. By building a custom connector, it will enable in making the data available as a new Queryable Resource for the Ekyam Agentic AI world. As a queryable resource, the RKG (Retail Knowledge Graph)- transforms into structured knowledge that Ekyam’s AI agents can understand and process.  Let us see the why having Ekyam SDK is necessary:
  1. Access a Unified View of Retail Data: The SDK provides a simple interface to the Ekyam Universal Ledger. This implies that the application can instantly access standardized real-time data from across the entire retail landscape (ERP, WMS, PIM, OMS, CRM, IDocs, EDI etc), without handling the complexity of connecting to each source individually. 
For instance: A custom application needs to display the Available-to-Promise (ATP) inventory for a product. Instead of writing a code to connect to WMS (On-hand stock), the OMS (committed stock) and ERP (Incoming stock); the developer can make a single, high-level SDK call (sdk.inventory.get_atp(sku=“XYZ-123”). The SDK will then be able to handle the multi-system data aggregation. 
  1. Leveraging the Retail Knowledge Graph (RKG): This is an intelligent semantic model that is used by Ekyam SDK. The SDK provides high-level objects and methods to query the RKG, allowing the users to understand the relationships and meaning between products, inventory, orders, and customers in a simplified manner than using a complex or a custom logic. 
For instance: If a user wants to build a “Complete the look” feature in the app, the user may use the SDK to ask a semantic question: (sdk.rkg.find_related_products(sku=“XYZ-123”, relationship=“Complements”). The RKG understands the relationship between items and returns a list of matching items, which showcases opportunities beyond a simple data retrieval. 
  1. Directly integrating with the AI and Agentic Framework: Ekyam’s SDK methods allows the custom code to directly invoke Ekyam’s AI ecosystem. This ecosystem is built on a technical stack that includes MCP, Langchain, Multiple LLMs, and the Ekyam RKG- these are designed with a natural language prompt with a retail-specific context. The custom components become a part of the Ekyam’s AI agents. 
For instance: The internal dashboard needs to provide a quick summary of performance. A developer can use the SDK to send the Natural Language Query directly to Ekyam’s AI. The AI framework will then handle the complex data retrieval, analysis and human-readable summary.   
  1. Build Custom Connectors to Unify the Entire Ecosystem: The Ekyam SDK is the primary tool for integrating diverse and proprietary systems. Building a connector transforms any data source—from legacy to modern—into intelligent, actionable data within the Ekyam platform.
For instance: A custom clienteling app’s trapped customer preferences become queryable RKG data via Ekyam’s SDK connector. This enables new capabilities, such as using in-store preferences to power personalized email campaigns through marketing automation tools. 

• The Custom Connector Lifecycle

The Ekyam SDK provides a structured lifecycle for building, testing and deploying production-ready custom connectors. This guide will give the users a walk-through of the SDK and also the role of the developer.  The Ekyam SDK provides a structured framework through a Python base class (BaseConnector). By building within this framework, the developer needs to ensure that the custom logic integrates with the Ekyam’s platform’s security, monitoring, workflow, and AI capabilities. The developer can write the code to the external system and the SDK handles the rest of the part. 
1

Step 1: Initialize and Configure the Connector

The first step is to create an organized project structure and the Ekyam Command Line (CLI) makes it simple.
Action: Start by running the Ekyam CLI command with the Connector flag to specify you are building a connector:
ekyam-cli init --connector "My-Custom-ERP"
  1. This command generates a boilerplate project with all the necessary files, including connector.py for the logic and config.py for settings.
  2. The developer will edit the config.py file
  3. Define the UI fields that a user can see when the connector is set. For example, if your connector needs an API Key and a Server Address, you define them here using a simple Pydantic model.
# In config.py
from pydantic import BaseModel, Field, SecretStr

class MyCustomERPConfig(BaseModel):
    server_address: str = Field(
        ...,
        title="Server Address",
        description="The full URL of the ERP API. e.g., https://api.my-erp.com"
    )
    api_key: SecretStr = Field(
        ...,
        title="API Key",
        description="Your unique API key for authenticating with the ERP."
    )
This step will automatically build the user interface for the connector within the Ekyam Platform. Once the configuration is defined, the user needs to ensure that any credentials (like API key or passwords) are handled by Ekyam’s secure vault and are not hardcoded in the connector’s logic.
2

Step 2: Implement Data Ingestion (The read () Method)

The read () method’s job is to read data from the external system and bring it into Ekyam. This is where the logic is implemented to fetch information. → In your connector.py file, you will implement the read () method. Inside this method, the Python code will be: 
  1. Use the Ekyam SDK’s SecureConnectionManager to access the user credentials securely. 
  2. Make an authenticated call to the external system’s API using a library like requests or httpx
  3. Use the Ekyam SDK’s DataMapper and RetailTransformationEngine to convert the raw response into a standardized object (Like an EkyamOrder)
  4. Return the standardized Ekyam object. The Ekyam platform then ingests this object into the Universal Ledger and makes it available to workflows and the AI engine. 
    For instance:  Imagine you are connecting to a client’s inventory portal. Your read () method will contain the Python code to log in (using the credentials the user provided by the SecureConnectionManager) and fetch the latest inventory. Before returning the data, you have to use the DataMapper to translate their field names (e.g., ‘stock_qty’) to Ekyam’s (‘quantityOnHand’).
3

Step 3: Implement Data Egress (The write () Method)

The write () method’s job is the inverse of read (): It takes a standardized Ekyam Object and writes it to the external system.→ In the connector.py file, implement the write () method. In this, the Ekyam’s platform will call this method when a workflow needs to send data to your custom- connected system. The code will:
  • Receive a standardized Ekyam object as an argument ( e.g., an EkyamShipment object)
  • Use the DataMapper to transform this object into the specific format the destination API expects. 
  • Make the authenticated API call to send the formatted data to the external system. 
    For instance: When Ekyam needs to send a new Purchase Order to the custom-connected supplier system, it calls the write () method with a standard EkyamOrder object. The code will use the DataMapper to transform this object into a specific XML format the client’s portal requires and then make the API call to post it.
4

Step 4: Implement Robust Error Handling

Ekyam’s SDK provides an error handling platform. → Within the read () and write () methods, wrap the external API calls in try…except blocks. This allows the developer to catch generic errors (like network timeout) and raise a specific and meaningful exception from the SDK’s ExceptionHandlingFramework.
# In your read() or write() method
from ekyam_sdk import exceptions
import requests

try:
    response = requests.get(url, headers=auth_headers, timeout=10)
    response.raise_for_status() # Raises an exception for bad status codes (4xx or 5xx)
except requests.exceptions.HTTPError as e:
    if e.response.status_code == 401:
        raise exceptions.AuthenticationError("Invalid API Key provided.")
    elif e.response.status_code == 429:
        raise exceptions.RateLimitError("External API rate limit exceeded.")
    else:
        raise exceptions.ApiError(f"API Error: {e.response.text}")
except requests.exceptions.RequestException as e:
    raise exceptions.ApiConnectionError(f"Connection failed: {e}")
This is important because by raising these specific exceptions, you will allow the Ekyam platform to handle the failure intelligently- for instance– by automatically retrying the action in case of a temporary RateLimitError or by creating a detailed alert for the user in case of a persistent AuthenticationError.
5

Step 5: Test Locally

Before deploying, it is essential to ensure that the connector is working perfectly. The Ekyam SDK provides a local test harness to simulate the platform environment. → Run the CLI command ekyam-cli test my-connector.This command creates a local sandbox that simulates the Ekyam Platform. It allows the developer to: 
  1. Test read() and write () methods with sample data 
  2. Verify whether the data mappings and transformations are correct. 
  3. Check that the connector raises SDK exceptions under failure conditions. 
  4. The above step is pivotal for building a reliable connector. 
6

Step 6: Package and Deploy

Once the connector is developed and tested, the final step is to deploy it. → Run ekyam-cli package my-connector to validate and bundle your code into a secure, versioned archive.→ Run ekyam-cli publishReview Process: The connector is submitted to the Ekyam team for a security and performance review. This ensures that the apps are safe and secure. Once the connector is approved, the visibility of the connector can be set to: 
  • Private: The connector will be visible and installable by users within the Ekyam Organization. 
  • Public: The connector will be listed in the public Ekyam platform, making it available to different clients.