Skip to main content

Summary

This workflow identifies all PSA configurations tied to offboarded clients, lists them for review, and sets them to inactive. It streamlines client offboarding by ensuring configuration data is properly deactivated, reducing clutter and preventing billing or management errors. The workflow supports manual, scheduled, and event-driven execution and includes safeguards such as dry runs and approval steps.

Usage

Prerequisites

Before using this workflow, ensure the following requirements are met:

  1. PSA Integration: Configure your PSA system integration (ConnectWise Manage, Autotask, HaloPSA, etc.) with permissions to read and update configurations.
  2. Offboarding Criteria: Define what qualifies a client as offboarded (status, tag, contract end date, etc.).
  3. Audit Policy: Decide whether to log deactivation details or require approvals before changes.

Configuration Steps

  1. Import the workflow into your Rewst environment.
  2. Configure the PSA integration credentials and base URL.
  3. Define offboarding filters (status, tags, or contract conditions).
  4. Configure any optional safeguards (approval step, dry-run, or partial scope).
  5. Test against a single offboarded client before enabling broad execution.

Workflow Inputs

The workflow accepts the following input parameters:

ParameterTypeRequiredDescription
client_idStringConditionalPSA client/company ID to process (required if client_name not provided)
client_nameStringConditionalPSA client/company name to process (required if client_id not provided)
offboarded_statusesArrayNoClient statuses treated as offboarded
dry_runBooleanNoPreview changes without applying them. Default: false
require_approvalBooleanNoRequire approval before deactivation. Default: false
include_archivedBooleanNoInclude archived configs in the listing. Default: false
reasonStringNoReason for deactivation (stored in logs/audit)

Execution

Manual Trigger

  1. Navigate to the workflow in the Rewst platform.
  2. Click "Run Workflow".
  3. Provide client_id or client_name.
  4. Review the configuration list and execute.

Scheduled Execution

Schedule the workflow to run after offboarding windows (e.g., nightly or weekly) to deactivate configs for recently offboarded clients.

Event-Driven Trigger

Trigger the workflow when a client status changes to an offboarded state in the PSA.

API Trigger

Call the workflow via the Rewst API for integration with external offboarding systems.

Post-Execution Steps

After successful completion:

  1. Review the list of deactivated configurations.
  2. Confirm configs are inactive in the PSA.
  3. Verify no active billing or alerts are tied to the deactivated configs.

Returned Data

The workflow returns the following data upon completion:

{
"success": true,
"client_id": "12345",
"client_name": "Example Client",
"timestamp": "2026-01-22T10:30:00Z",
"statistics": {
"configs_found": 18,
"configs_deactivated": 18,
"configs_skipped": 0,
"errors": 0
},
"configs": [
{
"config_id": "9876",
"config_name": "Firewall - HQ",
"status": "inactive",
"previous_status": "active"
}
],
"warnings": [],
"errors": []
}

Return Data Fields

FieldTypeDescription
successBooleanIndicates whether the workflow completed successfully
client_idStringPSA client/company ID processed
client_nameStringPSA client/company name processed
timestampStringISO 8601 timestamp of the operation
statisticsObjectSummary of the deactivation operation
statistics.configs_foundIntegerNumber of configurations found
statistics.configs_deactivatedIntegerNumber of configurations set to inactive
statistics.configs_skippedIntegerNumber of configurations skipped
statistics.errorsIntegerNumber of configurations that failed to update
configsArrayList of configurations processed with status details
warningsArrayNon-critical warnings or notices
errorsArrayAny errors encountered during execution

Error Handling

If the workflow encounters errors, the response will include detailed error information:

{
"success": false,
"errors": [
{
"code": "ConfigUpdateFailed",
"message": "Unable to deactivate configuration",
"timestamp": "2026-01-22T10:30:15Z",
"config_id": "9876"
}
]
}

Common error codes:

  • ClientNotFound: The specified client could not be found
  • ConfigNotFound: No configurations were found for the client
  • ConfigUpdateFailed: Unable to update configuration status
  • PermissionDenied: Insufficient PSA API permissions
  • PSAConnectionError: Unable to reach PSA API

Changelog

2026-01-22

  • Initial version of the document