# Pylon ERP

With Pylon connected, the agent recognises a customer by the number they call from, searches your items, reads the customer's balance, and takes an order line by line before posting it to Pylon as a sales order.

Open **Integrations - Catalogue - Pylon ERP - Connect**. One connection is shared by the whole company; each agent then decides which operations it may use.

  <ShotPlaceholder
    src="/assets/integrations/pylon.png"
    name="pylon-connect"
    alt="Connect Pylon ERP dialog with Cloud URL, API code, Application, Database alias and Script codes"
    capture="Connect Pylon ERP dialog."
  />

## What you need before you start

Pylon is reached through its Connectivity API. Your Pylon partner or administrator prepares it:

- **The Connectivity API service is running.** It is enabled in Pylon Configurator under the daemons settings ("Connectivity API Json Service").
- **An API scenario** in Pylon (Οργάνωση - Συνδεσιμότητα - API). It gives you the API code, the application, the database alias, the user mapping, and the Script codes on its Scripts tab.
- **Script codes** for customers and items (needed for caller recognition and item search), and optionally for balances and sales orders.
- **The document series** (SeriesCode) for orders the agent creates, if it should differ from the scenario default.
- **How Voice Logica reaches Pylon:** the address and port the service listens on, if reachable from the internet, or a **Tunnel** if Pylon is inside your network. A tunnel is a reverse connection from a small installer on your network to Voice Logica, so no firewall ports need to be opened. Tunnels are created under **AI Setup - Tunnels**, which only admins see; if you do not see it, ask Voice Logica support to create one.

## What you enter

- **Cloud URL / Tunnel** (required) — Pick one. For Cloud, enter the address and port of the Connectivity API service. For Tunnel, pick an active tunnel.
- **API code** (required) — From the API scenario.
- **Application** (required) — From the API scenario.
- **Database alias** (required) — The Pylon database the scenario uses.
- **Username** (required) — The Pylon user mapped in the scenario.
- **Password** (required) — Stored encrypted.
- **Customers entity code** — Script code that returns customers. Needed for caller recognition.
- **Items entity code** — Script code that returns items. Needed for item search.
- **Balances entity code** — Script code that returns customer balances. Needed for balance answers.
- **Sales-order entity code** — Script code that posts a sales order. Pre-filled with `SalesOrders`.
- **Sales-order series (SeriesCode)** — Document series for orders the agent creates, for example `ΠΑΡΠ`. Leave empty to use the scenario default.
- **Allow self-signed TLS certificate** — Turn on only for a server with a private certificate.

## First setup

1. **Integrations - Catalogue - Pylon ERP - Connect.** Choose **Cloud URL** or **Tunnel**, enter the scenario details and the user, then the Script codes.

2. Press **Connect**. Pylon has no separate connection test; the login is checked when you connect. Customers and items sync in the background every 15 minutes. **Sync now** and **Balances** on the connected card start a sync immediately.

3. To change a Script code or the series later, use **Edit** on the connected card. Leave the password empty to keep the stored one. Do not disconnect to change settings: disconnecting deletes the synced data.

4. Open **My Agents** - the agent - **Skills - Tools & Workflows**. Turn on **Pylon ERP**, press **Configure**, and under **Operations** select what the agent may do. Identify caller by phone is selected by default. For order taking, select the add and remove order line operations together with create sales order. Set **Max order value** and **Max order lines**, **Save** the tool settings and **Save** the agent.

5. Call the agent from a phone number stored on a Pylon customer. The agent should greet the customer by name. Ask for your balance and the agent should read it back. If the greeting stays generic, open **Calls** and check the tool calls on that call.

## What the agent can do

| Job | Operations |
|---|---|
| Find the customer | Identify the caller by phone; look up by tax number (ΑΦΜ), customer code or name; link the caller's number to a customer for future calls |
| Items | Search items by name, code or barcode; the customer's previous purchases with last price and date |
| Balances | The customer's outstanding balance |
| Orders | List the customer's delivery branches; add or remove items in the order during the call; post the order to Pylon as a sales order |

Posting an order is a write operation: it works only when it is selected, and it uses the sales-order Script code and series from the connection. Previous purchases and delivery branches need Script codes that are not in the connect dialog; ask Voice Logica support to add them.

## Troubleshooting

**Connect fails with a login error**

Pylon did not accept the login. Check the API code, application, database alias and the user mapped in the API scenario, and that the Connectivity API service is running. For an on-premises server with its own certificate, turn on **Allow self-signed TLS certificate**.

**The agent does not recognise any caller or find any item**

The customer and item syncs are skipped while **Customers entity code** and **Items entity code** are empty. Add them with **Edit** on the connected card, then press **Sync now**. The caller's number must also be stored on the customer in Pylon.

**The agent cannot tell the customer their balance**

Set **Balances entity code** with **Edit**, then press **Balances** on the connected card to refresh.

**The order is not posted**

Check **Sales-order entity code** and **Sales-order series (SeriesCode)** with **Edit**. An order above **Max order value** or **Max order lines** in the tool settings is rejected.

## Next Steps

[Get an integration working](https://docs.voicelogica.ai/integrations/) - the company connection and agent tool, step by step.  
[Soft1 ERP](https://docs.voicelogica.ai/integrations/erp/soft1/) - [Entersoft ONE](https://docs.voicelogica.ai/integrations/erp/entersoft-one/) - [Galaxy ERP](https://docs.voicelogica.ai/integrations/erp/galaxy-erp/) - other ERPs.
