Guides setup and extension of the CrestApps Orchard Core Fulfillment Partners engine for sending paid orders to print-on-demand, dropshipping, or 3PL services. Covers IFulfillmentProvider, FulfillmentSender, order claiming, retries, and permissions.
Ships in crestapps-orchardcore. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an Orchard Core expert. Generate accurate setup, extension and troubleshooting guidance for the CrestApps Fulfillment Partners engine, which connects a store to the outside companies that make and ship its products (print-on-demand services, dropshippers, third-party warehouses). The engine assigns each order line to one partner, reserves the units in a Shipping shipment, sends paid orders once and leaves unclear outcomes to a person. It ships no partner: each company is a provider module implementing IFulfillmentProvider, from this repository or your own solution.
CrestApps.OrchardCore.Fulfillment (and each partner's package) in the web/startup project.CrestApps.OrchardCore.Fulfillment; it turns on Commerce, Orders and Shipping (see orchardcore-orders, orchardcore-shipping). Enable one feature per partner on top.FulfillmentSender, under the order's lock, with a bounded timeout.OrderId as the partner's external reference when the partner supports one, so a retry cannot create the order twice.ProtectedSettingExtensions), never in plain settings or recipes.{ "steps": [...] }.sealed modifier, except View Models.| Feature | ID | Depends on |
|---|---|---|
| Fulfillment Partners | CrestApps.OrchardCore.Fulfillment (FulfillmentConstants.Features.Fulfillment) | Commerce (CrestApps.OrchardCore.Commerce), Orders (CrestApps.OrchardCore.Orders), Shipping (CrestApps.OrchardCore.Shipping) |
Projects: CrestApps.OrchardCore.Fulfillment.Abstractions (IFulfillmentProvider, the models, FulfillmentConstants, FulfillmentPermissions, FulfillmentNames; the only package a provider needs), CrestApps.OrchardCore.Fulfillment.Core (FulfillmentRequest, FulfillmentSender, FulfillmentSettings, IFulfillmentRequestHandler, stores and the paid-order handler) and the module (admin, drivers, notifications, background task).
{
"steps": [
{
"name": "Feature",
"enable": [
"CrestApps.OrchardCore.Fulfillment"
],
"disable": []
}
]
}
| Menu | Route | Permission |
|---|---|---|
Settings > Commerce > Fulfillment Partners (settings group fulfillment-partners, FulfillmentConstants.SettingsGroupId) | Admin/Settings/fulfillment-partners | ManageFulfillmentPartners |
| Commerce > Fulfillment Requests | FulfillmentAdminController.Index | FulfillOrders (Shipping) |
Fulfillment partners card on an order's admin page (DetailAdmin) | Order page | FulfillOrders |
The settings page lists every registered partner with a Connected or Not connected badge (from IsConnectedAsync), each provider's own settings card, and Send paid orders automatically. With no partner feature on, it says to turn one on under Tools > Features.
IShipmentService.GetRemainingAsync, physical lines only. If three units were ordered and one was shipped by hand, the partner gets two.ClaimLinesAsync. Claims larger than what is left are capped; claims for lines not left are ignored. Two partners claiming the same line makes the request Needs attention naming the line and partners, and neither is called. A partner that claims nothing gets Nothing to send and is not called. A partner whose claim throws is skipped for the others and is Needs attention for itself.IShipmentService.CreateAsync(..., ship: false), noted "Sent to partner"), saved in the same commit as the request's Sending status.SubmitAsync receives only the lines assigned to that partner and is cancelled after FulfillmentConstants.SubmitTimeout (2 minutes). A timeout or exception is Needs attention, shipment kept.ShipAsync) marks it shipped and updates Order.FulfillmentStatus. Refused or partner Nothing to send deletes the shipment and frees the units. Retry later keeps the shipment and retries with a growing wait, at most 10 times. Needs attention keeps the shipment so nobody ships the units by hand by mistake; Send again reuses it. A reserved shipment shipped by hand meanwhile makes a resend send nothing.Concurrency: recording, assigning, reserving and calling happen under a distributed lock on the order held longer than the partner call may take; the request is re-read from the database after the lock (FulfillmentRequestStore.FindCommittedAsync), and a request another worker won returns FulfillmentSendResult.TakenByAnotherWorker instead of an error. A request stuck in Sending for 15 minutes (the site stopped mid-call) is flagged Needs attention (FlagStuckAsync).
FulfillmentRequestStatus | Meaning |
|---|---|
Pending | Recorded, waiting to be sent (also the state of a Retry later, shown as Waiting to be sent) |
Sending | Shipment reserved, partner being called |
Sent | The partner has the order (ExternalOrderId, SentUtc) |
NothingToSend | Nothing left in the order is this partner's |
NeedsAttention | Not sent, or not certain it arrived; the reason says why |
A request stores a reason code (FulfillmentReasons, such as NotPaid, Refunded, OpenDispute, Pickup, NoAddress, Bundle, NothingLeft, NotClaimed, ConflictingClaims, TooMany, AlreadySent, ProviderDisabled, ShippedByHand, Refused, Unclear, Interrupted, PartnerNothingToSend, ClaimFailed, GaveUp, RetryLater, Waiting, Sent) with ReasonArguments, never a sentence; FulfillmentRequestText localizes it. The partner's own Message is kept as it came.
FulfillmentRequest (collection Fulfillment, one per order and partner, FulfillmentRequestIndex by order, order number, partner, shipment, status, due time and last change): OrderId, OrderNumber, ProviderName, Status, Lines (FulfillmentRequestLine: LineId, Title, Sku, Quantity), ShipmentId, ExternalOrderId, Reason, ReasonArguments, Message, Attempts, NextAttemptUtc, CreatedUtc, ModifiedUtc, SentUtc. Requests are operational records like orders and shipments: no recipe or deployment step.
FulfillmentSettings.SendAutomatically, FulfillmentOrderEventHandler.PaidAsync records a pending request for each connected partner in the payment's unit of work (reading saved settings only, calling no partner). The Send orders to fulfillment partners background task (* * * * *) sends due requests and flags stuck ones.With OrchardCore.Notifications on, a request that becomes Needs attention notifies once the Administrator role and every role with FulfillOrders, in the notification center with a link to the order (type FulfillmentNeedsAttention, FulfillmentConstants.NeedsAttentionNotificationType, which people can turn off in their preferences). React in code with IFulfillmentRequestHandler.NeedsAttentionAsync(request), called once per transition after the request is saved.
An order line's Title already names its variant (such as Tee (White / S)), so FulfillmentOrderLine.Title is the line title as is; do not append VariantTitle again (fixed in #1346 for partners and agent order views). Use VariantId and Sku to map to the partner's catalog.
A provider is a module that depends on CrestApps.OrchardCore.Fulfillment and references CrestApps.OrchardCore.Fulfillment.Abstractions.
| Member | Contract |
|---|---|
Name | Technical name stored requests refer to; never change it |
DisplayName | LocalizedString shown to people |
IsConnectedAsync() | Reads saved settings only; the settings page, order card and paid-order handler call it |
TestConnectionAsync(ct) | Calls the partner with saved credentials (the engine does not call it; a provider's settings card offers it); refusals and outages are FulfillmentConnectionResult.Failure(message), not exceptions |
ClaimLinesAsync(order, ct) | Returns a FulfillmentLineClaim(LineId, Quantity) per line of the FulfillmentOrder it makes, typically from a part on the published product; creates nothing at the partner |
SubmitAsync(order, ct) | Sends the order (only this partner's lines), honors the token, returns FulfillmentSubmitResult.Sent(externalOrderId, message), NothingToSend, RetryLater, Refused or NeedsAttention |
FulfillmentOrder carries OrderId, OrderNumber, ShippingAddress (the Addresses Address the order stores), Email, Phone and Lines (FulfillmentOrderLine: LineId, ContentItemId, VariantId, Sku, Title, Quantity). FulfillmentNames.Split(name) splits a full name into the first word and the rest (a single word has no last name).
Register it scoped, add a SiteDisplayDriver<TSettings> on FulfillmentConstants.SettingsGroupId that checks FulfillmentPermissions.ManageFulfillmentPartners, call services.AddSiteSettingsPermission(FulfillmentConstants.SettingsGroupId, FulfillmentPermissions.ManageFulfillmentPartners), keep secrets with ProtectedSettingExtensions (ApplySecret, HasSecret, UnprotectSettingOrDefault, namespace CrestApps.OrchardCore.Core.Security), and describe the settings to CrestApps Recipes with a SiteSettingsSchemaBase. A complete provider is in references/provider-example.md.
FulfillmentSettings travels with Orchard Core's Settings step and the Fulfillment settings deployment step (AddSiteSettingsPropertyDeploymentStep<FulfillmentSettings, ...>); CrestApps Recipes knows it through FulfillmentSettingsSchema. Partner credentials are protected: enter them again on another site.
{
"steps": [
{
"name": "Settings",
"FulfillmentSettings": {
"SendAutomatically": true
}
}
]
}
| Permission | Allows | Default roles |
|---|---|---|
ManageFulfillmentPartners ("Manage fulfillment partners and their credentials", security critical) | Settings > Commerce > Fulfillment Partners and partner credentials | Administrator |
FulfillOrders (Shipping, "Ship orders and update their shipments") | The order card, sending, Send again, Commerce > Fulfillment Requests, and typing tracking numbers on the reserved shipment | Administrator, Store manager, Warehouse |
| Symptom | Check |
|---|---|
| No partner listed on the settings page | No provider feature is enabled; the engine ships no partner |
| Partner shows Not connected | Its settings card is incomplete; IsConnectedAsync reads saved settings only, so a wrong but present key still shows Connected until a send fails |
| Order card has no send button | The order is not paid, is fully refunded, has an open dispute or was anonymized; the user needs FulfillOrders |
| Request Nothing to send | No partner claimed the remaining lines, everything left was shipped by hand, only bundle lines remain, or the order is a pickup |
| Needs attention with conflicting claims | Two partners claim the same line; fix the product's partner setup so only one claims it, then Send again |
| Needs attention after a timeout | The partner may have the order: check its dashboard before Send again (which reuses the reserved shipment) |
| Paid orders are not sent automatically | Turn on Send paid orders automatically and make sure background tasks run (Tools > Background Tasks) |
| Units look reserved but nothing shipped | The pending shipment holds them while the partner makes the order; type the tracking number on it when it ships |
| No notification for Needs attention | Enable OrchardCore.Notifications; the user's role needs FulfillOrders and the notification type must not be turned off |
| Line title shows the variant twice | A custom provider appends VariantTitle; the line Title already includes it |
Related skills: orchardcore-orders (order events, the order page), orchardcore-shipping (shipments, FulfillOrders), orchardcore-commerce (suite map), orchardcore-products (product parts a provider reads).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
orchard-core, fulfillment, print-on-demand, dropshipping, ecommerce
/crestapps-orchardcore:orchardcore-fulfillmentfrom crestapps-orchardcore
npx claudepluginhub crestapps/crestapps.agentskills --plugin crestapps-orchardcore137 skills in this plugin
/orchardcore-accountsSkill for the CrestApps Orchard Core Accounts module (CrestApps.OrchardCore.Accounts) with its Account Members, Account Team, Account E-mail Domains and Account Locations features. Covers the Account type and AccountPart, the account picker and search, IAccountChildTypeRule, account page sections (AccountPageTabs, AddPageSection, Notes), members and IAccountMemberService, account invitations, the account owner and team picked from staff, e-mail domains, locations with a billing location, the account's billing profile and party members, the Accounts recipe and deployment steps, and the admin menu. Use this skill when requests mention accounts, the businesses or households records belong to, an account page tab, members, invitations, owners, domains or locations. Strong matches include AccountPart, AccountPageTabs, IAccountMemberService, IAccountInvitationService, AccountInvitation, AccountTeamPart, AccountEmailDomainsPart, IAccountEmailDomains, AccountLocationsPart and ManageAccountMembers./orchardcore-accounts-b2bSkill for the CrestApps Orchard Core Accounts B2B module (CrestApps.OrchardCore.Accounts.B2B), business selling on an Account content item. Covers B2BAccountPart and B2BAccount, buyers as account members and ship-to addresses as account locations, terms (deposit, net days, credit limit) through the account-terms tender billed to the account, the account's billing profile, purchase order numbers, quotes, price lists through IBuyerPriceProvider, order limits, approvals and budgets, OCI punchout, the account/business page and API, the PriceLists recipe and deployment steps, the B2BAccounts report source, and the move from the removed Companies module. Use this skill when requests mention B2B, wholesale or business buyers, net terms, purchase orders, price lists, order approvals or punchout. Strong matches include B2BAccountPart, B2BAccount, AccountTerms, AccountTermsTenderProvider, B2BAccountBillingProfileSource, IB2BAccountStore, PriceList, B2BPriceProvider, B2BApprovalService and ManageB2BAccounts.Other plugins' skills for the same job