# Galaxy Drugstore

With Galaxy Drugstore connected, the agent recognises a customer by the number they call from, searches the pharmacy catalogue, quotes the customer's own price with discounts, checks stock in a warehouse, suggests items with the same active ingredient, and can price and place an order. It can also tell the customer their balance, aging, order status and next delivery route, and send links to invoices and a statement (καρτέλα) PDF.

Open **Integrations - Catalogue - Galaxy Drugstore - Connect**. One connection is shared by the whole company; each agent then decides which operations it may use. This is the pharmacy edition of Galaxy; for the general edition see [Galaxy ERP](https://docs.voicelogica.ai/integrations/erp/galaxy-erp/).

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

## What you need before you start

Ask your Galaxy administrator for:

- **The Galaxy API address** of your installation, if it is reachable from the internet, or a **Tunnel** if Galaxy runs 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.
- **A Galaxy API user** (username and password). It needs read access to customers, items, stock, prices and order status, and write access to sales entries if the agent will place orders.
- **The company code** (usually `01`) and the **warehouse code** used for stock checks (for example `01-01`).

## What you enter

- **Cloud URL / Tunnel** (required) — Pick one. For Cloud, enter the Galaxy API address. For Tunnel, pick an active tunnel.
- **Username** (required) — The Galaxy API user.
- **Password** (required) — Stored encrypted.
- **Company code** (required) — The Galaxy company code. Pre-filled with `01`.
- **Warehouse code** (required) — The default warehouse for stock checks. Pre-filled with `01-01`.

## First setup

1. **Integrations - Catalogue - Galaxy Drugstore - Connect.** Choose **Cloud URL** or **Tunnel**, then enter the user, password, company code and warehouse code.

2. Press **Test connection**. When it succeeds, press **Connect**. Customers and items sync in the background; the first sync of a large catalogue can take several minutes, and after that it repeats every 15 minutes. **Sync now** and **Balances** on the connected card start a sync immediately. Stock and prices are always read live from Galaxy.

3. Open **My Agents** - the agent - **Skills - Tools & Workflows**. Turn on **Galaxy Drugstore**, press **Configure**, and under **Operations** select what the agent may do. Identify caller by phone is selected by default. Add item search, availability and price first; add order placing once you have tested it.

4. If the agent will place orders, set **Max order value** and **Max order lines**. **Default warehouse code** lets this agent check stock in a different warehouse from the company default. **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 "Do you have Depon, and at what price?" and the agent should answer with availability and the customer's price. 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 by name, barcode or supplier code; find items with the same active ingredient; the customer's most-bought items; the overall best sellers |
| Stock and price | Check availability in a warehouse; the customer's price with all discounts |
| Orders | Calculate an order total before placing it; place the order in Galaxy; check order status; the next delivery route |
| Balances and documents | Outstanding balance; aging in 1-30 / 31-60 / 61-90 / 90+ day buckets; transaction history between two dates; balance per drug type (installations with that extension only); a 30-minute download link for the statement PDF or invoice PDFs |

Placing an order is a write operation: it works only when the operation is selected, and the API user must be allowed to post sales entries. In the tool settings you can also have the agent load the caller's recent orders at call start, and define extra Galaxy order columns the agent must fill.

## Troubleshooting

**Test connection fails with an authentication error**

Galaxy rejected the username or password, or the user has no default company. Check the user, company code and warehouse code with your Galaxy administrator.

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

Wait for the first sync to finish or press **Sync now**. The caller's number must be stored on one of the customer's addresses in Galaxy as a phone or mobile number. Check that **Identify caller by phone** is selected in the tool's **Operations**.

**The agent cannot find a product you stock**

The item may not be active or not marked for web use in Galaxy, so it is not synced. Fix it in Galaxy, then press **Sync now**.

**An order is rejected**

The order went above **Max order value** or **Max order lines** in the tool settings. Raise the limit or leave larger orders to your team.

## Next Steps

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