Activation Endpoint Specification

Overview

The DEXPRO Advanced Workflow BC app contacts an activation endpoint via HTTP POST to validate its license. The endpoint receives identification and usage data and must respond with HTTP 200 to confirm an active license. Any non-200 response is treated as a failed check.

Endpoint Contract

Request Body

Field Type Description Example
appId string (GUID) Unique ID of the AWF app extension. Same for all installations. "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
appVersion string Installed app version. "1.0.3.1"
installationId string (GUID) Unique ID generated per app installation. Stable across sessions. Useful for OnPrem where tenantId is "default". "f47ac10b-58cc-4372-a567-0e02b2c3d479"
tenantId string BC tenant ID. On SaaS this is a real GUID. On OnPrem this is typically "default". "b3f8c2a1-1234-5678-9abc-def012345678" (SaaS) or "default" (OnPrem)
companyId string (GUID) ID of the current BC company. "c9d0e1f2-3456-7890-abcd-ef1234567890"
companyName string Name of the current BC company. "CRONUS AG"
environmentName string Name of the BC environment. "Production" or "Sandbox"
isSaaS boolean true if running on Microsoft SaaS (Business Central Online). false if OnPrem/self-hosted. true
isSandbox boolean true if the environment is a sandbox. On SaaS this is controlled by Microsoft and reliable. On OnPrem this value is not trusted by the app (see OnPrem section). false
completedWorkflowsTotal integer Total number of completed workflow instances (all time, all companies in this tenant). 142
completedWorkflowsMonth integer Number of completed workflow instances in the current calendar month. 23

Example Request Body

{
  "appId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "appVersion": "1.0.3.1",
  "installationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "tenantId": "b3f8c2a1-1234-5678-9abc-def012345678",
  "companyId": "c9d0e1f2-3456-7890-abcd-ef1234567890",
  "companyName": "CRONUS AG",
  "environmentName": "Production",
  "isSaaS": true,
  "isSandbox": false,
  "completedWorkflowsTotal": 142,
  "completedWorkflowsMonth": 23
}

Automatic License Validation

The app automatically contacts the endpoint in these situations:

Trigger When
AWF Setup page opened On every page open
Role Center opened When the Workflow Activities card part loads
Workflow started Inside CheckTrialAndBlockIfNeeded() before each workflow execution

Timing Rules

Manual License Check

The AWF Setup page provides a "Check License" promoted action. This allows the administrator to manually trigger a license check at any time, bypassing the 24-hour and 15-minute timing intervals.

Use cases:

Behavior:

License States

State IsTrialMode() Activated Description
Trial Active true true App is in trial mode with remaining runs.
Trial Limit Reached true false Trial runs exhausted. App deactivated. All templates deactivated.
Licensed false true Valid license confirmed by endpoint.
Sandbox (SaaS only) varies varies SaaS sandbox environment. Unlimited usage, no trial counting.

Trial Mode Behavior

Licensed Mode Behavior

Sandbox Behavior (SaaS Only)

On SaaS environments where IsSandbox() is true:

OnPrem Environments

On OnPrem environments, sandbox mode is disabled entirely. Even if IsSandbox() returns true, the app treats it as a production environment. This is because OnPrem administrators can manipulate the environment type setting, which would allow bypassing trial restrictions. The isSandbox field in the JSON body still reflects the raw IsSandbox() value from BC, so the backend can see the environment's self-reported type — but the app itself does not trust it for licensing decisions on OnPrem.

Deactivation Side Effects

When the app is deactivated (trial expired or license revoked):

  1. AWFSetup.Activated is set to false.
  2. All active workflow templates are set to Active = false.
  3. This ensures that event subscribers in the integration engine exit early and do not interfere with standard BC processes.
  4. Templates are not automatically re-activated when the license is restored. The administrator must manually re-activate the desired templates.

Identification Strategy

Environment Primary Identifier Notes
SaaS tenantId + companyId tenantId is a real GUID assigned by Microsoft. tenantId alone is enough to identify a unique tenant of a customer
OnPrem installationId + companyId tenantId is "default" on OnPrem. installationId is a stable GUID generated once during first install.

Revision #2
Created 2026-06-24 12:41:41 UTC by Bernd Feddersen
Updated 2026-07-22 13:05:59 UTC by Bernd Feddersen