@manyos/smileconnect-api 1.40.0 → 1.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/conf/clients.json CHANGED
@@ -404,7 +404,8 @@
404
404
  "checkGlobalParams"
405
405
  ],
406
406
  "postMapping": [
407
- "p2"
407
+ "p4",
408
+ "update"
408
409
  ],
409
410
  "afterExecution": [
410
411
  "script3"
@@ -1,2 +1,25 @@
1
- //requestData.horst="da"
1
+ try {
2
+ const settings = {
3
+ "createForm":"HPD:IncidentInterface_Create",
4
+ "entry": {
5
+ "Description": "incident01_new",
6
+ "Detailed_Decription": "new ticket creation 02_08_2021",
7
+ "Impact": "4-Minor/Localized",
8
+ "Urgency": "4-Low",
9
+ "Priority": "Low",
10
+ "Status": "Assigned",
11
+ "Service_Type": 0,
12
+ "Reported Source": 1000,
13
+ "Login_ID": "Allen"
14
+ }
15
+ };
16
+ //Create Request
17
+ const resultCreate = await adapter.remedy.create(settings.createForm, settings.entry);
18
+ } catch (e) {
19
+ log.debug(`>>> in FCT_TEST: ERROR: ` + e)
20
+ //console.log(requestData.token)
21
+ reject (e)
22
+ }
23
+
24
+
2
25
  resolve();
@@ -0,0 +1,12 @@
1
+ const settings = {
2
+ "form":"Sample:Cities",
3
+ "id": "000000000000115",
4
+ "entry": {
5
+ "Airport Code": "MUC3",
6
+ "City": "Munich"
7
+ }
8
+ };
9
+ //Create Service Request
10
+ const resultUpdate = await adapter.remedy.update(settings.form, settings.id, settings.entry);
11
+
12
+ resolve(resultUpdate);
Binary file
Binary file
package/docs/_sidebar.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  - [Quick start](quickstart.md)
4
4
  - [Architecture](architecture.md)
5
- - [API Specification](spec/index.html)
5
+ - [API Specification](https://smileconnect.manyosdocs.de/spec/index.html)
6
6
 
7
7
  - Configuration
8
8
 
package/docs/adapter.md CHANGED
@@ -170,7 +170,57 @@ const settings = {
170
170
  const resultCreate = await adapter.remedy.create(settings.createForm, settings.entry);
171
171
  ```
172
172
 
173
- Will return return the id of the created record. e.g. REQ00000002893
173
+ Will return return the id of the created record. e.g. REQ00000002893 or throw an error.
174
+
175
+ #### Update
176
+
177
+ ```javascript
178
+ async function update(form, id, entry, options)
179
+ ```
180
+
181
+ Parameter:
182
+
183
+ * form (string):
184
+
185
+ The form in which a record is updated. e.g. CTM:People
186
+
187
+ * id (string):
188
+
189
+ The id of the entry that should be updated
190
+
191
+ * entry (object):
192
+
193
+ The entry object that is updated.
194
+
195
+ e.g.
196
+
197
+ ```javascript
198
+ {
199
+ "Source Keyword": "SMILEcatalog",
200
+ "Company": "Calbro Services",
201
+ "AppRequestSummary": "New Request from SMILEcatalog",
202
+ "TitleInstanceID": "SRGAA5V0GEfds7LO5YL6Q945Z",
203
+ "Login ID": "Allen"
204
+ }
205
+ ```
206
+
207
+ Full example:
208
+
209
+ ```javascript
210
+ const settings = {
211
+ "form":"Sample:Cities",
212
+ "id": "000000000000115",
213
+ "entry": {
214
+ "Airport Code": "MUC1",
215
+ "City": "Munich"
216
+ }
217
+ };
218
+ //Create Service Request
219
+ const resultUpdate = await adapter.remedy.update(settings.form, settings.id, settings.entry);
220
+ ```
221
+
222
+ Will return return the id of the updated record. e.g. 000000000000115 or throw an error.
223
+
174
224
 
175
225
  #### Options
176
226
 
@@ -2,17 +2,42 @@
2
2
 
3
3
  On a per client base it can be configured which fields are returned for each object and if a basequery is applied. This expose certain fields only dedicated clients. It also allows to define which rows a client can access. Clients are configured in conf/clients.json
4
4
 
5
+ Client configurations are stored in the /conf/clients.json file. They can be managed in the GUI.
6
+
7
+ ## Manage client configs
8
+
9
+ ![Client Configuration](../_media/gui_client_fields.png)
10
+
11
+ ## Sample client config
12
+
5
13
  ```json
6
14
  [
7
15
  {
8
16
  "name": "jira",
9
17
  "config": {
10
- "options" : {
11
- "dateFormat" : "dd.MM.yyyy HH:mm.ss",
12
- "clientLimit": 100
18
+ "options": {
19
+ "dateFormat": "dd.MM.yyyy HH:mm.ss",
20
+ "clientLimit": 1000,
21
+ "impersonateUser": "Allen",
22
+ "allowDynamicImpersonate": true,
23
+ "translateSelectionFields": false
24
+ },
25
+ "custom_Sample:Enrollments": {
26
+ "formName": "Sample:Enrollments",
27
+ "basequery": "1=1",
28
+ "fields": [
29
+ "Enrollment ID",
30
+ "Enrollee Login",
31
+ "Class ID",
32
+ "Class Title",
33
+ "Class Location",
34
+ "Class Cost",
35
+ "Department",
36
+ "Class Start Date & Time"
37
+ ]
13
38
  },
14
39
  "cmdbobject": {
15
- "basequery": "'Data Set Id' = \"BMC.ASSET\" AND ('Mark As Deleted' = \"No\" OR 'Mark As Deleted' = $NULL$) AND 'Class Id' = \"BMC_COMPUTERSYSTEM\"",
40
+ "basequery": "'Data Set Id' = \"BMC.ASSET\" AND ('Mark As Deleted' = \"No\" OR 'Mark As Deleted' = $NULL$)",
16
41
  "fields": [
17
42
  "Instance Id",
18
43
  "Tag Number",
@@ -23,17 +48,43 @@ On a per client base it can be configured which fields are returned for each obj
23
48
  "Type",
24
49
  "Availability",
25
50
  "Confidentiality",
26
- "Integrity",
51
+ "Class Id",
27
52
  "Authenticity",
28
53
  "Model Number",
29
- "Class Id",
30
- "Reconciliation Identity"
31
- ]
32
- },
33
- "orgdata": {
34
- "basequeryPeople": "'Profile Status' = \"Enabled\"",
35
- "basequeryOrganisation": "'Status'=\"Enabled\"",
36
- "basequerySupportGroup": "'Status'=\"Enabled\""
54
+ "Reconciliation Identity",
55
+ "Short Description"
56
+ ],
57
+ "fields_AST:ComputerSystem": [
58
+ "DNS Host Name"
59
+ ],
60
+ "fields_AST:LANEndpoint": [
61
+ "MACAddress"
62
+ ],
63
+ "constants": [
64
+ {
65
+ "name": "Location Company",
66
+ "value": "Calbro Services and Weapons"
67
+ }
68
+ ],
69
+ "scripts": {
70
+ "GET": {
71
+ "preMapping": [
72
+ "script1",
73
+ "script2"
74
+ ],
75
+ "postMapping": [
76
+ "script2"
77
+ ]
78
+ },
79
+ "POST": {
80
+ "preMapping": [
81
+ "scriptPutPre"
82
+ ],
83
+ "postMapping": [
84
+ "scriptPutPost"
85
+ ]
86
+ }
87
+ }
37
88
  },
38
89
  "change": {
39
90
  "fields": [
@@ -55,13 +106,482 @@ On a per client base it can be configured which fields are returned for each obj
55
106
  "Scheduled End Date",
56
107
  "Support Group ID",
57
108
  "Support Group ID 2",
58
- "Customer Person ID"
109
+ "Customer Person ID",
110
+ "Requested By Person ID",
111
+ "Change Target Date"
59
112
  ],
60
- "constants" : [
61
- {"name": "Location Company", "value" : "Calbro Services"},
62
- {"name": "Company", "value" : "Calbro Services"},
63
- {"name": "RequesterLoginID", "value" : "Allen"}
64
- ]
113
+ "constants": [
114
+ {
115
+ "name": "Location Company",
116
+ "value": "Calbro Services"
117
+ },
118
+ {
119
+ "name": "Company",
120
+ "value": "Calbro Services"
121
+ },
122
+ {
123
+ "name": "RequesterLoginID",
124
+ "value": "Allen"
125
+ }
126
+ ],
127
+ "basequery": "",
128
+ "scripts": {}
129
+ },
130
+ "person": {
131
+ "basequery": "1=1",
132
+ "fields": [
133
+ "Person ID",
134
+ "Full Name",
135
+ "Remedy Login ID",
136
+ "Internet E-mail",
137
+ "Department"
138
+ ],
139
+ "constants": [],
140
+ "scripts": {}
141
+ },
142
+ "supportGroup": {
143
+ "basequery": "1=1",
144
+ "fields": [
145
+ "Support Group ID",
146
+ "Company",
147
+ "Support Organization",
148
+ "Support Group Name",
149
+ "Support Group Role"
150
+ ],
151
+ "constants": [],
152
+ "scripts": {}
153
+ },
154
+ "organisation": {
155
+ "basequery": "1=1",
156
+ "fields": [
157
+ "People Organization ID",
158
+ "Company",
159
+ "Organization",
160
+ "Department"
161
+ ],
162
+ "constants": [],
163
+ "scripts": {}
164
+ },
165
+ "changeWorklog": {
166
+ "fields": [
167
+ "Description",
168
+ "Detailed Description",
169
+ "Work Log Date"
170
+ ],
171
+ "constants": [
172
+ {
173
+ "name": "Status",
174
+ "value": "Enabled"
175
+ },
176
+ {
177
+ "name": "Work Log Type",
178
+ "value": "General Information"
179
+ },
180
+ {
181
+ "name": "Communication Source",
182
+ "value": "Other"
183
+ },
184
+ {
185
+ "name": "View Access",
186
+ "value": "Internal"
187
+ }
188
+ ],
189
+ "basequery": "",
190
+ "scripts": {}
191
+ },
192
+ "workOrder": {
193
+ "fields": [
194
+ "Work Order ID",
195
+ "Status",
196
+ "InstanceId",
197
+ "WO Type Field 2",
198
+ "Categorization Tier 1",
199
+ "Categorization Tier 2",
200
+ "Categorization Tier 3",
201
+ "Product Cat Tier 1(2)",
202
+ "Product Cat Tier 2(2)",
203
+ "Product Cat Tier 3(2)",
204
+ "Product Name",
205
+ "Summary",
206
+ "Detailed Description",
207
+ "Status Reason",
208
+ "Scheduled Start Date",
209
+ "Scheduled End Date",
210
+ "Support Group ID",
211
+ "Support Group ID 2",
212
+ "Customer Person ID",
213
+ "Requested By Person ID"
214
+ ],
215
+ "constants": [
216
+ {
217
+ "name": "Location Company",
218
+ "value": "Calbro Services"
219
+ },
220
+ {
221
+ "name": "Company",
222
+ "value": "Calbro Services"
223
+ },
224
+ {
225
+ "name": "RequesterLoginID",
226
+ "value": "Allen"
227
+ }
228
+ ],
229
+ "basequery": "",
230
+ "scripts": {}
231
+ },
232
+ "incident": {
233
+ "fields": [
234
+ "Incident Number",
235
+ "Status",
236
+ "WO Type Field 2",
237
+ "Categorization Tier 1",
238
+ "Categorization Tier 2",
239
+ "Categorization Tier 3",
240
+ "Product Categorization Tier 1",
241
+ "Product Categorization Tier 2",
242
+ "Product Categorization Tier 3",
243
+ "Product Name",
244
+ "Manufacturer",
245
+ "Detailed Decription",
246
+ "Description",
247
+ "Status_Reason",
248
+ "Impact",
249
+ "Urgency",
250
+ "Priority",
251
+ "Assigned Group ID",
252
+ "Owner Group ID",
253
+ "Vendor Group ID",
254
+ "Person ID",
255
+ "Direct Contact Person ID",
256
+ "Submit Date",
257
+ "Last Modified Date",
258
+ "Resolution"
259
+ ],
260
+ "constants": [
261
+ {
262
+ "name": "Impact",
263
+ "value": "4000"
264
+ },
265
+ {
266
+ "name": "Urgency",
267
+ "value": "4000"
268
+ },
269
+ {
270
+ "name": "Login_ID",
271
+ "value": "Allen"
272
+ },
273
+ {
274
+ "name": "Service_Type",
275
+ "value": "0"
276
+ },
277
+ {
278
+ "name": "Reported Source",
279
+ "value": "1000"
280
+ },
281
+ {
282
+ "name": "Status",
283
+ "value": "0"
284
+ }
285
+ ],
286
+ "basequery": "1=1",
287
+ "scripts": {
288
+ "GET": {
289
+ "preMapping": [
290
+ "checkGlobalParams"
291
+ ],
292
+ "postMapping": [
293
+ "p2"
294
+ ],
295
+ "afterExecution": [
296
+ "script3"
297
+ ]
298
+ },
299
+ "POST": {
300
+ "preMapping": [
301
+ "p1"
302
+ ],
303
+ "postMapping": [
304
+ "p3"
305
+ ],
306
+ "afterExecution": [
307
+ "p4"
308
+ ]
309
+ },
310
+ "PUT": {
311
+ "preMapping": [],
312
+ "postMapping": [
313
+ "p3"
314
+ ],
315
+ "afterExecution": [
316
+ "p4"
317
+ ]
318
+ }
319
+ }
320
+ },
321
+ "problem": {
322
+ "fields": [
323
+ "Problem Investigation ID",
324
+ "Investigation Status",
325
+ "WO Type Field 2",
326
+ "Categorization Tier 1",
327
+ "Categorization Tier 2",
328
+ "Categorization Tier 3",
329
+ "Product Categorization Tier 1",
330
+ "Product Categorization Tier 2",
331
+ "Product Categorization Tier 3",
332
+ "Product Name",
333
+ "Manufacturer",
334
+ "Detailed Decription",
335
+ "Description",
336
+ "Status Reason",
337
+ "Impact",
338
+ "Urgency",
339
+ "Priority",
340
+ "Assigned Group ID",
341
+ "Owner Group ID",
342
+ "Vendor Group ID",
343
+ "Person ID",
344
+ "Direct Contact Person ID",
345
+ "Target Resolution Date"
346
+ ],
347
+ "constants": [
348
+ {
349
+ "name": "Impact",
350
+ "value": "4000"
351
+ },
352
+ {
353
+ "name": "Urgency",
354
+ "value": "4000"
355
+ },
356
+ {
357
+ "name": "Status",
358
+ "value": "0"
359
+ },
360
+ {
361
+ "name": "Investigation Driver",
362
+ "value": "High Impact Incident"
363
+ },
364
+ {
365
+ "name": "Requestor ID",
366
+ "value": "Allen"
367
+ },
368
+ {
369
+ "name": "Company",
370
+ "value": "Calbro Services"
371
+ },
372
+ {
373
+ "name": "z1D_Action",
374
+ "value": "PROBLEM"
375
+ }
376
+ ],
377
+ "basequery": "",
378
+ "scripts": {}
379
+ },
380
+ "workOrderWorklog": {
381
+ "fields": [
382
+ "Description",
383
+ "Detailed Description"
384
+ ],
385
+ "constants": [
386
+ {
387
+ "name": "Status",
388
+ "value": "Enabled"
389
+ },
390
+ {
391
+ "name": "Work Log Type",
392
+ "value": "General Information"
393
+ },
394
+ {
395
+ "name": "Communication Source",
396
+ "value": "Other"
397
+ }
398
+ ],
399
+ "basequery": "",
400
+ "scripts": {}
401
+ },
402
+ "incidentWorklog": {
403
+ "fields": [
404
+ "Description",
405
+ "Detailed Description"
406
+ ],
407
+ "constants": [
408
+ {
409
+ "name": "Status",
410
+ "value": "Enabled"
411
+ },
412
+ {
413
+ "name": "Work Log Type",
414
+ "value": "General Information"
415
+ },
416
+ {
417
+ "name": "Communication Source",
418
+ "value": "Other"
419
+ }
420
+ ],
421
+ "basequery": "",
422
+ "scripts": {}
423
+ },
424
+ "problemWorklog": {
425
+ "fields": [
426
+ "Description",
427
+ "Detailed Description"
428
+ ],
429
+ "constants": [
430
+ {
431
+ "name": "Status",
432
+ "value": "Enabled"
433
+ },
434
+ {
435
+ "name": "Work Log Type",
436
+ "value": "General Information"
437
+ },
438
+ {
439
+ "name": "Communication Source",
440
+ "value": "Other"
441
+ }
442
+ ],
443
+ "basequery": "",
444
+ "scripts": {}
445
+ },
446
+ "task": {
447
+ "basequery": "1=1",
448
+ "fields": [
449
+ "Status",
450
+ "InstanceId",
451
+ "Sequence",
452
+ "Service Cat Tier 1",
453
+ "Service Cat Tier 2",
454
+ "Service Cat Tier 3",
455
+ "Product Cat Tier 1",
456
+ "Product Cat Tier 2",
457
+ "Product Cat Tier 3",
458
+ "Product Name",
459
+ "Summary",
460
+ "Notes",
461
+ "StatusReasonSelection",
462
+ "Scheduled Start Date",
463
+ "Scheduled End Date",
464
+ "Assignee Group ID",
465
+ "Customer Person ID",
466
+ "Requested By Person ID",
467
+ "Actual Start Date",
468
+ "Actual End Date",
469
+ "Character 06",
470
+ "Character 01",
471
+ "Support Company",
472
+ "Assignee Organization",
473
+ "Assignee Group"
474
+ ],
475
+ "constants": [
476
+ {
477
+ "name": "Location Company",
478
+ "value": "Calbro Services"
479
+ },
480
+ {
481
+ "name": "TaskType",
482
+ "value": "2000"
483
+ },
484
+ {
485
+ "name": "Status",
486
+ "value": "1000"
487
+ }
488
+ ],
489
+ "scripts": {}
490
+ },
491
+ "taskWorklog": {
492
+ "fields": [
493
+ "Summary",
494
+ "Notes"
495
+ ],
496
+ "constants": [
497
+ {
498
+ "name": "Status",
499
+ "value": "Enabled"
500
+ },
501
+ {
502
+ "name": "WorkInfoType",
503
+ "value": "General Information"
504
+ },
505
+ {
506
+ "name": "Communication Source",
507
+ "value": "Other"
508
+ },
509
+ {
510
+ "name": "View Access",
511
+ "value": "Internal"
512
+ }
513
+ ],
514
+ "basequery": "",
515
+ "scripts": {}
516
+ },
517
+ "flowBuilder": {
518
+ "constants": [
519
+ {
520
+ "name": "Location Company",
521
+ "value": "Calbro Services"
522
+ }
523
+ ],
524
+ "basequery": "",
525
+ "fields": [],
526
+ "scripts": {}
527
+ },
528
+ "changeTemplate": {
529
+ "basequery": "1=1",
530
+ "fields": [
531
+ "Template Name",
532
+ "Description",
533
+ "Detailed Description",
534
+ "InstanceId"
535
+ ],
536
+ "constants": [],
537
+ "scripts": {}
538
+ },
539
+ "incidentTemplate": {
540
+ "basequery": "1=1",
541
+ "fields": [
542
+ "InstanceId",
543
+ "Template Name",
544
+ "Description",
545
+ "Detailed Decription"
546
+ ],
547
+ "constants": [],
548
+ "scripts": {}
549
+ },
550
+ "problemTemplate": {
551
+ "basequery": "1=1",
552
+ "fields": [
553
+ "InstanceId",
554
+ "Template Name",
555
+ "Description",
556
+ "Detailed Decription"
557
+ ],
558
+ "constants": [],
559
+ "scripts": {}
560
+ },
561
+ "workOrderTemplate": {
562
+ "basequery": "1=1",
563
+ "fields": [
564
+ "GUID",
565
+ "Summary",
566
+ "Notes",
567
+ "Template Name"
568
+ ],
569
+ "constants": [],
570
+ "scripts": {}
571
+ },
572
+ "taskTemplate": {
573
+ "basequery": "1=1",
574
+ "fields": [
575
+ "InstanceId",
576
+ "TaskName",
577
+ "Summary",
578
+ "Notes",
579
+ "Company",
580
+ "Assignee Organization",
581
+ "Assignee Group"
582
+ ],
583
+ "constants": [],
584
+ "scripts": {}
65
585
  }
66
586
  }
67
587
  }
@@ -1,6 +1,17 @@
1
1
  # Field Mappings
2
2
 
3
- Field mappings are configured in conf/mapping.json and are used globally for all clients.
3
+ Field mappings are used to map Remedy Field names to more appropriate REST-API names. We suggest that you remove spaces and use camel case notation. E.g. The remedy field *Remedy Login ID* could be mapped to *userId*.
4
+
5
+ Field mappings used globally for all clients.
6
+
7
+ Mappings are stored in the /conf/mapping.json file. They can be managed in the GUI.
8
+
9
+ ## Manage field mappings
10
+
11
+ ![Client Configuration](../_media/gui_mapping_inc.png)
12
+
13
+ ## Sample client config
14
+
4
15
 
5
16
  ```json
6
17
  {
package/docs/index.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
- <title>Document</title>
5
+ <title>SMILEconnect Documentation</title>
6
6
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
7
7
  <meta name="description" content="Description">
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
@@ -16,6 +16,7 @@
16
16
  repo: '',
17
17
  coverpage: true,
18
18
  loadSidebar: true,
19
+ auto2top: true,
19
20
  subMaxLevel: 2
20
21
  }
21
22
  </script>
package/docs/releases.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # Release Notes
2
2
 
3
- ## 1.40.0 - 30.07.21
3
+ ## API
4
+
5
+ ### 1.41.0 - 02.08.21
6
+
7
+ Update Record added to [Remedy Adapter](adapter#remedy).
8
+
9
+
10
+ ### 1.40.0 - 30.07.21
4
11
 
5
12
  Dynamic Impersonate Users added.
6
13
 
@@ -8,4 +15,12 @@ If the clientConfig has the option allowDynamicImpersonate set to *true* then th
8
15
 
9
16
  e.g.
10
17
 
11
- */v1/incidents?impersonateUser=abc123
18
+ */v1/incidents?impersonateUser=abc123
19
+
20
+ ## Event Manager
21
+
22
+ ### 1.15.0 - 30.07.21
23
+
24
+ The eventmanager will check all outbound webhooks for an event. If one fails, the whole Event will be set to error and the details will be added to the error message.
25
+
26
+ ## GUI
package/docs/scripts.md CHANGED
@@ -22,6 +22,56 @@ resolve()
22
22
 
23
23
  The above script will lookup the service name for a given reconciliation id.
24
24
 
25
+ # Manage Scripts
26
+
27
+ Scripts are stored in the /conf/scripts folder. They can be managed in the GUI.
28
+
29
+ ![Scripts in the GUI](_media/gui_scripts_edit.png)
30
+
31
+ If you edit a script that is already in use, the GUI will show a warning.
32
+
33
+ ![Script usage warning](_media/gui_scripts_warning.png)
34
+
35
+ You can also see in detail where the script is used.
36
+
37
+ ![Script usage details](_media/gui_scripts_usage.png)
38
+
39
+ # Execution points
40
+
41
+ A script can be executed at different times.
42
+
43
+ ![Client Script Usage](_media/gui_clients_scripts.png)
44
+
45
+ For each execution point a list of scripts can be defined. These will be executed in the defined order.
46
+
47
+ ## GET
48
+
49
+ During all get operations (get, getAll, search) the following execution points are available:
50
+
51
+ ### preMapping
52
+
53
+ The scripts are executed directly after the data is fetched from the Remedy System. No field mapping was applied yet. Field names are the same as in Remedy.
54
+
55
+ ### postMapping
56
+
57
+ The scripts are executed after the mapping is done. All field names are now as defined in the mapping.
58
+
59
+ ## POST / PUT
60
+
61
+ During POST & PUT operations an additional execution point (afterExecution) is available.
62
+
63
+ ### preMapping
64
+
65
+ The scripts are executed before the mapping is applied. All field names are as defined in the mapping. If additional data is sent from the client (e.g. additional attributes that are not on the form), you will still have access to them.
66
+
67
+ ### postMapping
68
+
69
+ The scripts are executed after the mapping is applied. All field names are now the same as in Remedy. Additional attributes and inaccessible fields are removed.
70
+
71
+ ### afterExecution
72
+
73
+ The scripts are executed after the create or update operation was executed. Use this execution point to create additional records (e.g. for Reporting or Notifications).
74
+
25
75
  # Accessible Variables
26
76
 
27
77
  Within scripts the following variables are available.
@@ -200,5 +250,23 @@ if ( requestData['id'] && requestData['status']=="Assigned" && !requestData.has
200
250
  }
201
251
 
202
252
  resolve()
203
-
204
253
  ```
254
+
255
+ ## Lookup Service CI Name in WorkOrder
256
+
257
+ If you change the Service CI in Work Orders you need to provide the ReconId and the Service Name. The Script looks up the Name if you only provide the id.
258
+
259
+ ```javascript
260
+ //lookup service ci name if reconId is given
261
+
262
+ if (requestData['ReconciliationIdentity']) {
263
+ const remedyResult = await adapter.remedy.search("BMC.CORE:BMC_BusinessService", `'ReconciliationIdentity' = "${requestData['ReconciliationIdentity']}" AND 'DatasetId' = "BMC.ASSET"`, "Name")
264
+
265
+ if (remedyResult && remedyResult.data && remedyResult.data[0]) {
266
+ const data = remedyResult.data[0];
267
+ requestData['CI Name'] = data['Name'];
268
+ }
269
+
270
+ }
271
+ resolve()
272
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manyos/smileconnect-api",
3
- "version": "1.40.0",
3
+ "version": "1.41.0",
4
4
  "description": "A proxy and abstraction layer for BMCs IT Service Management Suite",
5
5
  "main": "app.js",
6
6
  "scripts": {