# Galaxy ERP

With Galaxy ERP connected, the agent recognises a customer by the number they call from, searches your item catalogue, and can submit a commercial entry (for example an order) in Galaxy and read it back later. This is the general Galaxy ERP. Pharmacy businesses on the pharmacy edition use [Galaxy Drugstore](https://docs.voicelogica.ai/integrations/erp/galaxy-drugstore/) instead.

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

  <ShotPlaceholder
    src="/assets/integrations/galaxy-erp.png"
    name="galaxy-erp-connect"
    alt="Connect Galaxy ERP dialog with Cloud URL, Username, Password and Company"
    capture="Connect Galaxy ERP dialog."
  />

## What you need before you start

Ask your Galaxy integrator or administrator for:

- **The Galaxy Web API address**, if Galaxy is reachable from the internet, or a **Tunnel** if it runs inside your office 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.
- **A Galaxy API user** (username and password).
- **The company id**, only if that user has access to more than one company.
- **The commercial-entry type and currency ids** the agent should use for new entries, if the agent will submit orders.

## What you enter

- **Cloud URL / Tunnel** (required) — Pick one. For Cloud, enter the Web API address without a trailing slash and without `/api`. For Tunnel, pick an active tunnel.
- **Username** (required) — The Galaxy API user.
- **Password** (required) — Stored encrypted.
- **Allow self-signed TLS certificate** — Turn on for an on-premises Galaxy server whose certificate is not issued by a public authority.
- **Company** — Leave empty for single-company installs. Fill in only when your integrator says the user has access to several companies.
- **Phone field** — Under **Advanced settings**. The field on the customer that holds the phone number. Defaults to `Phone1`; change it only if your installation stores phones elsewhere.
- **Default CoetID (commercial-entry type)** — Under **Advanced settings**. Pre-fills the entry type on every entry the agent submits.
- **Default CurrIDTran (currency)** — Under **Advanced settings**. Pre-fills the currency on every entry the agent submits.

## First setup

1. **Integrations - Catalogue - Galaxy ERP - Connect.** Choose **Cloud URL** or **Tunnel**, then enter the username and password.

2. If the agent will submit orders, open **Advanced settings** and set the default commercial-entry type and currency.

3. Press **Test connection**. When it succeeds, press **Connect**. Customers and items sync in the background every 15 minutes; **Sync now** on the connected card starts a sync immediately.

4. Open **My Agents** - the agent - **Skills - Tools & Workflows**. Turn on **Galaxy ERP**, press **Configure**, and under **Operations** select what the agent may do. Identify caller by phone is selected by default. If the agent will submit entries, set **Max sales doc value** and **Max sales doc lines**. **Save** the tool settings and **Save** the agent.

5. Call the agent from a phone number stored on a Galaxy customer. The agent should greet the customer by name. Ask about a product you stock and the agent should find it. 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 company name; link the caller's number to a customer for future calls |
| Items | Search items by description, code or barcode; read one item's current details from Galaxy |
| Orders and documents | Submit a commercial entry; read back an entry the agent created, with its code, total and status |

Submitting a commercial entry is a write operation: it works only when the operation is selected. New entries use the commercial-entry type and currency set under **Advanced settings** on the connection, so set those before you enable it. In the tool settings you can also have the agent load the caller's recent commercial entries at call start.

## Troubleshooting

**Test connection reports invalid credentials**

Galaxy rejected the username or password. Check them with your Galaxy integrator. On a multi-company install, fill in **Company** as well.

**Test connection reports that the TLS certificate was rejected**

The server uses a self-signed or expired certificate. For an on-premises server, turn on **Allow self-signed TLS certificate**. For Tunnel, the tunnel must be active and its installer running on a machine that can reach the Galaxy server.

**The agent does not recognise a known customer**

Wait for the first sync or press **Sync now**. The caller's number must be stored in the customer's phone field. If your installation keeps phones in a field other than `Phone1`, the **Phone field** setting must name it; that setting is part of the connect dialog, so disconnect and connect again with the right value.

## Next Steps

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