Supply Lens

Set up Capacity

Lesson 24 of 30 6 min read

Send orders to Capacity with the right ship method and residential flag using maps, and import Capacity shipments.

Capacity is a fulfilment provider, listed among the shipping integrations in Supply Lens. It appears in this course because projects that connect a storefront to Capacity spend most of their effort translating what the shop knows (a carrier service name, a tag on the order) into the codes Capacity needs. Its Order Configuration is made of two maps that do exactly that.

By the end of this lesson you'll be able to build Capacity's ship method and residential maps, and configure shipment import.

Orders: two translations

ShipMethodFromCarrierServiceMapMaps carrier service names (matched without regard to case) to Capacity ship method codes. A default can be set for services with no explicit mapping.
residentialFlagTagMapMaps order tags to the residential flag that tells Capacity whether an order is a residential delivery. Evaluated in order; the first matching tag decides. A default can be set for when no tag matches.

Note that the first setting's name starts with a capital S. Copy it exactly from Create Default JSON.

Ship method

The shop or ERP passes a carrier service name such as "Next Day" or "next day". Matching ignores case, so both hit the same entry. Always set a default, so an unfamiliar service still gets a valid Capacity ship method instead of failing.

Residential flag

Residential deliveries often cost more or use different services. Use a tag that the source writes (or one you generate) to say whether an order is to a business, and map it to the flag. Set the default to whichever is more common for the customer.

Rendering diagram...

Shipments

importDelayWait before importing a shipment so other systems can update it first.
setupDate / lastImportDateGo-live cut-off and watermark, managed by the system.

Good to know

The guide describes what each map does but doesn't show their JSON structure. Start from Create Default JSON and follow the shape it gives you.

Fern & Finch's US fulfilment

Fern & Finch ships US orders through Capacity. Their Magento shop offers "Standard", "Expedited" and "Overnight".

  • ShipMethodFromCarrierServiceMap maps each of those to the Capacity ship method codes the account manager supplied, with "Standard"'s code as the default.
  • Trade orders carry a channel tag of trade generated on the Magento order. The residentialFlagTagMap maps that tag to "not residential", with a default of "residential", because most orders go to homes.
  • Shipments import with a five-minute importDelay.

Recap

  • Capacity orders are shaped by two maps: ship method from carrier service, and residential flag from tags.
  • Carrier service matching ignores case; always set a default.
  • Tag maps are evaluated in order, first match wins.
  • Shipments use the usual import window settings.
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.