# Integration Requirements

## Generate Komet Sales Token and grant access to the APIs

Ask Komet Sales support to [generate a token](https://kometsales.atlassian.net/wiki/spaces/APIDocs/pages/11173945/Tokens) and grant access to the required APIs for the integration you wish to establish between both systems.

{% hint style="info" %}
An API token is a unique identifier or key to authenticate a user or application to authorize access to an API. This is mainly used to protect data and resources.
{% endhint %}

{% hint style="info" %}
Ask Unosof about the list of APIs that must be added to the token permissions.

Example: purchase.order.list&#x20;

The list of APIs is listed on the [Komet Knowledge Base.](https://kometsales.atlassian.net/wiki/spaces/APIDocs/overview)
{% endhint %}

## Data Mapping

To build any API integration, you must map appropriately the standard data fields that each endpoint requires so that we create seamless cooperation between the Unosof and Komet Sales apps.

Depending on the API method, mapping one or more data fields can be necessary (Species, varieties, SKUs, Billing Customers, Shipping Customers, Cargo Agencies, Carriers, Box Types, Order Types, Incoterms, etc.)

### 1. View Komet Data

Using some of the APIs described in the Komet Knowledge Base, Unosof can access the Komet Sales tables, store that data, and map some variables in the Unosof tables.

When clicking the dropdown menu, find the View Komet data section on the Komet Bridge Menu.&#x20;

Here, you can visualize different data sets, such as Products, Carriers, Boxes, etc.

<figure><img src="/files/lPCR6jG16UhtZObxfgZa" alt=""><figcaption><p>Komet Bridge - View KS data sectopm </p></figcaption></figure>

If you click on the Komet Boxes option (as an example), click on the Seach Button.

The page will display all box types created in Komet Sales, a description, and the Komet Sales ID.&#x20;

<figure><img src="/files/aVXtBM5ryDt8nxRGqrbm" alt=""><figcaption><p>Komet Bridge - View Komet Boxes</p></figcaption></figure>

### 2. Mapping Process

The KS IDs should be mapped on the Unosof tables. Each Komet system has a unique database, so you must do the mapping process for every KS and Unosof app.

#### **a. Products**

1. The product codes from Komet should be mapped on the Unosof Manage Products / API Mappings Menu form, KS ID column.

To access this module, go to:

{% hint style="success" %}
Production / Product Management / Manage Products\
Menu: API Mappings\
<https://farm.unosof.com/index.cfm?event=Products2.List>
{% endhint %}

The page will display all SKUs. Find the column Komet ID and add the corresponding ID to the SKU.

Save your edits by clicking the button Save on the right side of each line.

<figure><img src="/files/WY62jfRlbf92rwsIxh2o" alt=""><figcaption><p>Manage Products API Mappings - ID Komet</p></figcaption></figure>

{% hint style="warning" %}
Notice: The example above shows that the same ID is mapped on different Unosof SKUs. This can happen because Komet Sales generally manages SKUs by variety and length. I.e., ROSE AKITO 4OCM. Other variables, such as the number of stems per bunch and package type, are independent attributes and come as an additional field in the JSON file for the integrations.
{% endhint %}

2. It is also possible to map every SKU entering the Manage Product form

To access this module, go to:

{% hint style="success" %}
Production / Product Management / Manage Products

<https://farm.unosof.com/index.cfm?event=Products2.List>
{% endhint %}

Please search for the SKU and enter its Product form by clicking on the SKU name.

<figure><img src="/files/DvdjAcKAIQauKYcB3V1I" alt=""><figcaption><p>Click in the SKU name to enter the Product form.</p></figcaption></figure>

Click the Mapping tab to find the SKU form's ID Komet field. Please insert the ID and click on the Save Button in the upper right corner of the page.

<figure><img src="/files/boa6OlP5lCVM5H8MO0PI" alt=""><figcaption><p>Product Form - Mapping Tab</p></figcaption></figure>

3. Automated mapping is available as well. Unosof has a script to match both systems' product tables. For this, it is mandatory that in Komet Sales, the Komet Product ID is mapped on the Legacy Code field.

This method has the following limitations:

* It can be done massively at the beginning of the integration.
* 100% mapping is not assured.

#### b. Mixed Boxes

In some of our integrations, it is possible to post solid and mixed boxes. However, it is necessary to use the mixed box module for assorted boxes (different varieties or the same variety with different lengths).

To create mixed boxes, please follow the described steps in the following link. [Mix Box Management // create mix box](/inventory/mix-box-management/create-a-mixed-box.md)

Once the box is created, you can map out the mixed box IDs from Komet with those created boxes in UNOSOF. Insert the KS product ID in the option **Product Code**.

{% hint style="warning" %}
Choose the Stock Client by selecting the corresponding billing and shipping client.
{% endhint %}

![Mixed Box Module](/files/TQrciu64ROLj26n0vw60)

#### c. Customers

The Billing and Shipping Customers from Komet Sales should be mapped in the  Unosof Manage Customer Form.

To access this module, go to:

{% hint style="success" %}
Customers / Customer Info / Manage Customers.

<https://farm.unosof.com/index.cfm?event=Customers.List>
{% endhint %}

Find the customer in UNOSOF, and click on the name to open the Customer Form.&#x20;

![Enter the client form](/files/-M4ydcMlRrtPhh7rjhNL)

Inside the client form, click on the tab API/Providers.

Depending on the type of integration, we should map Komet Group, API Provider, and Provider Token.

{% hint style="danger" %}
If integrating in Order Creation, please fill in the KS ID in the Komet Group field.

\
If you are integrating with a Customer Komet System like Mayesh, Kennicot, Fresca, etc, fill the API Provider, Provider Token, Komet Location ID, and Komet Group fields
{% endhint %}

![Manage Products form - API/Providers tab](/files/-M4ydw_PASnXqaBjm_bi)

Click on the dropdown menu of the API Provider field and select Komet Sales (USA).

![Manage Products form - API Provider](/files/-M4yeOXjVXNetNVhWZPP)

Fill in the Provider Token:

![Manage Products form - Insert Provider Token](/files/-M4yezMUWQ8b-yA45pl7)

Fill in the Komet Location ID:

![Manage Products form - Komet Location ID](/files/-M4yfJ60NUHBklFCFdzB)

Fill in the Komet Group

![Manage Products form - Komet Group](/files/-M4yfrs-F4IKEIfUK9jT)

#### **d. Boxes**

The KS ID should mapped on the Unosof Manage Boxes form, External Box ID field.

To access this module, go to:

{% hint style="success" %}
Customers / Exportations / Manage Boxes\
<https://farm.unosof.com/index.cfm?event=Box.List#>
{% endhint %}

<figure><img src="/files/PCVGKYM5M6SMcG7o62qh" alt=""><figcaption><p>Manage Boxes Form - External Id</p></figcaption></figure>

#### e. KS Location - Incoterms

The locations from Komet Sales can be related to the Incoterm table in Unosof. These data should be mapped in the  Unosof Incoterm Form.

To access this module, go to:

{% hint style="success" %}
Customers / Exportation / Manage Incoterms

<https://farm.unosof.com/index.cfm?event=Incoterms.List#>
{% endhint %}

Find the Incoterm in UNOSOF, and click on the name to open the Incoterm Form.&#x20;

<figure><img src="/files/mcx5Ibh7u5Yq56HH88JS" alt=""><figcaption><p>Manage Incoterm Form</p></figcaption></figure>

Fill in the Komet Location ID on the Incoterm Code field and save changes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manual.unosofbooks.com/integrations-api/komet/download-pos-from-komet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
