Department module

The Department module allows you to track changes made to departments in your SalesIQ portal. You can configure workflows to trigger when a department is created, updated, or deleted.

Payload delivery: Webhooks & Deluge

When a workflow is triggered, the event data is delivered as a payload. The way you access this payload depends on the action platform you choose:

  • Webhooks: The payload is sent as a POST request to the webhook URL you configured. Your external system can read the JSON body to process the event data.
  • Deluge Scripts: The payload is made available through the built-in entity parameter in your script. You can extract specific data using entity object based on the structure of the event.

To get the department's name from the "department.created" event:

Copied//Syntax
visitor_name = entity.get("<key_name>")
//Example
visitor_name = entity.get("display_name")

Events

Here is the list of events supported under the department module. 

department.created

You can subscribe to this event to be notified whenever a new department is created inside the portal.
 

Payload

Copied{
  "entity_type": "department",
  "org_id": "55778119",
  "event": "department.created",
  "entity_id": "40526000001808025",
  "attempt": 1,
  "version": "1",
  "entity": {
    "is_enabled": "true",
    "created_time": "1571032858870",
    "modified_time": "1571032858870",
    "operators": [
      "6000000000005"
    ],
    "is_system_generated": "false",
    "name": "Support",
    "is_public": "true",
    "email_configurations": {
      "missedchat_recipients": "",
      "cc_recipients": "",
      "is_blockip_mail_enabled": "true",
      "from_email": "tricia@zylker.com",
      "transcript_recipients": "tricia@zylker.com",
      "is_feedback_mail_enabled": "true",
      "blockip_recipients": "",
      "feedback_recipients": "",
      "is_missedchat_mail_enabled": "true",
      "is_cc_mail_enabled": "true",
      "is_transcript_mail_enabled": "true"
    },
    "description": "A team to support the visitors on your site",
    "id": "6000000009015",
    "display_name": "Zylker-support",
    "created_by": "6000000000005"
  },
  "event_time": "1567065647511",
   "customer_info": {
   "Branch": "California",
   "Band": "Premium"
  }
}
You can subscribe to this event to be notified when a department is deleted in the portal. 

Payload

Copied{
  "entity_type": "department",
  "org_id": "55778119",
  "event": "department.deleted",
  "entity_id": "40526000001808025",
  "attempt": 1,
  "version": "1",
  "event_time": "1567065647511",
   "customer_info": {
   "Branch": "California",
   "Band": "Premium"
  }
}

department.updated

You can subscribe to this event if you wish to be notified when department details are updated.

Payload

Copied{
  "entity_type": "department",
  "org_id": "55778119",
  "event": "department.updated",
  "entity_id": "40526000001808025",
  "attempt": 1,
  "version": "1",
  "entity": {
    "is_enabled": "true",
    "created_time": "1571032858870",
    "modified_time": "1571032858870",
    "operators": [
      "6000000000005"
    ],
    "is_system_generated": "false",
    "name": "Support",
    "is_public": "true",
    "email_configurations": {
      "missedchat_recipients": "",
      "cc_recipients": "",
      "is_blockip_mail_enabled": "true",
      "from_email": "tricia@zylker.com",
      "transcript_recipients": "tricia@zylker.com",
      "is_feedback_mail_enabled": "true",
      "blockip_recipients": "",
      "feedback_recipients": "",
      "is_missedchat_mail_enabled": "true",
      "is_cc_mail_enabled": "true",
      "is_transcript_mail_enabled": "true"
    },
    "description": "A team to support the visitors on your site",
    "id": "6000000009015",
    "display_name": "Zylker-support",
    "created_by": "6000000000005"
  },
  "event_time": "1567065647511",
   "customer_info": {
   "Branch": "California",
   "Band": "Premium"
  }
}