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. |
One running profile
Each running instance is configured with one Profile ID. The application verifies that the profile is active, then loads all active Shopify Access records belonging to that profile. These records provide the Shopify Store URL/token, Shopify Location ID, mapped IMS Local Store and Shipping Item.
This is why Manage Profiles is the configuration source for the server integration rather than a separate set of Store definitions.
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 received-order history so the same Shopify order is not imported twice.
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
For Kuwait orders, the integration uses the customer's mobile number to find the existing Loyalty Customer. When no matching customer exists, it creates the customer and delivery address so Incoming Orders can display the customer/address relationship. Existing customers can receive an additional address when the imported address is new.
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 Stores are excluded. |
| Profile exclusions | Stores in the profile's Excluded Stores list are not counted in the quantity sent to Shopify. |
| Damaged quantity | damagedQty is deducted from the available total. |
| 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.
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.
Operational settings
| Setting | Meaning |
|---|---|
| Profile ID | The active IMS Shopify profile handled by this running integration instance. |
| Interval | Seconds between automatic integration cycles. |
| Max Log rows | Controls how many live log rows are retained in the application view; zero disables the limit. |
| Max API Calls per second | Local throttle used by inventory update operations to avoid excessive Shopify API calls. |
| Run on startup | Starts automatic integration when the application starts and a valid profile is loaded. |
| 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 can be configured from IMS DB using PostgreSQL Host, Port, Database, User ID and Password. After connection, the application uses the IMS-configured timezone and identifies its PostgreSQL session as IMS-Shopify together with the server machine name.