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. The worker is a Windows desktop application, rather than a Windows service. It runs on the integration computer 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.

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

  1. Select the company and profile and verify its Active Stores and last error.
  2. Set that profile’s interval, logging, API throttle and Run on startup preference.
  3. Click Start for automatic processing. Connection and product-count checks run first; the first cycle follows one configured interval.
  4. 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.
  5. 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

  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 profile/Store/order-reference identity. An already imported order is not imported again by ordinary retrieval.

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

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:

  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.
Import and fulfillment have separate outcomesAn imported order can exist without completed fulfillment transfers. Review its linked transfers in Incoming Orders and use the supported order workflow with qualified support to complete any outstanding fulfillment; repeating retrieval does not replay fulfillment. IMS transfer preparation is distinct from Shopify fulfillment completion and Store-side packing confirmation.

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 Locations are excluded. Damage-location stock may be awaiting inspection; exclusion does not establish a permanent write-off.
Profile exclusionsStores in the profile's Excluded Stores list are not counted in the quantity sent to Shopify.
Damaged quantityThe 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 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. It does not publish item titles, images, online descriptions or prices to Shopify. An item-master change can select the item for quantity recalculation without turning this inventory cycle into a metadata or price synchronization service.

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

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.

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

SettingMeaning
Company / ProfileSelects the independent worker whose settings, counters, active Stores and logs are displayed.
IntervalSeconds between automatic integration cycles.
Max Log rowsControls 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 secondLocal inventory-update throttle; it does not guarantee compliance with Shopify's effective API limits.
Run on startupStarts 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 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 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.

Related documentation