Supply Lens

ControlPort settings and gotchas

Lesson 20 of 28 6 min read

Configure ControlPort's tag maps, the carrier service to postage map, batch-aware stock imports and shipments.

This lesson works through ControlPort's settings in three decisions: how each order is classified, how postage is chosen, and how stock is imported.

Decision 1: classify each order from its tags

tagChannelAccountIdMapMaps order tags to a ControlPort channel account id. Evaluated in order; the first matching tag decides.
tagOrderTypeMapMaps order tags to a ControlPort order type. Evaluated in order; the first matching tag decides.
tagAllowPreorderMapMaps order tags to whether pre-ordering is allowed for that order. Evaluated in order; the first matching tag decides.

Order matters

Each map stops at the first matching tag. If an order could carry two relevant tags (say wholesale and subscription), put the one that should win first.

Decision 2: carrier service to postage

ControlPort describes postage as a set of options rather than a single service code. carrierServiceShippingMap maps each carrier service name (matched case-insensitively) to a ControlPort shipping configuration:

postageSpeedUrgent, Priority, Standard or Economy.
allowSaturdayWhether Saturday delivery is permitted.
signedForWhether a signature is required on delivery.
noSignatureWhether to suppress the signature requirement.
trackedWhether the shipment should be tracked.

For example, a storefront service called "Next Day Signed" might map to postageSpeed Priority with signedFor and tracked both true. "next day signed" in lower case matches the same entry.

Decision 3: stock levels and batches

includeWarehouseIdsControlPort warehouse ids to include. Empty includes all warehouses.
importBatchesWhen true, batch numbers are imported with stock, for batch-level tracking. Off when false or unset.
takeLatestBatchOnConflictWhen true and several batches of the same product conflict during import, the most recently created batch is used. When false, a different resolution strategy applies.

Batches need a batch-aware destination

Only turn on importBatches if the ERP receiving the stock tracks batches. Check with Supply Lens how conflicts are resolved when takeLatestBatchOnConflict is false, as the guide does not say.

Shipments

The ControlPort Shipment group has only the standard import window: setupDate, lastImportDate and importDelay.

Rendering diagram...

Juniper Pet Co's configuration

  • tagChannelAccountIdMap: subscription → the subscription channel account, then one-off → the retail channel account.
  • tagOrderTypeMap: the same two tags to the warehouse's two order types.
  • tagAllowPreorderMap: subscription → allowed.
  • carrierServiceShippingMap: Standard → Standard, tracked; Express → Priority, tracked, signed for.
  • importBatches: on, because Juniper's ERP tracks batches of pet food by best-before date.

Recap

  • Channel account, order type and pre-order rules come from the first matching tag, so tag order matters.
  • carrierServiceShippingMap maps service names, case-insensitively, to postage speed, Saturday, signature and tracking options.
  • Inventory can be limited by warehouse and can carry batches; takeLatestBatchOnConflict picks the newest batch on a conflict.
  • Shipments use only the standard import window.
Complete and take the quiz

Your progress is saved in this browser. Create a free account to keep it everywhere, take quizzes and earn certificates.