Configuration
Everything is set in one place: Stores → Configuration → SISL → Optima Connector.
Section 0. License
| Field | Description | Default |
|---|---|---|
| License key | Format SISL-OPT-XXXX-XXXX-XXXX-XXXX |
(empty — fill in after purchase) |
| License server | Verification server URL | https://license.sisl.pl |
The key is encrypted by Magento Encryptor and stored in core_config_data. The plugin checks it once every 24h (or on-demand from Diagnostics).
Section 1. Microservice connection
| Field | Description | Example |
|---|---|---|
| Enabled | Master switch for the whole plugin | Yes |
| Sisl.Sync.Service URL | Microservice address on the network | http://192.168.1.50:5000 |
| HMAC shared secret | 32-byte hex, identical on both sides | (generated with openssl rand -hex 32) |
| HTTP timeout (s) | HTTP request timeout | 15 |
Important: the URL must be reachable from the Magento container/server. If you use Docker, use host.docker.internal or LAN IP.
Section 2. Synchronization
| Field | Description | Default |
|---|---|---|
| Pull products | Enable ProductSync |
Yes |
| Sync stock levels | Enable StockSync |
Yes |
| Forward orders to Optima | Enable OrderForward |
Yes |
| Sync prices | Whether to overwrite prices in Magento | No |
| Warehouse (Mag_Symbol) | Which Optima warehouse to pull stock from | MAGAZYN |
| Pricelist no. | Which pricelist (TwC_TwCNumer) | 1 (retail) |
| Pricelist includes VAT | Whether the Optima price is gross | Yes |
| Default attribute set ID | For new products | 4 (Default) |
| SKU filter (prefix) | Sync only SKUs with this prefix | (empty = all) |
| Skip services | Filter Twr_Typ != 0 |
Yes |
| Stock buffer | Subtract N pcs as reserve | 0 |
| "Out of stock" threshold | If qty - buffer <= threshold → OOS |
0 |
| Page size | Batch size for the API (50-1000) | 200 |
Price sync — when to enable
Disabled by default. Enable only if Optima prices are authoritative. Otherwise prices in Magento (set manually or by a marketing campaign) won't be overwritten on every cycle.
Stock buffer
Example: a product has 5 pcs in Optima, buffer=2, threshold=0:
- Magento qty = 5 - 2 = 3
- Shop still shows "in stock"
When Optima drops to 2 pcs: qty = 0, the plugin automatically sets is_in_stock=0. This protects against selling the last unit which may have been sold offline already.
Section 3. Defaults for NEW products
| Field | Description | Default |
|---|---|---|
| New product status | Enabled / Disabled | Enabled |
| New product visibility | Not visible / Catalog / Search / Both | Catalog and search |
Applied only on first SKU import. Later syncs don't touch these fields.
Section 4. Schedule (cron)
Requires active Magento cron (bin/magento cron:run in the system crontab every minute, or a cron container in Docker).
| Field | Dropdown |
|---|---|
| Product synchronization | Disabled / Every 5 min / Every 15 min / Every 30 min / Every 1 hour / 2h / 6h / 12h / Daily 02:00 / Daily 04:00 |
| Stock synchronization | as above |
| License check | as above (recommended: Daily 03:00) |
Section 5. v0.3 — Extended features (opt-in)
Three large optional features. All disabled by default — turn them on consciously when you need them. Disabled features have zero effect on module behaviour.
F1. Multi-store — different pricelists/SKU per website
Each Magento website can pull prices from a different Optima pricelist. Format of the Multi-store: Per-website overrides field:
wholesale=2:WH-
retail=1:
partner=3:PARTNER-
Each line is website_code=pricelist:sku_prefix:
- website_code — Magento's Stores → All Stores → Website → Code
- pricelist — Optima pricelist number (TwC_TwCNumer), e.g. 1 = retail, 2 = wholesale
- sku_prefix — filter products for that website by SKU prefix (empty = all)
Default-scope prices (from section 2) are preserved — multi-store layers on top as a website-scoped layer.
Enable at 5. v0.3 → Multi-store: Enabled = Yes + fill in overrides.
F2. Order updates — full order lifecycle (Invoice/Receipt/Shipment)
A cron pulls invoices/receipts/WZ created in Optima from the microservice and automatically creates the corresponding Invoice (order → "Complete") or Shipment in Magento.
Required workflow in Optima: in the document Description field (TraNag.TrN_Opis) the sales operator enters MG-<magento_order_number>, e.g. MG-100000123. The plugin filters by this prefix and matches to increment_id.
Config fields:
| Field | Description | Default |
|---|---|---|
| Order updates: Enabled | F2 master switch | No |
| Order updates: Reference prefix | Prefix in TrN_Opis |
MG- |
| Order updates: Cron schedule | Cron expression (empty = never runs) | (empty) |
Recommended schedules: */15 * * * * (every 15 min) or */30 * * * *.
Idempotent — skips orders already invoiced / shipped.
F3. Bidirectional customer sync — Optima KntKarty → Magento
A cron pulls customer cards from CDN.KntKarty modified since the last poll (delta sync) and upserts them into Magento customer_entity. First poll = full sync, subsequent polls = delta only.
Match: by email + websiteId (Magento requires an email — customers without one are skipped).
Config fields:
| Field | Description | Default |
|---|---|---|
| Customers: Enabled | F3 master switch | No |
| Customers: Default group | Customer Group ID for new customers | 1 (General) |
| Customers: Default website | Website ID for new customers | 1 |
| Customers: Cron schedule | Cron expression | (empty) |
Recommended schedules: 0 */2 * * * (every 2 hours) or once at night 0 3 * * *.
Excluding a single product
Catalog → Products → click product → tab SISL Optima → set "Excluded from synchronization" to Yes.
The plugin will skip this SKU in both ProductSync and StockSync. The price, name and stock in Magento won't be touched.
Microservice configuration
File C:\Sisl\sync\publish\appsettings.Local.json:
{
"Sisl": {
"Backend": "optima",
"ListenUrl": "http://0.0.0.0:5000",
"AllowedTimestampDriftSeconds": 300,
"SharedSecret": "<HMAC, same as in Magento>",
"Optima": {
"Server": "YOUR-SERVER\\OPTIMA",
"Database": "CDN_Firma_Yours",
"IntegratedSecurity": true
},
"License": {
"Key": "<license key>",
"ServerUrl": "https://license.sisl.pl",
"ProductCode": "sisl_optima",
"Enforce": "true"
}
}
}
After changes the Windows Service must be restarted:
Restart-Service SislSyncService
Next: Licensing →