-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-json.js
77 lines (77 loc) · 2.19 KB
/
config-json.js
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
module.exports = function configJSON(req) {
return {
workflowApiVersion: '1.1',
metaData: {
// the location of our icon file
icon: `images/icon.svg`,
category: 'customer'
},
// For Custom Activity this must say, "REST"
type: 'REST',
lang: {
'en-US': {
name: 'Discount Code',
description: 'Issue a discount code to contact them to entice them to buy something.'
}
},
arguments: {
execute: {
// See: https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/how-data-binding-works.htm
inArguments: [
{
discount: 10
}
],
outArguments: [],
// Fill in the host with the host that this is running on.
// It must run under HTTPS
url: `https://${req.headers.host}/modules/discount-code/execute`,
// The amount of time we want Journey Builder to wait before cancel the request. Default is 60000, Minimal is 1000
timeout: 10000,
// how many retrys if the request failed with 5xx error or network error. default is 0
retryCount: 3,
// wait in ms between retry.
retryDelay: 1000,
// The number of concurrent requests Journey Builder will send all together
concurrentRequests: 5
}
},
configurationArguments: {
publish: {
url: `https://${req.headers.host}/modules/discount-code/publish`
},
validate: {
url: `https://${req.headers.host}/modules/discount-code/validate`
},
stop: {
url: `https://${req.headers.host}/modules/discount-code/stop`
}
},
userInterfaces: {
configurationSupportsReadOnlyMode : true,
configInspector: {
size: 'scm-lg',
emptyIframe: true
}
},
schema: {
arguments: {
execute: {
inArguments: [],
outArguments: [{
discountCode: {
dataType: 'Text',
direction: 'out',
access: 'visible'
},
discount: {
dataType: 'Number',
direction: 'out',
access: 'visible'
}
}]
}
}
}
};
};