Tenant status webhook

  1. Set up a web service listening for state changes. For example:

    https://www.awesomeapp.com/NotifyCustomerStateChange

  2. In the Developer Portal, go to your app page.

  3. Select Configuration.

  4. Select Integration settings.

    Configure notifications -screenshot

  5. Scroll down to the Customer state change section and enter the URL of your endpoint that SuperOffice should push notifications to when a tenant changes status.

    https://www.awesomeapp.com/NotifyCustomerStateChange

    Optionally, turn on Configure per Environment to set different URLs for SOD, Stage, and Production.

    Configure notifications per environment -screenshot

  6. Select Off/On to activate the endpoint (turn on data traffic).

  7. Click Save Settings or OK.

  8. Request to publish the new configuration.

You are now set to parse notifications when you get them.

Parse notifications

The application must take advantage of these notifications to ensure their environments are kept up-to-date with the status of SuperOffice CRM Online tenants.

While there are several ways to process tenant status changes notification, the following is a short example of what that might look like using .NET and C#.

Payload

The JSON payload contains the following information:

  • Tenant context identifier
  • The change type
  • A text representation of the installation version
  • The version of the file set
  • A JWT to verify it was sent by SuperOffice
  • The current public endpoint

Upgrade:

{
  "ChangeType": 0,
  "ContextIdentifier": "Cust12345",
  "VersionName": "Release 8.4 R08",
  "FileVersion": "8.4.12.1234",
  "Token": "eyJ234ASD...1234#"
}

Move endpoint:

{
  "ChangeType":5,
  "ContextIdentifier":"Cust12345",
  "VersionName":"Release_10.3.8_2024.08.30-01",
  "FileVersion":"10.3.8.2024",
  "Token":"eyJ....",
  "PublicEndpoint":"sod3.superoffice.com"
}

CustomerStateChangeNotificationType enumeration

[!code-csharpCS]

NotificationMessage

[!code-csharpCS]

API Controller and JWT validation

[!code-csharpCS]

Change type

The change type is a number value that corresponds to the operation performed on the tenant. The possible change types are:

TypeNameDescription
0UpgradeOccurs when a tenant installation is upgraded to a new version of SuperOffice.
1BackupRestoredOccurs when a tenant installation is restored from a backup.
2SuspendOccurs when a tenant installation is placed in suspension.
3ResumeOccurs when a tenant installation is resumed from another operation.
4DeleteOccurs when a tenant installation is deleted.
5MoveOccurs when a tenant is moved to another public endpoint. Check the PublicEndpoint value.