Shopify Integration Server
The Shopify Integration Server is the background application that connects Shopify with IMS PostgreSQL. It imports online orders into IMS, creates internal fulfillment work for IMS-stock items, and pushes IMS inventory quantities back to the configured Shopify locations.
Component | Responsibility
| Area | Responsibility |
|---|---|
| Order import | Reads unfulfilled Shopify orders from the active Shopify Access Stores in the configured profile and creates the IMS order/customer/item records required by Incoming Orders. |
| Fulfillment preparation | For normal IMS-stock merchandise, selects supplying Stores and creates IMS Stock Transfer vouchers toward the mapped online Store. |
| Inventory synchronization | Calculates the sellable IMS quantity and sends the quantity to the matching Shopify variant at each configured Shopify Location ID. |
| Monitoring | Maintains automatic/manual logs, connection/error counters, Shopify product counts and API-rate monitoring. |
| Manual maintenance | Provides full, draft, style and file-based inventory updates plus a one-order retrieval tool. |
Multiple companies and independent profiles
Shopify Integration Server 4.4.0 is a .NET 10 Windows desktop application. Select a Company, then a Profile. Each company/profile worker owns its connection, schedule, state, counters and logs. Selecting a different company or profile changes the displayed worker; it does not stop the other workers.
At startup, the application authenticates with IMS API, discovers authorized companies and loads their active profiles. Each worker loads active Shopify Access records with No Integration disabled. Store URLs, Location IDs, Local Stores and Shipping Items come from Manage Profiles; each App Token is obtained separately through the authorized IMS API service. A profile with no active integrated stores cannot initialize.
Company discovery runs at application startup. Restart after changing company grants so newly authorized companies can be discovered. Before each automatic or manual operation, the worker obtains or renews company and Store authorization. If renewal fails, it cannot admit that operation. An operation already admitted uses its authorized connection and token snapshot until it finishes.
For first installation or recovery of this worker, see Autos and Shopify installation. Shopify access is granted separately from Autos; a permitted company also requires an active profile and authorized Store App Tokens.
Start, Stop and operator scope
- Select the company and profile and verify its Active Stores and last error.
- Set that profile’s interval, logging, API throttle and Run on startup preference.
- Click Start for automatic processing. Connection and product-count checks run first; the first cycle follows one configured interval.
- Click Stop before a manual operation. Stop cancels the wait for the next cycle and lets active work finish; wait for the profile to show Stopped.
- Choose the intended Store and manual operation. A profile runs one operation at a time; other profiles can continue independently.
Company/profile settings and logs are separate. Start Minimized and Minimize to tray are application preferences. Closing the application drains its workers and ends processing; Run on startup is an application preference, not Windows startup registration.
Automatic cycle
- Check IMS PostgreSQL. The application confirms the IMS database connection before an automatic cycle continues.
- Refresh Shopify product counts. Each active Shopify Access Store is queried and its product count is written back to IMS.
- Coordinate with IMS Autos. If IMS Autos is in a blocking maintenance state, Shopify actions wait instead of changing orders or inventory at the same time.
- Retrieve new online orders. The application reads Shopify orders whose fulfillment status is unfulfilled.
- Create the IMS order. New orders are converted into the IMS Orders/Order Details structure, with customer, currency, payment, shipping and item information when available.
- Create fulfillment transfers. IMS-stock items are assigned to supplying Stores and Stock Transfer vouchers are created toward the online Store.
- Push changed inventory. IMS items changed since the profile's last balance update are recalculated and their Shopify inventory levels are updated.
- Wait for the configured interval and repeat.
How a Shopify order becomes an IMS order
The background application uses the Shopify Order Number as the IMS Order Reference. Before creating a new IMS order it checks the profile/Store/order-reference identity. An already imported order is not imported again by ordinary retrieval.
For every line, the integration reads the Shopify variant so IMS can use its barcode, SKU, options, current sold price and compare-at/original price. The barcode is the primary bridge between the Shopify variant and the IMS Item Code.
Items not yet in IMS
If an imported barcode does not yet exist in IMS, the server can create the item when the Shopify Vendor maps to exactly one IMS brand belonging to a configured Just-In-Time supplier. The imported title, SKU, color/size options and Shopify prices are then used to create the IMS item, while the supplier's JIT cost rate is used to derive its cost.
Customer and delivery data
Where the company's supported customer integration is enabled, incoming orders can be associated with Loyalty Customer records and delivery addresses. Verify the configured customer-matching behavior before relying on it for fulfillment.
Shipping charge
When Shopify reports a shipping charge, the integration adds it to IMS using the Shipping Item configured on the Shopify Access record. This is why every connected Store needs the correct Service Item mapping.
Automatic fulfillment logic
After a new online order is stored in IMS, normal IMS-stock items are allocated through the fulfillment network:
- The profile's Main Fulfillment Stores are checked first in their configured priority.
- If a required unit cannot be supplied there, IMS can check other active, transfer-enabled, non-online, non-damage Stores that have an Online Priority.
- Each allocated unit is reserved in the working fulfillment set so the same stock is not allocated twice within the order batch.
- IMS creates one Stock Transfer voucher per supplying Store to the mapped online Store, records the online Order No. against the transfer lines, updates stock balances and creates the transfer journal entries.
- The supplying Store sees the resulting voucher in Fulfillment Requests.
Inventory quantity sent to Shopify
The automatic inventory process is profile-aware. It considers only items belonging to suppliers allowed by the profile and only items that have an online Handle.
| Rule | Effect |
|---|---|
| Online-enabled item | If the IMS item is not marked available online, its calculated Shopify quantity is zero. |
| Eligible physical stock | Stock is summed from active, transfer-enabled physical Stores. Online Stores, inactive Stores, non-transfer Stores and Damage Locations are excluded. Damage-location stock may be awaiting inspection; exclusion does not establish a permanent write-off. |
| Profile exclusions | Stores in the profile's Excluded Stores list are not counted in the quantity sent to Shopify. |
| Damaged quantity | The item-level damagedQty is deducted separately from the eligible physical-store total. A transfer from a Damage Location adds to this item quantity; see Damage Locations. |
| Reduce By Qty | The item's configured Reduce By Qty is also deducted as an online safety/reserve quantity. |
| Negative result | Shopify is sent zero rather than a negative inventory value. |
The integration finds the Shopify product using the IMS Handle, then matches the exact variant by barcode and sets the inventory level at the Shopify Location ID configured for that Store.
Incremental inventory and mapping failures
The worker reads changes from IMS item-master and store-stock Delta timestamps. Each profile has its own last successful balance timestamp. A cycle captures a fixed safe upper timestamp from the database and reads changes at or after the saved timestamp and strictly before that upper timestamp. The following cycle includes the boundary. Both kinds of change select the item once, within the profile’s supplier scope. The profile cursor advances only after the inventory batch succeeds; temporary API/update failures leave it unchanged for another cycle. A profile without supplier configuration cannot consume the window.
Missing or nonunique products, missing product IDs and unmatched barcode variants do not all count as batch failures. Watermark advancement therefore does not prove every item was matched or updated. Review No Variants Found diagnostics, repair mapping and arrange a controlled inventory refresh when required.
Hypothetical inventory example
A profile has 12 units in eligible physical Stores, 3 in a damage Store, 2 units marked damaged on the item and a Reduce By Qty reserve of 1. The damage Store is excluded; the online quantity is 12 − 2 − 1 = 9. A later sale changes the stock Delta timestamp and selects the item for the next safe window. If the item is not online-enabled or the final quantity is negative, Shopify receives zero. Review profile exclusions separately: a Store excluded from this profile contributes no stock to this calculation.
Manual inventory maintenance
| Mode | Use |
|---|---|
| Update All | Recalculates and sends the complete eligible inventory set for the selected Shopify Store/location. |
| Update Drafts | Targets Shopify products in Draft status and updates the quantities of their matching IMS barcodes. |
| Style No. | Updates the Shopify quantities for IMS items belonging to one specified Style. |
| From File | Uses a text file of Item Codes to update a controlled list. It is also used to resume work after a long update is interrupted. |
Retrieve one Shopify order manually
The server UI includes Get Order for support/recovery work. The value entered here is the Shopify internal Order ID found in the Shopify URL, not the displayed Shopify Order Number. After Shopify returns the order, IMS stores the normal Shopify Order Number as its Order Reference.
In the worker, Get Order imports the order only; it does not create fulfillment transfers. It refuses an already imported order and is not a general fulfillment-replay tool. Verify and complete any required IMS fulfillment separately.
Operational settings
| Setting | Meaning |
|---|---|
| Company / Profile | Selects the independent worker whose settings, counters, active Stores and logs are displayed. |
| Interval | Seconds between automatic integration cycles. |
| Max Log rows | Controls live-log clearing and regular/error list-log file rotation. Zero leaves the live lists unbounded and disables their file persistence. Exception and explicit update-failure logs use separate paths. |
| Max API Calls per second | Local inventory-update throttle; it does not guarantee compliance with Shopify's effective API limits. |
| Run on startup | Starts automatic integration when the application starts and a valid profile is loaded; it does not establish operating-system startup registration or survival after the desktop session closes. |
| Start Minimized | Starts the application minimized. |
| Minimize to tray | Keeps the integration running from the notification area rather than the taskbar. |
Active Stores monitoring
The Active Stores grid shows the access records loaded for the profile, including Store name, Shopify Location ID, mapped IMS Local Store and Shopify product count. The integration periodically refreshes the product count and writes it back to the Shopify Access record, which is why Products Count is also visible in Manage Profiles.
The monitoring area also shows order/inventory errors, variant update/error counts and local API-rate-limit hits. A separate “No Variants Found” logging option can be enabled when barcode/handle mapping needs investigation.
Connection and recovery behavior
The integration keeps a reusable Shopify HTTP client with a 30-second request timeout and connection pooling. Product-count connectivity checks are retried, and long manual inventory jobs create error/resume files when repeated connection failures prevent completion.
The IMS database connection and company time zone come from secure IMS API bootstrap. Service configuration contains the HTTPS API address and protected credential-file path; operators do not enter company database passwords in the integration window. See Autos and Shopify service administration for enrollment and renewal.
Retry policies differ by operation: product-count checks retry selected connection/timeout failures up to three attempts with two-second delays; inventory product/variant/update operations use up to ten attempts with 1.5-second delays. Local logs can include contextual and database diagnostic information. Review and redact them before external sharing; these logs do not establish centralized alerting, retention or worker uptime.