Configure onForumCreate, onForumUpdate, and onForumDelete

onForumCreate

When a forum is added to the Freshworks system, the onForumCreate event is triggered.

Subscribe to the onForumCreate event and register the callback by using the following sample manifest.json content.

manifest.json
"events": {
    "onForumCreate": {
        "handler": "onForumCreateCallback"
    }
}

Define the corresponding callback by using the following sample server.js content:

server.js
exports = {
    onForumCreateCallback: function(payload) {
        console.log("Logging arguments from onForumCreate event: " + JSON.stringify(payload));
    }
}

Attributes of the data object

  • actorobject

    Information pertaining to the entity who triggered the onForumCreate event.

  • associationsobject

    All associated objects of the forum object, that specify additional information pertaining to the forum.

  • forumobject

    Information pertaining to the forum that is created in the Freshdesk system.

onForumUpdate

When a forum is modified in the Freshworks system, the onForumUpdate event is triggered. Modifications to the following forum fields triggers the event:

  • Name
  • Description
  • Forum category associated with the forum
  • Visibility of the forum
  • Auto-conversion of topics in the forum to ticket

Subscribe to the onForumUpdate event and register the callback by using the following sample manifest.json content.

manifest.json
"events": {
    "onForumUpdate": {
        "handler": "onForumUpdateCallback"
    }
}

Define the corresponding callback by using the following sample server.js content:

server.js
exports = {
    onForumUpdateCallback: function(payload) {
        console.log("Logging arguments from onForumUpdate event: " + JSON.stringify(payload));
    }
}

Attributes of the data object

  • actorobject

    Information pertaining to the entity who triggered the onForumCreate event.

  • associationsobject

    All associated objects of the forum object, that specify additional information pertaining to the forum.

  • changesobject

    Changes that triggered the onForumUpdate event, specified as a JSON object of the following format:

    "changes": {
        "misc_changes": {},
        "model_changes": {
            //For non-array attributes
            "<forum.attribute that changed>": ["Old value", "New value"]
        },
        "system_changes": {}
    }

    Example

    "changes": {
        "misc_changes":{},
        "model_changes": {
            "name": [
              "Sample Forum",
              "Sample Forum updated"
            ]
        },
        "system_changes":{}
    }
  • forumobject

    Information pertaining to the forum that is created in the Freshdesk system.

onForumDelete

When a forum is deleted from the Freshworks system, the onForumDelete event is triggered.

Subscribe to the onForumDelete event and register the callback by using the following sample manifest.json content.

manifest.json
"events": {
    "onForumDelete": {
        "handler": "onForumDeleteCallback"
    }
}

Define the corresponding callback by using the following sample server.js content:

server.js
exports = {
    onForumDeleteCallback: function(payload) {
        console.log("Logging arguments from onForumDelete event: " + JSON.stringify(payload));
    }
}

Attributes of the data object

  • actorobject

    Information pertaining to the entity who deleted the forum details.

  • associationsobject

    All associated objects of the forum object, that specify additional information pertaining to the forum in the Freshdesk system.

  • forumobject

    Information pertaining to the forum deleted from the Freshdesk system.