Entitlement & Credit Trigger Webhooks
Entitlement & Credit Trigger Webhooks
Entitlement and credit trigger webhooks fire based on your customers’ feature usage, not on data changes. They’re useful for notifying your team when customers are approaching or have hit a limit, and for surfacing in-app notifications to customers about their usage.
Entitlement trigger events
Entitlement triggers fire when a company’s usage for a specific feature crosses a threshold:
These percentages are fixed. They are not affected by a usage warning set on the entitlement, which is a value your app reads rather than a webhook trigger.
Each event fires once per feature per usage period. For trait-based features, which have no usage period, the event fires once per crossing and can fire again after usage falls back below the threshold.
Limit types explained:
- Hard limit (
limit) is the point at which access is restricted. For usage included with a plan, it represents that full usage amount. For pay as you go and overage pricing, it represents a (normally hidden) upper bound of usage you can configure, typically to prevent abuse or runaway spend. - Soft limit (
soft_limit) applies to overage pricing and marks the point at which users start being billed for usage. You configure it, and Schematic components show it to the user. - Tier limit (
tier_limit) applies to tiered pricing and fires as a company crosses into each successive pricing tier, letting you notify them of cost changes or prompt an upgrade.
Setup
Entitlement triggers must be configured per feature. When creating or updating a webhook endpoint in Schematic, add one or more entitlement trigger configs, each specifying the feature_id you want to monitor.
Payload
The body of each entitlement trigger webhook is typed as WebFeatureUsageWebhookOutput in the Node.js SDK:
Common use cases
- Internal alerts: Notify your team in Slack or your CRM when a customer hits a limit, so you can proactively reach out.
- Customer-facing notifications: Trigger an in-app banner or email to customers when they’re nearing or over their limit.
Credit trigger events
Credit triggers fire based on credit usage:
Credit triggers are configured per credit type, using a credit_id in the trigger config when creating or updating a webhook endpoint.
Credit purchase events
This event fires when a company successfully purchases a credit bundle:
Payload
credit.purchase.success is typed as CreditsCreditPurchaseSuccess:
Auto-topup events
These events fire on the outcome of a scheduled credit auto-topup:
Payload
auto.topup.success is typed as CreditsAutoTopupSuccess:
auto.topup.hard.failure is typed as CreditsAutoTopupHardFailure:
auto.topup.retry.exceeded is typed as CreditsAutoTopupRetryFailure:
Common use cases
- Internal alerts: Page your payments or ops team when a customer’s auto-topup is failing so you can reach out to update the payment method or remove access if you suspect abuse.
- Customer-facing notifications: Send a billing failure email to the customer so they can update their payment method.