Skip to content

Entitlement Activation

When an entitlement is created -- whether automatically from a paid quote or manually by an admin -- the system determines what downstream resources to provision. This page explains the auto-provisioning pipeline and manual override options.

The provisioning pipeline

How the class is determined

When a quote is paid, the system analyzes the line items to map each product to an entitlement class:

Product typeEntitlement class
WordPress pluginPLG
Managed hosting (Moodle, WP)ENV
Consulting, development, projectSVC
Generic purchase or subscriptionORD
Affiliate/partner membershipAFL
Training, course, mentoringEDU

This mapping is configurable by the admin. If the system cannot determine the class, it defaults to ORD (generic) and notifies the admin for reclassification.

Quotes with multiple line items of different classes create one entitlement per distinct class.

What happens per class

PLG (Software License)

  1. The system generates a license key via the license management layer.
  2. The license is linked to the entitlement and the Organization.
  3. The customer can activate the license on their sites from the portal.
  4. Download access is enabled for the associated product files.

See License Assignment for the full license flow.

ENV (Managed Environment)

  1. The system creates an Environment record linked to the entitlement.
  2. The admin is notified to provision the actual infrastructure (server, DNS, backups).
  3. The admin fills in environment details: URLs, platform type, server configuration.
  4. The customer sees the environment status in the portal once configured.

Environment provisioning is a manual process -- the system tracks the record, not the infrastructure. See Service Provisioning.

SVC (Service)

  1. The system creates a Service record linked to the entitlement.
  2. A Contract is created (if the provisioning policy enables auto-contract creation).
  3. A CreditBalance is initialized (even if starting at zero, to track consumption from the start).
  4. The admin can begin managing service requests against the entitlement.

See Service Provisioning and Contract Lifecycle.

ORD (Order)

  1. The entitlement is linked to the originating WooCommerce order.
  2. An invoice is generated via Stripe.
  3. The customer can track the order and download associated documents.

AFL (Affiliate)

  1. The system links the affiliate record from SolidAffiliate to the entitlement.
  2. The partner gains access to the affiliate dashboard in the portal.
  3. This class is typically provisioned from the SolidAffiliate approval hook, not from a quote.

EDU (Education)

  1. The entitlement grants access to training materials, courses, or mentoring sessions.
  2. Associated documents and downloads are linked.
  3. The customer accesses enrolled content from the portal.

Manual provisioning

Not all entitlements are created automatically. The admin can:

  • Create an entitlement manually from the admin panel, selecting the Organization, class, and product name.
  • Override automatic provisioning by setting the ProvisioningPolicy to auto: false for specific classes or products. The system creates the entitlement but waits for admin approval before provisioning downstream resources.
  • Re-provision if the initial provisioning failed. Failed provisioning is logged and the admin is notified for retry.

The provisioning policy

The ProvisioningPolicy controls how provisioning behaves at each level (global, class, organization, product, or individual entitlement):

SettingDefaultEffect
autotrueProvision downstream resources automatically
require_approvalnoneWho must approve before provisioning executes
retry_on_failuretrueRetry provisioning if it fails
max_retries3Maximum retry attempts
deprovision_on_cancelfalseAuto-deprovision when entitlement is cancelled

See Policies for more on policy configuration and the override hierarchy.

After provisioning

Once provisioning completes, the system fires the middag_entitlement_provisioned hook. This allows external systems and custom code to react -- for example, sending a welcome email, creating a Jira project, or notifying a Slack channel.

The entitlement is now active and visible to the customer in the portal under "My Products."