Provides outbound signed webhooks with IWebhookPublisher, inbound provider callbacks with IProviderWebhookInbox, subscription management, retry scheduling, and delivery logging for CrestApps Orchard Core.
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.
The Webhooks module is the one webhooks system of CrestApps.OrchardCore: outbound events the site posts to subscribed URLs, and the inbound provider webhook inbox that durably accepts callbacks from Twilio, Telnyx, Azure Event Grid, Stripe and other providers.
CrestApps.OrchardCore.Webhooks in the web/startup project. Contracts are in CrestApps.OrchardCore.Webhooks.Abstractions; services in CrestApps.OrchardCore.Webhooks.Core.[RequireFeatures(WebhooksConstants.Feature.Webhooks)]; the publisher only sends events an enabled feature declares, so a * subscription never receives events of a disabled feature.IWebhookPublisher or send through IWebhookSender.WebhookHandlerReplaySafety other than Unspecified (refused at startup) because delivery is at least once.| Feature | ID | Notes |
|---|---|---|
| Webhooks | CrestApps.OrchardCore.Webhooks | Subscriptions, delivery outbox, deliveries log, admin at Settings > Webhooks (/Admin/webhooks). Depends on nothing. |
| Provider Webhook Inbox | CrestApps.OrchardCore.ContactCenter.ProviderInbox | Enabled by dependency only. Keeps the ID it was released with inside Contact Center, but no longer depends on Contact Center. |
Permission Manage webhooks keeps its technical name ManageCommerceWebhooks (security critical), so existing roles keep it.
CrestApps.OrchardCore.Commerce.Webhooks and CrestApps.OrchardCore.AI.Webhooks keep their feature IDs and now depend on CrestApps.OrchardCore.Webhooks; neither keeps subscriptions, signing or retries of its own. The admin moved from Commerce > Webhooks to Settings > Webhooks, and the old Artificial Intelligence > Webhooks page and Manage AI webhooks permission are gone. Stored subscriptions and deliveries keep their YesSql type names and the Webhooks collection, so nothing is rewritten on upgrade.
| Piece | Contract | Implementation |
|---|---|---|
| Declare events | IWebhookEventProvider, or services.AddWebhookEvent(name, displayName, group, samplePayload) | Gathered by IWebhookEventCatalog |
| Publish | IWebhookPublisher.PublishAsync(eventName, payload[, eventId]) | Queues one WebhookDelivery per matching subscription, sent once the request's work is saved |
| Sign | IWebhookSigner | HmacSha256WebhookSigner, v1= plus hex HMAC-SHA256 of {timestamp}.{body} |
| Send once | IWebhookSender | One signed POST through the egress-guarded CrestApps.Webhooks HTTP client |
| Retry | Delivery outbox | Webhook deliveries background task: 1 min, 5 min, 30 min, 2 h, 6 h, 12 h, 24 h, then failed; a host the egress guard refuses fails at once |
[RequireFeatures(WebhooksConstants.Feature.Webhooks)]
public sealed class WebhooksStartup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddWebhookEvent("invoice.sent", "Invoice sent", "Invoices", new { invoiceId = "inv_1" });
services.AddScoped<IInvoiceHandler, InvoiceWebhookHandler>();
}
}
public sealed class InvoiceWebhookHandler : IInvoiceHandler
{
private readonly IWebhookPublisher _publisher;
public InvoiceWebhookHandler(IWebhookPublisher publisher)
{
_publisher = publisher;
}
public Task SentAsync(Invoice invoice, CancellationToken cancellationToken)
=> _publisher.PublishAsync("invoice.sent", new { invoiceId = invoice.Id }, cancellationToken);
}
IInvoiceHandler and Invoice stand for your own module's types.
A feature that posts to its own URL instead of to subscriptions (such as the AI Send Signed Webhook workflow task) calls services.AddWebhookSender() and sends through IWebhookSender, so it signs and guards egress the same way.
Built-in events include the commerce events in CommerceWebhookEvents (order.paid, stock.low, ...) and the AI events in AIWebhookEvents (conversation.started, conversation.ended, conversation.analyzed, conversation.transferred, conversation.evaluated, alert.triggered, alert.resolved). The receiving side (body, headers, signature check) is the same for every event; see the commerce webhooks reference in orchardcore-commerce.
Some receivers are not subscriptions: an AI agent platform gets a protocol's order updates at an address its protocol names, signed the way that protocol asks (see orchardcore-agentic-commerce). Queue them with IWebhookOutbox.EnqueueAsync(WebhookDirectDelivery) (registered by AddWebhooks with the Webhooks feature) and sign them with an IWebhookDeliveryFormatter (Name, FormatAsync(WebhookFormatContext) returning WebhookFormattedRequest.Headers, or WebhookFormattedRequest.Fail(message) to fail the delivery). They are kept as WebhookDeliverys, sent in a deferred task after the work that raised them is saved, and retried by the same WebhookDispatcher, backoff and retention as subscription deliveries.
WebhookDirectDelivery has Url, EventName, Body (sent byte for byte), optional EventId (evt_ plus a new id when empty), FormatterName, OwnerId (such as the platform id) and Data for the formatter. Put ids only in Data, never secrets: the formatter reads secrets at each attempt, so a rotated secret is used by the next retry. WebhookFormatContext gives Url, EventId, EventName, Body, Data and the attempt's Unix Timestamp. A direct delivery is posted through the egress-guarded IWebhookSender with the formatter's headers and without the subscription signature; it fails unsent when no formatter of its name is registered (the feature that queued it is off) or the formatter returns an error.
public sealed class ContosoOrderWebhookFormatter : IWebhookDeliveryFormatter
{
public string Name
=> "contoso-order";
public Task<WebhookFormattedRequest> FormatAsync(WebhookFormatContext context, CancellationToken cancellationToken = default)
{
var formatted = new WebhookFormattedRequest();
formatted.Headers["Webhook-Id"] = context.EventId;
formatted.Headers["Webhook-Timestamp"] = context.Timestamp.ToString(CultureInfo.InvariantCulture);
return Task.FromResult(formatted);
}
}
services.AddScoped<IWebhookDeliveryFormatter, ContosoOrderWebhookFormatter>();
// Elsewhere, with IWebhookOutbox injected:
await _outbox.EnqueueAsync(new WebhookDirectDelivery
{
OwnerId = platformId,
Url = "https://agents.contoso.com/orders",
EventName = "order.updated",
Body = body,
FormatterName = "contoso-order",
}, cancellationToken);
WebhookDeliveriesBackgroundTask deletes delivered and failed deliveries older than WebhookDeliveryRetentionOptions.DeliveryRetention (30 days; zero or less keeps all). Pending deliveries and events in KeptEventNames are never deleted. AI Webhooks adds every AI event (AIWebhookEvents.All), so AI deliveries, including the history copied from the old AI log by AIWebhookIndexMigrations, are kept.
services.Configure<WebhookDeliveryRetentionOptions>(options =>
{
options.DeliveryRetention = TimeSpan.FromDays(90);
options.KeptEventNames.Add("order.refunded");
});
Subscriptions travel with the Webhook subscriptions deployment step and the WebhookSubscriptions recipe step, matched by ItemId. The protected secret is never exported; a recipe may carry a plain Secret, and a new subscription without one gets a new secret. Url must be a full https:// URL not on the site's own network, and Events needs at least one event or *.
{
"steps": [
{
"name": "WebhookSubscriptions",
"Subscriptions": [
{
"ItemId": "4k5y9m2x7q1c8w3n0p6r5t2v9z",
"Name": "ERP",
"Url": "https://erp.example.com/hooks",
"Events": [ "order.paid", "order.refunded" ],
"IsEnabled": true
}
]
}
]
}
IProviderWebhookInbox.AcceptAsync with a ProviderWebhookInboxDelivery (ProviderName, DeliveryId, HandlerName, Payload). The delivery is committed before the endpoint answers; a repeat of the same provider and delivery id is Duplicate on every node.AfterResponseWork (from CrestApps.OrchardCore.Core).Deliveries are items of the platform's leased work queue (ILeasedWorkQueue<T>), with a five-minute lease; completed deliveries are kept at least seven days as idempotency tombstones. Inbox documents keep the ContactCenter YesSql collection. A feature can hold the dispatcher back with IProviderWebhookInboxDispatchGate.
Answer 2xx for Accepted and Duplicate; for Busy, or when AcceptAsync throws, answer 409 or 503 so the provider sends again.
A delivery can carry the traceparent of the request that received it (ProviderWebhookInboxDelivery.TraceParent, captured with TraceContextPropagation.Capture()); when empty the inbox captures the current trace at acceptance, and the dispatch span links back to it. A dead-lettered delivery is now logged as an error (event id 17950) instead of being dropped silently.
On the CrestApps.OrchardCore.Webhooks meter: crestapps.webhook.deliveries (outbound attempts; outcome = ok, retry, error; reason such as network, status_5xx, egress_refused, exhausted, deleted, disabled, no_secret; status_class), crestapps.webhook.inbox.accepted (result = accepted, duplicate, busy), crestapps.webhook.inbox.dispatches, crestapps.webhook.inbox.handler.duration, crestapps.webhook.inbox.lag, crestapps.webhook.inbox.dead_lettered and crestapps.webhook.inbox.pending.age; span crestapps.webhook.inbox.dispatch. An outbound delivery that fails for good logs event id 17901. Both background tasks report on crestapps.background_task.*, so a swallowed failure shows as error. See orchardcore-observability.
See Webhooks examples for a full inbox handler, the endpoint call and the signature validators.
What SKILL.md sets; muted values are Claude Code's defaults
/crestapps-orchardcore:orchardcore-webhooksfrom 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./orchardcore-addressesSkill for the CrestApps Orchard Core Addresses module (CrestApps.OrchardCore.Addresses, Addresses.Countries, Addresses.GooglePlaces). Covers the immutable Address value shared by customers, checkout, orders, shipping and taxation, per-country address formats from Google address data with AddAddressesCore, IAddressFormatProvider and AddressFormat, IAddressValidator and AddressProblem, IAddressFormatter, the AddressEditor shape with IAddressEditorService and AddressEditorOptions, CreateAddressEditorAsync and CreateAddressDisplayAsync, ICountryService and managed Country content items, address suggestions through IAddressAutocompleteProvider, ContactInfo, NamedAddress and IShippingAddressBook, the Google Places provider with its protected API key, the address-autocomplete rate-limit group, and the ManageAddressSuggestions permission. Use it when requests mention Orchard Core addresses, international address formats, address validation, a country list, address autocomplete or Google Places./orchardcore-advanced-seoSkill for the CrestApps Orchard Core Advanced SEO module (CrestApps.OrchardCore.Seo), which publishes schema.org structured data as one JSON-LD graph per page and for NLWeb answers. Covers the Schema.org part (SchemaOrgPart, SchemaOrgPartSettings with SchemaType and property mappings from Content, Fixed, Editor or Liquid sources), the StructuredDataSettings site settings and their deployment step, the ManageAdvancedSeoSettings permission, Orchard Core SEO, Search, Products and Reviews integration, the getSchemaOrgOptions, configureContentTypeSchemaOrg and configureSiteStructuredData AI tools, describing pages in code with IPageStructuredData, the structured-data tag helper and the structured_data Liquid filter, and extending with IStructuredDataProvider, ContentPartStructuredDataProvider and SelfDescribingParts. Use this skill when requests mention schema.org, JSON-LD, structured data, rich results, Google required properties, product or article markup, or Advanced SEO in Orchard Core./orchardcore-agentic-commerceSkill for the CrestApps Orchard Core Agentic Commerce module (CrestApps.OrchardCore.AgenticCommerce), which lets AI agents such as Gemini and ChatGPT buy from the store with the Universal Commerce Protocol (UCP), the Agentic Commerce Protocol (ACP) and the AP2 mandates extension (preview). Covers every feature (UCP, account linking, catalog and cart, MCP and A2A bindings, ACP, Agent Product Feeds, AP2), the /.well-known/ucp and /.well-known/acp.json discovery documents, checkout session endpoints, agent platforms and their sign-in, AgenticCommerceSettings, store signing keys in Secrets, idempotency, payment handlers (Stripe shared payment tokens, Google Pay, test credentials), delegated 3-D Secure, embedded checkout, signed order updates, the AgentPlatforms recipe step, and extending with IAgentPaymentHandler, IUcpProfileContributor, IUcpCheckoutExtension and IAgentOrderPublisher. Use it when requests mention agentic commerce, selling through AI agents, UCP, ACP, AP2, agent checkout or agent product feeds./orchardcore-agreementsSkill for the CrestApps Orchard Core Agreements module (CrestApps.OrchardCore.Agreements), support and maintenance contracts with accounts. Covers the Agreement record with its SA- number, status, period and covered hours (a block or a monthly allowance with rounding), Content > Agreements, the account Service tab, the ManageAgreements and ViewAgreements permissions, the Agreements recipe and deployment step, module terms in Properties with IAgreementTermsValidator, IAgreementUsageProvider and IAgreementBalanceService, the hourly lifecycle task with IAgreementObserver, account manager notifications, and the Agreement Usage and Burn-down reports. Use this skill when requests mention service agreements, support contracts, prepaid or retainer hours, entitlements or agreement expiry. Strong matches include Agreement, AgreementHours, AgreementStatus, AgreementBalance, AgreementUsage, IAgreementManager, IAgreementObserver and TicketAgreementTerms.Other plugins' skills for the same job