You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -39,13 +39,13 @@ Enter the username/password and instance name configured above into the integrat
39
39
-**Integration Name:** Define a name for the current integration.
40
40
-**Management Team:** When a management team is selected, only team members and tenant administrators can edit this integration.
41
41
-**Channel:** Select the channel where this integration takes effect.
42
-
-**Sync Direction:**
43
-
- To_ServiceNow: Sync Flashduty incidents to ServiceNow.
44
-
- From_ServiceNow: Sync ServiceNow Incidents to Flashduty.
45
-
- Two-way: Bidirectional sync between Flashduty and ServiceNow.
42
+
-**Sync Direction:**
43
+
- To_ServiceNow: Sync Flashduty incidents to ServiceNow.
44
+
- From_ServiceNow: Sync ServiceNow Incidents to Flashduty.
45
+
- Two-way: Bidirectional sync between Flashduty and ServiceNow.
46
46
-**Trigger Mode**:
47
-
- Auto Trigger: Requires configuration of corresponding conditions, Flashduty will automatically sync incidents that meet the conditions to ServiceNow.
48
-
- Manual Trigger: Requires manual triggering of ServiceNow sync in the More Actions section of the incident details page (the integration configuration name is the trigger name).
47
+
- Auto Trigger: Requires configuration of corresponding conditions, Flashduty will automatically sync incidents that meet the conditions to ServiceNow.
48
+
- Manual Trigger: Requires manual triggering of ServiceNow sync in the More Actions section of the incident details page (the integration configuration name is the trigger name).
49
49
-**Severity Mapping:** ServiceNow's Priority is determined by the combined values of Impact and Urgency, so you can refer to ServiceNow's `Priority Lookup Rules` for configuration. Additionally, note that only when ServiceNow Incident's Urgency changes will it trigger updates to Flashduty incident severity.
50
50
-**Custom Field Mapping:** You can choose to sync certain labels or all labels of incidents as well as custom field content to ServiceNow fields (only text-type fields are supported).
51
51
@@ -66,20 +66,19 @@ This method relies on ServiceNow's UI Action and Script Include configuration. T
66
66
5. Enter **onClick();** in `Onclick`.
67
67
6. Enter the following in `Script`:
68
68
69
-
```
70
-
function onClick() {
71
-
g_form.save();
72
-
73
-
var ga = new GlideAjax('IncidentWebhookHelperAjax');
@@ -96,53 +95,54 @@ This method relies on ServiceNow's UI Action and Script Include configuration. T
96
95
Note: The body configures default receiving fields. If you have custom fields that need to be synced to Flashduty, you need to manually add content to the body. For example, if you want to add a field named: test_001 (this field name can be obtained when adding custom fields in the integration configuration, do not use the field name displayed in the ServiceNow Incident form), then you need to add to the body: test_001: current.getDisplayValue("test_001").
97
96
98
97
</div>
99
-
```
100
-
var IncidentWebhookHelper = Class.create();
101
-
IncidentWebhookHelper.prototype = {
102
-
initialize: function() {},
103
-
104
-
sendIncidentWebhook: function(current) {
105
-
function getLastComment(sysId) {
106
-
var journalGR = new GlideRecord('sys_journal_field');
This method relies on ServiceNow's Business Rules configuration. Using this method, you can automatically sync Incidents to Flashduty when there are new or update events.
174
178
175
179
#### Configure Business Rules
@@ -187,92 +191,92 @@ Note: The body configures default receiving fields. If you have custom fields th
187
191
188
192
</div>
189
193
190
-
```
191
-
(function executeRule(current, previous) {
192
-
function getLastComment(recordSysId) {
193
-
var journalGR = new GlideRecord('sys_journal_field');
194
-
journalGR.addQuery('element_id', recordSysId);
195
-
journalGR.addQuery('element', 'comments');
196
-
journalGR.orderByDesc('sys_created_on');
197
-
journalGR.setLimit(1);
198
-
journalGR.query();
199
-
if (journalGR.next()) {
200
-
var comment = journalGR.getValue('value');
201
-
return comment;
202
-
}
203
-
204
-
return '';
205
-
}
206
-
207
-
var operation = current.operation() || 'unknown';
208
-
var isPreviousNull = previous === null;
209
-
var createdOn = current.getValue('sys_created_on');
210
-
var updatedOn = current.getValue('sys_updated_on');
0 commit comments