IMS Documentation

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.

Supporting componentThis is not a separate item on the IMS Shopify menu. It runs on the integration server and works behind Incoming Orders, Fulfillment Requests and Manage Profiles.

Component | Responsibility

AreaResponsibility
Order importReads 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 preparationFor normal IMS-stock merchandise, selects supplying Stores and creates IMS Stock Transfer vouchers toward the mapped online Store.
Inventory synchronizationCalculates the sellable IMS quantity and sends the quantity to the matching Shopify variant at each configured Shopify Location ID.
MonitoringMaintains automatic/manual logs, connection/error counters, Shopify product counts and API-rate monitoring.
Manual maintenanceProvides 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

  1. Check IMS PostgreSQL. The application confirms the IMS database connection before an automatic cycle continues.
  2. Refresh Shopify product counts. Each active Shopify Access Store is queried and its product count is written back to IMS.
  3. 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.
  4. Retrieve new online orders. The application reads Shopify orders whose fulfillment status is unfulfilled.
  5. 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.
  6. Create fulfillment transfers. IMS-stock items are assigned to supplying Stores and Stock Transfer vouchers are created toward the online Store.
  7. Push changed inventory. IMS items changed since the profile's last balance update are recalculated and their Shopify inventory levels are updated.
  8. 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.

JIT supplier notification is handled by IMS AutosAfter the Shopify Integration Server writes a new order into IMS, it does not itself send the JIT supplier email. IMS Autos independently checks for newly created online orders and sends Supplier/Brand order requests using the Mailing List configured in the Supplier master.

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.

JIT versus local stockA JIT item is not fulfilled from the normal Store stock network. Its purchasing effect is handled later by the Incoming Orders invoicing workflow.

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:

  1. The profile's Main Fulfillment Stores are checked first in their configured priority.
  2. 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.
  3. Each allocated unit is reserved in the working fulfillment set so the same stock is not allocated twice within the order batch.
  4. 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.
  5. 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.

RuleEffect
Online-enabled itemIf the IMS item is not marked available online, its calculated Shopify quantity is zero.
Eligible physical stockStock is summed from active, transfer-enabled physical Stores. Online Stores, inactive Stores, non-transfer Stores and damage Stores are excluded.
Profile exclusionsStores in the profile's Excluded Stores list are not counted in the quantity sent to Shopify.
Damaged quantitydamagedQty is deducted from the available total.
Reduce By QtyThe item's configured Reduce By Qty is also deducted as an online safety/reserve quantity.
Negative resultShopify 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.

Current automatic synchronizationThe active automatic path synchronizes inventory quantity. Price-update logic is not part of the active automatic synchronization path in this build.

Manual inventory maintenance

ModeUse
Update AllRecalculates and sends the complete eligible inventory set for the selected Shopify Store/location.
Update DraftsTargets 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 FileUses 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.

Different identifiersUse the URL's Shopify Order ID only for this server-side retrieval tool. Inside IMS, users normally work with the imported Order Reference/Order Number.

Operational settings

SettingMeaning
Profile IDThe active IMS Shopify profile handled by this running integration instance.
IntervalSeconds between automatic integration cycles.
Max Log rowsControls how many live log rows are retained in the application view; zero disables the limit.
Max API Calls per secondLocal throttle used by inventory update operations to avoid excessive Shopify API calls.
Run on startupStarts automatic integration when the application starts and a valid profile is loaded.
Start MinimizedStarts the application minimized.
Minimize to trayKeeps 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.

Related documentation