Skip to content

Subscription

The subscription node attaches a subscription object to msg.payload or msg.subscription.

ModeBehavior
AutoReads msg.req.ctx.user.subscription from the authenticated request.
Selected subscriptionFetches the selected ID from the Entitlement Service.

Auto mode is intended for flows downstream of an HTTP In node in an authenticated Smartunit request pipeline. Without a user context, the result is undefined.

Choose where the subscription is written:

  • msg.payload
  • msg.subscription

The rest of the incoming message is preserved.

Use the node before a Switch, Validate, or service action to branch on plan, entitlement, or subscription state. Check for a missing value before reading nested properties.

Subscription data is authorization-related. Do not rely only on a user-visible field when the protected service must also enforce access.