transformation.ts
2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
export default {
title: 'Transform',
description: 'Change message Payload and metadata',
changeOriginator: {
name: 'Change originator',
details:
'Related Entity found using configured relation direction and Relation Type. If multiple Related Entities are found, only first Entity is used as new Originator, other entities are discarded.<br/>Alarm Originator found only in case original Originator is <code>Alarm</code> entity.',
description: 'Change Message Originator To Tenant/Customer/Related Entity/Alarm Originator',
fields: {
originatorSource: 'Originator source',
relationsQuery: 'Relations Query',
},
},
script: {
name: 'Script',
details:
'JavaScript function receive 3 input parameters <br/> <code>metadata</code> - is a Message metadata.<br/><code>msg</code> - is a Message payload.<br/><code>msgType</code> - is a Message type.<br/>Should return the following structure:<br/><code>{ \'msg: <i style="color: #666;">new payload</i>,<br/>   metadata: <i style="color: #666;">new metadata</i>,<br/>   msgType: <i style="color: #666;">new msgType</i>\' }</code><br/>All fields in resulting object are optional and will be taken from original message if not specified.',
description: 'Change Message payload, Metadata or Message type using JavaScript',
fields: {
jsScript: 'Transform',
jsScriptButtonName: 'Test transfer function',
},
},
toEmail: {
name: 'To email',
details:
"Transforms message to email message by populating email fields using values derived from message metadata. Set 'SEND_EMAIL' output message type.",
description: 'Transforms message to email message',
fields: {
fromTemplate: 'From Template',
toTemplate: 'To Template',
ccTemplate: 'Cc Template',
bccTemplate: 'Bcc Template',
subjectTemplate: 'Subject Template',
mailBodyType: 'Mail body type',
isHtmlTemplate: 'Dynamic mail body type',
bodyTemplate: 'Body Template',
},
},
};