Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 858f8f0

Browse files
committed
addressed comments
1 parent 68f1b53 commit 858f8f0

File tree

1 file changed

+29
-14
lines changed

1 file changed

+29
-14
lines changed

docs/programs/servicenow-integration.md

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ HTTP Method | POST
9292
```
9393
Make sure you enter the correct table name, as in this case, it's *incident*.
9494

95-
9. Get the full URL to your endpoint. <ul><li>The full URL to the `/hackerone/new_comment` endpoint is required to set up the HackerOne integration. The namespace can be found from within the HackerOne Scripted REST API you just created, in the Resources” section at the bottom. Combine this with your instance URL found in the address bar to get the full URL.<li>As shown in the images below, this would be: https://dev100796.service-now.com/api/514345/hackerone/new_comment.
95+
9. Copy the full URL to your endpoint and save it to be used for later. <ul><li>The full URL to the `/hackerone/new_comment` endpoint is required to set up the HackerOne integration. The namespace can be found from within the HackerOne Scripted REST API you just created, in the Resources tab underneath the Resource path column. Combine this with your instance URL found in the address bar to get the full URL.<li>As shown in the images below, this would be: https://dev100796.service-now.com/api/514345/hackerone/new_comment.
9696

9797
![servicenow-6](./images/servicenow-6.png)
9898
![servicenow-7](./images/servicenow-7.png)
@@ -186,28 +186,30 @@ Name | Value
186186
Accept | application/json
187187
Content-Type | application/json
188188

189-
10. Navigate to **System Definition > Business Rules**.
189+
10. Click **Submit**.
190+
191+
11. Navigate to **System Definition > Business Rules**.
190192

191193
![servicenow-12](./images/servicenow-12.png)
192194

193-
11. Click **New** to create a new business rule.
194-
12. Enter these values for these fields:
195+
12. Click **New** to create a new business rule.
196+
13. Enter these values for these fields:
195197

196198
Field | Value
197199
----- | ------
198200
Name | Add Comment
199201
Table | Journal Entry [sys\_journal\_field]
200202
Advanced | Make sure the box is checked
201203

202-
13. Enter these values for these fields on the **When to run** tab:
204+
14. Enter these values for these fields on the **When to run** tab:
203205

204206
Field | Value
205207
----- | ------
206208
When | async
207209
Insert | Make sure the box is checked
208210
Filter Conditions | Value is not empty: AND : Name : is : incident
209211

210-
14. Enter this script in the **Advanced** tab:
212+
15. Enter this script in the **Advanced** tab:
211213

212214
```
213215
(function executeRule(current, previous /*null when async*/) {
@@ -225,6 +227,9 @@ Filter Conditions | Value is not empty: AND : Name : is : incident
225227
}
226228
)(current, previous);
227229
```
230+
231+
15. Click **Submit**.
232+
228233
Make sure that the arguments for RESTMessageV2 matches the name you gave to the Outbound REST Message.
229234

230235
### Configure Close Report Event
@@ -235,40 +240,47 @@ To set up the close report event:
235240

236241
![servicenow-8](./images/servicenow-8.png)
237242

238-
2. Search for the HackerOne REST Message that was set up in the previous section.
243+
2. Search for *HackerOne*.
239244
3. Click **New** to add a new method.
240245

241246
![servicenow-13](./images/servicenow-10.png)
242247

243-
3. Enter these values to these fields:
248+
4. Enter these values to these fields:
244249

245250
Field | Value
246251
----- | -----
247252
Name | Close Report
248253
Endpoint | The Public ServiceNow URL visible in configuration wizard on the HackerOne platform
254+
HTTP Method | POST
249255
Authentication Type | No authentication
250-
Content | `{"event_name":"close_report","element_id":"${sys_id}"}`
251256

252-
4. Add these two HTTP Headers on the same HTTP Request tab:
257+
5. Enter this in the **Content** field in the HTTP Request tab:
258+
```
259+
{"event_name":"close_report","element_id":"${sys_id}"}
260+
```
261+
262+
6. Add these two HTTP Headers on the same HTTP Request tab:
253263

254264
Name | Value
255265
----- | -----
256266
Accept | application/json
257267
Content-Type | application/json
258268

259-
5. Navigate to **System Definition > Business Rules**.
260-
6. Click **New** to create a new business rule.
261-
7. Enter these values for these fields on the **When to run** tab:
269+
7. Click **Submit**.
270+
8. Navigate to **System Definition > Business Rules**.
271+
9. Click **New** to create a new business rule.
272+
10. Enter these values for these fields on the **When to run** tab:
262273

263274
Field | Value
264275
----- | -----
265276
Name | Close Report
266277
Table | Incident [incident]
278+
Advanced | Make sure the box is checked
267279
When | Async
268280
Update | Make sure the box is checked
269281
Filter Conditions | State: changes to : Closed
270282

271-
8. Enter this script on the **Advanced** tab:
283+
11. Enter this script on the **Advanced** tab:
272284

273285
```
274286
(function executeRule(current, previous /*null when async*/) {
@@ -283,4 +295,7 @@ Filter Conditions | State: changes to : Closed
283295
}
284296
)(current, previous);
285297
```
298+
299+
12. Click **Submit**.
300+
286301
Make sure the arguments for RESTMessageV2 match the name you gave the Outbound REST Message and HTTP Method.

0 commit comments

Comments
 (0)