Configure onChangeCreate and onChangeUpdate

Marketplace Platform v2.3 deprecation:We’re continuing to improve the Marketplace Platform to deliver stronger security, better performance, and new capabilities. As part of this evolution, Marketplace Platform v2.3 will be deprecated. To learn the dates and next steps, see Migration guide.

onChangeCreate

When a change is created in the Freshservice system, the onChangeCreate event is triggered.

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

manifest.json
"events": {
  "onChangeCreate": {
    "handler": "onChangeCreateCallback"
  } 
}

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

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

Attributes of the data object

  • actorobject

    Information pertaining to the system, agent, or requester who triggered the onChangeCreate event in the Freshservice system.

    • profile_idinteger

      Identifier of the actor who triggered the product event.

  • changeobject

    Information pertaining to the change created in the Freshservice system.

    • id

      Identifier of the change object, auto-generated when a new change is created to the Freshworks system.

    • created_at

      Timestamp of when the change is created in the Freshworks system, specified in the UTC format.

    • updated_at

      Timestamp of when the change details are last updated in the Freshworks system, specified in the UTC format.

      For onChangeCreate, this attribute value is the same as the created_at value.

    • agent_id

      Identifier of the agent who created the change.

    • approval_status

      Identifier of the status of the approval requested for the change.

      The CAB (change advisory board) approval can be requested for a change and the request can be approved or rejected.

      Possible values:

      • 0: Requested
      • 1: Approved
      • 2: Rejected
      • 3: Cancelled
      • 4: Not requested
      • 5: Peer responded
    • blackout_window

      Information pertaining to the blackout window. Blackout windows can be scheduled and help prevent deploying the change for a particular asset. Blackout windows can be associated with changes based on conditions defined.

      Blackout window can be scheduled for a particular date span by navigating to the work calendar. For more information, see Scheduling Maintenance & Blackout Windows.

      • description

        Meaningful description about the blackout window specified.

      • id

        Identifier of the blackout window.

      • name

        Name of the blackout window specified.

      • window_end_date

        Timestamp indicating the end of the blackout window, specified in the UTC format.

      • window_start_date

        Timestamp indicating the start of the blackout window, specified in the UTC format.

    • category

      Category of the issue addressed in the change.

    • change_type

      Type of change created.

      Based on the impact of the change request and procedures followed for the change process, change is categorized as Minor, Standard, Major and Emergency in the Freshworks system.

      Possible values:

      • 1: Minor
      • 2: Standard
      • 3: Major
      • 4: Emergency
    • custom_fields

      To obtain additional change information, custom fields could be configured in the Freshworks system.

      The custom_field attribute contains the custom field names and corresponding values, as a valid JSON object of key (custom field name)-value (custom field’s value) pairs.

    • department_id

      Identifier of the department to which the change created is associated.

    • description

      Summary of the issue addressed in the change, in HTML format. The value is truncated if the size exceeds 10KB.

    • description_text

      Summary of the issue addressed in the change, in plain text format. The value is truncated if the size exceeds 10KB.

    • description_text_truncated

      Specifies whether the description text is truncated.

      Possible values: true, false

    • description_truncated

      Specifies whether the description is truncated.

      Possible values: true, false

    • group_id

      Identifier of the group associated with the change. If the change is not associated with any group, the value of this attribute is set to null.

    • impact

      Identifier of the impact assigned to the change.

      Possible values:

      • 1: Low impact
      • 2: Medium impact
      • 3: High impact
    • item_category

      Specific category under subcategory of the issue addressed in the change.

    • maintenance_window

      Information pertaining to the maintenance window. Maintenance window allows scheduling multiple changes, viewing the changes implemented on an asset, and grouping relevant changes.

      For a change created, a maintenance window can be created for a particular date span by creating a new window or associating an existing window. For more information, see Scheduling Maintenance & Blackout Windows.

      • description

        Meaningful description about the maintenance window specified.

      • id

        Identifier of the maintenance window.

      • name

        Name of the maintenance window specified.

      • window_end_date

        Timestamp indicating the end of the maintenance window, specified in the UTC format.

      • window_start_date

        Timestamp indicating the start of the maintenance window, specified in the UTC format.

    • planned_end_date

      Timestamp indicating the estimated end of the change requested, specified in the UTC format.

    • planned_start_date

      Timestamp indicating the estimated start of the change requested , specified in the UTC format.

    • planning_fields

      Information pertaining to the planning fields.

      Planning fields use the Reason, Impact, Rollout Plan, and Backout Plan Fields to fill in the Planning details to manage the change request.

      • backout_plan

        Backout plan can be added to the details tab of the change. Backout plans can be detailed with a description including formatted text, link, and images and can also contain file attachments.

      • change_impact

        Impact details can be added to the details tab of the change. Impact details can be detailed with a description including formatted text, link, and images and can also contain file attachments.

      • change_plan

        Rollout plan can be added to the details tab of the change. The rollout plan can be detailed with description including formatted text, link, and images and can also contain file attachments.

      • change_reason

        Reason for the change can be added/modified in the details of the change.

    • priority

      Identifier of the priority assigned to the ticket.

      Possible values:

      • 1: Low priority
      • 2: Medium priority
      • 3: High priority
      • 4: Urgent priority
    • requester_id

      Identifier of the requester.

    • risk

      Identifier of the risk value assigned to the change.

      Possible values:

      • 1: Low
      • 2: Medium
      • 3: High
      • 4: Very High
    • status

      Status of the change.

      A change can be assigned different statuses as per the current status of the change. As per the respective change lifecycle, a change transitions from one status to another. For more information, see Manage Your Change Processes with Change Lifecycle.

      Possible values:

      • 1: Open
      • 2: Planning
      • 3: Approval
      • 4: Pending release
      • 5: Pending review
      • 6: Closed
    • sub_category

      Subcategory of the issue addressed in the change.

    • subject

      Subject of the change created in the Freshworks system.

    • workspace_id

      Identifier of the workspace, auto-generated when a new workspace is created in Freshservice. For information about workspaces, see What is a workspace.

onChangeUpdate

When change details are updated in the Freshservice system, the onChangeUpdate event is triggered.

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

manifest.json
"events": {
  "onChangeUpdate": {
    "handler": "onChangeUpdateCallback"
  }
}

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

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

Attributes of the data object

  • actorobject

    Information pertaining to the system, agent, or requester who triggered the onChangeUpdate event in the Freshservice system.

    • profile_idinteger

      Identifier of the actor who triggered the product event.

  • changeobject

    Information pertaining to the change updated in the Freshservice system.

    • id

      Identifier of the change object, auto-generated when a new change is created to the Freshworks system.

    • created_at

      Timestamp of when the change is created in the Freshworks system, specified in the UTC format.

    • updated_at

      Timestamp of when the change details are last updated in the Freshworks system, specified in the UTC format.

    • agent_id

      Identifier of the agent who updated the change details.

    • approval_status

      Identifier of the status of the approval requested for the change.

      The CAB (change advisory board) approval can be requested for a change and the request can be approved or rejected.

      Possible values:

      • 0: Requested
      • 1: Approved
      • 2: Rejected
      • 3: Cancelled
      • 4: Not requested
      • 5: Peer responded
    • blackout_window

      Information pertaining to the blackout window. Blackout windows can be scheduled and help prevent deploying the change for a particular asset. Blackout windows can be associated with changes based on conditions defined.

      Blackout window can be scheduled for a particular date span by navigating to the work calendar. For more information, see Scheduling Maintenance & Blackout Windows.

      • description

        Meaningful description about the blackout window specified.

      • id

        Identifier of the blackout window.

      • name

        Name of the blackout window specified.

      • window_end_date

        Timestamp indicating the end of the blackout window, specified in the UTC format.

      • window_start_date

        Timestamp indicating the start of the blackout window, specified in the UTC format.

    • category

      Category of the issue addressed in the change.

    • change_type

      Type of change updated.

      Based on the impact of the change request and procedures followed for the change process, change is categorized as Minor, Standard, Major and Emergency in the Freshworks system.

      Possible values:

      • 1: Minor
      • 2: Standard
      • 3: Major
      • 4: Emergency
    • custom_fields

      To obtain additional change information, custom fields could be configured in the Freshworks system.

      The custom_field attribute contains the custom field names and corresponding values, as a valid JSON object of key (custom field name)-value (custom field’s value) pairs.

    • department_id

      Identifier of the department to which the change updated is associated.

    • description

      Summary of the issue addressed in the change, in HTML format. The value is truncated if the size exceeds 10KB.

    • description_text

      Summary of the issue addressed in the change, in plain text format. The value is truncated if the size exceeds 10KB.

    • description_text_truncated

      Specifies whether the description text is truncated.

      Possible values: true, false

    • description_truncated

      Specifies whether the description is truncated.

      Possible values: true, false

    • group_id

      Identifier of the group associated with the change. If the change is not associated with any group, the value of this attribute is set to null.

    • impact

      Identifier of the impact assigned to the change.

      Possible values:

      • 1: Low impact
      • 2: Medium impact
      • 3: High impact
    • item_category

      Specific category under subcategory of the issue addressed in the change.

    • maintenance_window

      Information pertaining to the maintenance window.

      Maintenance window allows scheduling multiple changes, viewing the changes implemented on an asset, and grouping relevant changes.

      For a change, a maintenance window can be created for a particular date span by creating a new window or associating an existing window. For more information, see Scheduling Maintenance & Blackout Windows.

      • description

        Meaningful description about the maintenance window specified.

      • id

        Identifier of the maintenance window.

      • name

        Name of the maintenance window specified.

      • window_end_date

        Timestamp indicating the end of the maintenance window, specified in the UTC format.

      • window_start_date

        Timestamp indicating the start of the maintenance window, specified in the UTC format.

    • planned_end_date

      Timestamp indicating the estimated end of the change requested, specified in the UTC format.

    • planned_start_date

      Timestamp indicating the estimated start of the change requested , specified in the UTC format.

    • planning_fields

      Information pertaining to the planning fields.

      Planning fields use the Reason, Impact, Rollout Plan, and Backout Plan Fields to fill in the Planning details to manage the change request.

      • backout_plan

        Backout plan can be added to the details tab of the change. Backout plans can be detailed with a description including formatted text, link, and images and can also contain file attachments.

      • change_impact

        Impact details can be added to the details tab of the change. Impact details can be detailed with a description including formatted text, link, and images and can also contain file attachments.

      • change_plan

        Rollout plan can be added to the details tab of the change. The rollout plan can be detailed with description including formatted text, link, and images and can also contain file attachments.

      • change_reason

        Reason for the change can be added/modified in the details of the change.

    • priority

      Identifier of the priority assigned to the ticket.

      Possible values:

      • 1: Low priority
      • 2: Medium priority
      • 3: High priority
      • 4: Urgent priority
    • requester_id

      Identifier of the requester.

    • risk

      Identifier of the risk value assigned to the change.

      Possible values:

      • 1: Low
      • 2: Medium
      • 3: High
      • 4: Very High
    • status

      Status of the change.

      A change can be assigned different statuses as per the current status of the change. As per the respective change lifecycle, a change transitions from one status to another. For more information, see Manage Your Change Processes with Change Lifecycle.

      Possible values:

      • 1: Open
      • 2: Planning
      • 3: Approval
      • 4: Pending release
      • 5: Pending review
      • 6: Closed
    • sub_category

      Subcategory of the issue addressed in the change.

    • subject

      Subject of the change created in the Freshworks system.

    • workspace_id

      Identifier of the workspace, auto-generated when a new workspace is created in Freshservice. For information about workspaces, see What is a workspace.

  • changesobject

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

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

    Example

    "changes": {
      "custom_fields": {
        "custom_number_field": [
          1234,
          1234567
         ]
      },
      "requester_id": [
        37656,
        37659
      ]
     }
    }