PHPackages                             janis-commerce/janis-connector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. janis-commerce/janis-connector

ActiveMagento2-module

janis-commerce/janis-connector
==============================

Janis Commerce connector for Magento 2

v2.2.1(5mo ago)01.5k↓31.6%OSL-3.0PHP

Since May 26Pushed 5mo agoCompare

[ Source](https://github.com/janis-commerce/janis-connector)[ Packagist](https://packagist.org/packages/janis-commerce/janis-connector)[ RSS](/packages/janis-commerce-janis-connector/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (8)Used By (0)

Janis Connector [![Packagist Version](https://camo.githubusercontent.com/c279060177d4fad34d66450e6894429edfb3226349b58168cc2cd2f916fd433a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a616e69732d636f6d6d657263652f6a616e69732d636f6e6e6563746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/janis-commerce/janis-connector)
=========================================================================================================================================================================================================================================================================================================================================================================================

[](#janis-connector-)

The purpose of this module is to create a connection to Janis Commerce API services. By doing this some information will be available in Magento 2 to be used.

Compatibility: ![Version Status](https://camo.githubusercontent.com/7f7597527fa05f6ecf56509555a376d43eb7278d6e68a7e213cd6c86a2490c64/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6167656e746f2d322e332d6f72616e67652e737667)![Version Status](https://camo.githubusercontent.com/4fc4be46d635599bfb958016861b2df6e5af7ae0e813d3d9e2a22eb85408141e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6167656e746f2d322e342d6f72616e67652e737667)![Composer Status](https://camo.githubusercontent.com/0f69233c227053657c73daa38d955abd1adcaa7c5fbc8a364e0b8b77adb99a1a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f6d706f7365722d322d6f72616e67652e737667)

Features
========

[](#features)

- Easy to install
- Configuration via Magento 2 Backoffice
- Order Creation Notification to Janis
- Splitcart depending of Janis Configuration

Installation and Configuration
==============================

[](#installation-and-configuration)

### Installation via Composer

[](#installation-via-composer)

To install this module, just run the following command line:

```
composer require janis-commerce/janis-connector
```

For more information about JanisConnector via composer installation, follow us:

```
https://packagist.org/packages/janis-commerce/janis-connector
```

### Enable module

[](#enable-module)

Once JanisConnector was installed, you need to enable the module. To do this, run the following next command lines over a magento project

```
    bin/magento cache:clean

    bin/magento module:enable JanisCommerce_JanisConnector

    bin/magento setup:upgrade

    # This is used to start the exclusive Janis Commerce crons.
    bin/magento cron:run --group=janis
```

### Parameter configurations

[](#parameter-configurations)

First at all, you have to localize the Backoffice Configurations Panel, then find out the "Stores" -&gt; "Configuration", in left sidebar menu

[![Magento Backoffice Configuration](https://github.com/janis-commerce/janis-connector/raw/master/Blob/images/image_1.png)](https://github.com/janis-commerce/janis-connector/blob/master/Blob/images/image_1.png)

Click on "Janis Commerce" -&gt; "Janis Connection"

[![Janis Connection](https://github.com/janis-commerce/janis-connector/raw/master/Blob/images/image_2.png)](https://github.com/janis-commerce/janis-connector/blob/master/Blob/images/image_2.png)

In this panel you'll find out the main Janis Connection configurations, to enable this module and allow it to communicate with Janis APIs.

[![Janis Connection expanded](https://github.com/janis-commerce/janis-connector/raw/master/Blob/images/image_3.png)](https://github.com/janis-commerce/janis-connector/blob/master/Blob/images/image_3.png)

To use the new Janis API where the slaName attribute is used, the Janis endpoint to receive a split cart field must be like this.

[![Janis EndPoint](https://github.com/janis-commerce/janis-connector/src/master/blob/master/Blob/images/image_10.png)](https://github.com/janis-commerce/janis-connector/src/master/blob/master/Blob/images/image_10.png)

Here you can see 2 main sections:

### Janis Connection

[](#janis-connection)

All this information must be requested to Janis Commerce and it will be provided depending of the client.

- Enviroment: Determina con que ambiente de janis se va a conectar el plugin Produccion o QA.
- CREDENTIALS FOR SELECTED ENVIRONMENT: When Test Mode is DISABLED, this credentials must be setup.

    - Janis Client: Janis Client code. Api Key Security Scheme Type.
    - Janis API Key: Client data Key. Api Key Security Scheme Type.
    - Janis API Secret: API secret data. Api Key Security Scheme Type.

### Orders

[](#orders)

- Orders CRON job sync schedule with Janis: Configuration data that allows scheduling the periods in which the CRON process will run to send notifications to Janis.
- Janis account name: Data for connection to API services.
- Janis endpoint Sales Channel ID: Configuration data for the Sales Channel ID.

Features
========

[](#features-1)

Order Creation Notification
---------------------------

[](#order-creation-notification)

On one side we have the sending of notifications to janis, when a new order with an invoice has been created.

This is the body format built internally by this module:

```
{
    "accountName": customJanisAccountName,
    "orderId": orderIncrementIdCreated,
    "externalRef": orderIdCreated,
    "status": orderStatus,
    "statusCode": orderState
}
```

When Janis API Service receives the sended resquest, returns a response with the following format:

```
{
    "SendMessageResponse": {
        "ResponseMetadata": {
            "RequestId": "db0cdbe2-63fe-5202-8352-81afe0aa7d78"
        },
        "SendMessageResult": {
            "MD5OfMessageAttributes": "6515e53330941aeebeba4acdcec4078d",
            "MD5OfMessageBody": "915119691d28ecb53bbec55eddea7674",
            "MD5OfMessageSystemAttributes": null,
            "MessageId": "e1eb8a01-7728-47f4-abea-863157cec4e9",
            "SequenceNumber": null
        }
    }
}
```

This means that our request has been added to a waiting queue, to be able to process it.

This feature of the module comes integrated with a configurable **Cron Job**, which executes a scan of the orders created with an invoice and sends the respective notification to Janis Services. Once Janis returns a satisfactory response, these orders will be excluded from future sweeps.

Splitcart Request
-----------------

[](#splitcart-request)

On the other hand, this module has the functionality to request a splitcart payload from Janis API.

### Webapi URL

[](#webapi-url)

The webapi URL available to target is:

```
https:///rest/default/V1/split-cart
```

There are two format options to allow Client, to request information:

#### 1) Client Body format to allow the module to use quote items to build request

[](#1-client-body-format-to-allow-the-module-to-use-quote-items-to-build-request)

With this body format, JanisConnector add all items located in the cart, and sent them to get the splitcart payload.

```
{
    "slaName": "delivery", // ENUM: delivery | delivery | storePickup
    "dropoff": {
        "lat": latitude,
        "long": longitude
    }
}
```

#### 2) Client Body format to force the module to use custom products to build request

[](#2-client-body-format-to-force-the-module-to-use-custom-products-to-build-request)

Also it is possible to add custom products, including **"skus"** field as is shown in the next example:

```
{
    "slaName": "delivery", // ENUM: delivery | delivery | storePickup
    "dropoff": {"lat": latitude, "long": longitude},
    "skus": [
        {"sku": productSku, "qty": quantity},
        {"sku": productSku, "qty": quantity},
        ...
    ]
}
```

Internally with those types of client requests, JanisConnector will build and send a body payload to a configurable Janis End Point, created with this format:

```
{
    "slaName": slaName
    "dropoff": {"coordinates":[latitude,longitude]},
    "salesChannel": {"referenceId": customId},
    "skus":
    [
        {"referenceId": productSku, "quantity": qty, "externalId": quoteItemId},
        ...
    ]
}
```

Splitcart Request Variables
---------------------------

[](#splitcart-request-variables)

In this section there are some examples of request and responses from Janis Commerce:

According to 3 types of custom shipping methods available by Janis API, this module would create:

#### 1) Shipping type: delivery

[](#1-shipping-type-delivery)

Janis body request example:

```
{
    "slaName" : "delivery"
    "dropoff": {
        "coordinates": [0, 0]
    },
    "salesChannel": {
        "referenceId": "64654"
    },
    "skus": [
        {
            "referenceId": "13017878",
            "quantity": 1,
            "externalId": "5455"
        }
    ]
}
```

Janis payload response:

```
{
    "carts": [
        {
            "skus": [
                {
                    "referenceId": "13017878",
                    "quantity": 1,
                    "externalId": "5455"
                }
            ],
            "shippingOptions": [
                {
                    "carrierId": "6171c08a7605bc0008afb0de",
                    "carrierName": "Envío normal",
                    "slaName" : "delivery",
                    "shippingType": "delivery",
                    "price": 100,
                    "windows": [
                        {
                            "start": "2022-01-08T11:00:00.000Z",
                            "end": "2022-01-08T15:00:00.000Z",
                            "price": 0
                        },
                        {
                            "start": "2022-01-08T15:00:00.000Z",
                            "end": "2022-01-08T21:00:00.000Z",
                            "price": 100
                        },
                        {
                            "start": "2022-01-09T15:00:00.000Z",
                            "end": "2022-01-09T21:00:00.000Z",
                            "price": 0
                        }
                    ]
                }
            ]
        }
    ]
}
```

#### 2) Shipping type: storePickup

[](#2-shipping-type-storepickup)

Janis body request example:

```
{
    "slaName" : "storePickup"
    "dropoff": {
        "coordinates": [
            0,
            0
        ]
    },
    "salesChannel": {
        "referenceId": "64654"
    },
    "skus": [
        {
            "referenceId": "13017878",
            "quantity": 1,
            "externalId": "5455"
        }
    ]
}
```

Janis payload response:

```
{
    "carts": [
        {
            "skus": [
                {
                    "referenceId": "13017878",
                    "quantity": 1,
                    "externalId": "5455"
                }
            ],
            "shippingOptions": [
                {
                    "carrierId": "618537a4f8928e0008376d55",
                    "carrierName": "Retiro en tienda",
                    "slaName" : "store_pickup"
                    "shippingType": "store_pickup",
                    "price": 0,
                    "estimatedDeliveryDate": "2021-10-18T18:00:00.000Z",
                    "pickupPoints": [
                        {
                            "id": "5d8bdac48ba45b0011913903",
                            "referenceId": "pp-0001",
                            "name": "Tienda #1",
                            "address": "Av. Principal # 1234, Región Metropolitana",
                            "schedule": [
                                {
                                    "day": "monday",
                                    "hours": [
                                        {
                                            "open": "08:00Z",
                                            "close": "12:00Z"
                                        },
                                        {
                                            "open": "13:00Z",
                                            "close": "20:00Z"
                                        }
                                    ]
                                }
                            ],
                            "coordinates": [
                                -70.682327717,
                                -33.3665865
                            ]
                        },
                        {
                            "id": "5d8bdac48ba45b0011913904",
                            "referenceId": "pp-0002",
                            "name": "Tienda #8",
                            "address": "Avenida Circunvalación # 112233, local 111, Región Metropolitana",
                            "schedule": [
                                {
                                    "day": "monday",
                                    "hours": [
                                        {
                                            "open": "12:00Z",
                                            "close": "20:00Z"
                                        }
                                    ]
                                },
                                {
                                    "day": "tuesday",
                                    "hours": [
                                        {
                                            "open": "12:00Z",
                                            "close": "20:00Z"
                                        }
                                    ]
                                },
                                {
                                    "day": "wednesday",
                                    "hours": [
                                        {
                                            "open": "12:00Z",
                                            "close": "20:00Z"
                                        }
                                    ]
                                }
                            ],
                            "coordinates": [
                                -70.54027597138355,
                                -33.41543295072441
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}
```

#### 3) Shipping type: expressDelivery

[](#3-shipping-type-expressdelivery)

Janis body request example:

```
{
    "slaName": "expressDelivery",
    "dropoff": {
        "coordinates": [
            0,
            0
        ]
    },
    "salesChannel": {
        "referenceId": "64654"
    },
    "skus": [
        {
            "referenceId": "13017878",
            "quantity": 1,
            "externalId": "5455"
        }
    ]
}
```

Janis payload response:

```
{
    "carts": [
        {
            "skus": [
                {
                    "referenceId": "13017878",
                    "quantity": 1,
                    "externalId": "5455"
                }
            ],
            "shippingOptions": [
                {
                    "carrierId": "618d34141c833a00085e3b46",
                    "carrierName": "Despacho Concepción",
                    "slaName" : "express_delivery",
                    "shippingType": "express_delivery",
                    "price": 100,
                    "estimatedDeliveryDate": "2022-01-08T23:24:08.413Z"
                }
            ]
        }
    ]
}
```

Usage examples
==============

[](#usage-examples)

There is a wide variety of uses that could be given to the functionalities provided by JanisConnector, among some we present:

### 1) Splitcart

[](#1-splitcart)

A visual representation of the use of the splitcart would be the following:

Once the products have been loaded into the minicart/basket, as normal

[![Splitcart example image 1](https://github.com/janis-commerce/janis-connector/raw/master/Blob/images/image_4.png)](https://github.com/janis-commerce/janis-connector/blob/master/Blob/images/image_4.png)

When going to the next step and after having made the internal request to Janis, a cart with its respective subcarts would be shown

[![Splitcart example image 2](https://github.com/janis-commerce/janis-connector/raw/master/Blob/images/image_5.png)](https://github.com/janis-commerce/janis-connector/blob/master/Blob/images/image_5.png)

To improve the handling of this feature, you could use a third-party module, such as Attribute Base SplitCart.

For more information, follow their official website:

```
https://webkul.com/blog/magento2-cart-split-based-attribute/
```

### 2) Shipping methods available

[](#2-shipping-methods-available)

With the information obtained from Janis, it is possible for us to put together a shipping method selector according to a product in which the customer is interested in purchasing. Thus we provide more accurate information and also provide greater comfort to said client.

[![Shipping methods example](https://github.com/janis-commerce/janis-connector/raw/master/Blob/images/image_7.png)](https://github.com/janis-commerce/janis-connector/blob/master/Blob/images/image_7.png)

### 3) Availability according to proximity

[](#3-availability-according-to-proximity)

Using the customer's location as a reference, and the availability of the product they are looking at, it is possible to generate a map of nearby locations where they could purchase said product.

[![Availability according to proximity example](https://github.com/janis-commerce/janis-connector/raw/master/Blob/images/image_8.png)](https://github.com/janis-commerce/janis-connector/blob/master/Blob/images/image_8.png)

### 4) Shipping schedule and costs

[](#4-shipping-schedule-and-costs)

Another scenario in which you can take advantage of the benefits of this module is when it could be made available to the customer, with information about the available shipping dates and their costs. In this way, the client can select the one that best suits their budget and urgency of acquiring the product.

[![Shipping schedule and costs](https://github.com/janis-commerce/janis-connector/raw/master/Blob/images/image_9.png)](https://github.com/janis-commerce/janis-connector/blob/master/Blob/images/image_9.png)

Not included in this module
===========================

[](#not-included-in-this-module)

The Front End of Magento was not modified at all. This module only include the connection and the storage of the data retrieved from Janis Commerce. i.e.: When the Split Cart information is retrieved, this won't be available in the FrontEnd, Magento must be customized to show the data according to the project.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance70

Regular maintenance activity

Popularity20

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~30 days

Recently: every ~14 days

Total

7

Last Release

175d ago

Major Versions

v1.1.0 → v2.0.02025-09-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/d32426dfc8b99eb2feb54662748bb156d9e5c1dc9e0f09db2cbee45820b43973?d=identicon)[janis-commerce](/maintainers/janis-commerce)

### Embed Badge

![Health badge](/badges/janis-commerce-janis-connector/health.svg)

```
[![Health](https://phpackages.com/badges/janis-commerce-janis-connector/health.svg)](https://phpackages.com/packages/janis-commerce-janis-connector)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
