> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/c/canias-erp.md).

# canias ERP

canias ERP (IAS) is an on-premises enterprise resource planning platform built on the TROIA framework. OctoXLabs calls a TROIA service on the canias web service to read employee records and adds them to the user inventory.

## Use cases

* **Find employees with no directory account.** List canias ERP employees that are not found in Active Directory. How accounts are matched depends on your user merge settings.

```
Adapters = canias-erp AND NOT Adapters = active-directory
```

* **List canias ERP employees by location.** List employees that have a location in canias ERP.

```
Adapters = canias-erp AND Location = *
```

## Before you begin

### Network

| Source              | Destination                                        | Port                             | Protocol                               |
| ------------------- | -------------------------------------------------- | -------------------------------- | -------------------------------------- |
| OctoXLabs connector | canias web service host (IP or Hostname parameter) | 8080 by default (Port parameter) | HTTPS by default, HTTP when SSL is off |

The connector posts SOAP requests to `/CaniasWS-v2/services/CaniasWebService`. The Application Server value (host:port, for example the TROIA application server) is sent inside the login request. It is not contacted by the connector directly, but the canias web service must be able to reach it.

### Required permissions

| Scope or role               | Permission                                                                | Needed for        |
| --------------------------- | ------------------------------------------------------------------------- | ----------------- |
| canias ERP application user | Authorized to execute the user listing TROIA service (default `LISTPERS`) | Listing employees |

The baseline states that the user only needs permission to execute the user listing service.

## Create credentials in canias ERP

{% stepper %}
{% step %}

### Choose or create an application user

Use a canias ERP application user. The account logs in through the web service with its username and password.
{% endstep %}

{% step %}

### Grant access to the user listing service

Authorize the user to execute the TROIA service that returns employee records. The service is called with the page number as its first parameter and an empty second parameter. It must return the `TMPPERS/ROW` structure with 1000 employees per page. The default service id is `LISTPERS`.
{% endstep %}

{% step %}

### Collect the connection values

Note the web service host and port, the TROIA application server (host:port), the client code, the language code, the database server name and the database name configured in canias.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter          | Required | Type    | Default  | Description                                                                                                                    |
| ------------------ | -------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| IP or Hostname     | Yes      | String  | None     | Host of the canias web service.                                                                                                |
| Port               | No       | Integer | 8080     | Port of the canias web service.                                                                                                |
| SSL                | No       | Boolean | True     | Use HTTPS. Many installations expose the web service over plain HTTP, so turn this off in that case.                           |
| Application Server | Yes      | String  | None     | TROIA application server as host:port, for example `10.0.0.2:27000`. Sent in the login request.                                |
| Client             | No       | String  | 00       | canias client code used for the login.                                                                                         |
| Language           | No       | String  | T        | Session language code. T is Turkish.                                                                                           |
| DB Server          | Yes      | String  | None     | Database server name configured in canias.                                                                                     |
| DB Name            | Yes      | String  | None     | Database name configured in canias.                                                                                            |
| Username           | Yes      | String  | None     | canias application user.                                                                                                       |
| Password           | Yes      | String  | None     | Password of the user. Stored as a sensitive value.                                                                             |
| User Service Id    | No       | String  | LISTPERS | TROIA service that returns employee records. Advanced option.                                                                  |
| Max Pages          | No       | Integer | 100      | Upper bound on the pages requested. At 1000 employees per page, 100 pages cover 100,000 employees. Minimum 1. Advanced option. |
| Timeout            | No       | Integer | 30       | Seconds to wait for an API response.                                                                                           |

## Troubleshooting

| Error message                                                                     | Cause                                      | Fix                                                                                        |
| --------------------------------------------------------------------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------ |
| CANIAS login failed: {message}                                                    | The login response did not report success. | Check the client, language, DB server, DB name, application server, username and password. |
| callService returned an empty payload; check the session and the ServiceId        | The user service returned nothing.         | Check the User Service Id and the user's authorization.                                    |
| callService did not return the TMPPERS table; check the session and the ServiceId | The response has no `TMPPERS` table.       | Use a service that returns the `TMPPERS/ROW` structure.                                    |
| callService payload is neither JSON nor XML                                       | The service output could not be parsed.    | Check the service output format.                                                           |

## Change history

{% hint style="info" %}
Available starting from version 6.8.1.
{% endhint %}
