ampscript-data 3.7.0 → 4.0.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/package.json +2 -2
- package/src/constants.js +47 -0
- package/src/derived.js +100 -0
- package/src/functions/content.js +1028 -0
- package/src/functions/data-extension.js +1117 -0
- package/src/functions/date-time.js +411 -0
- package/src/functions/einstein-email-recs.js +32 -0
- package/src/functions/encryption-encoding.js +545 -0
- package/src/functions/http.js +338 -0
- package/src/functions/index.js +203 -0
- package/src/functions/marketing-cloud-api.js +378 -0
- package/src/functions/math.js +167 -0
- package/src/functions/microsoft-dynamics.js +400 -0
- package/src/functions/mobileconnect.js +339 -0
- package/src/functions/sales-service-cloud.js +230 -0
- package/src/functions/social.js +151 -0
- package/src/functions/string.js +432 -0
- package/src/functions/utility.js +1118 -0
- package/src/globals.js +9 -0
- package/src/index.js +34 -7228
- package/src/keywords.js +121 -0
- package/src/operators.js +66 -0
- package/src/personalization.js +254 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
// AUTO-SPLIT from the original single-file src/index.js. Data moved verbatim.
|
|
2
|
+
// AMPscript FUNCTIONS — category: HTTP (5 entries).
|
|
3
|
+
|
|
4
|
+
import { INF } from '../constants.js';
|
|
5
|
+
|
|
6
|
+
export const HTTP_FUNCTIONS = [
|
|
7
|
+
{
|
|
8
|
+
name: 'HTTPGet',
|
|
9
|
+
supportedInCloudPage: true,
|
|
10
|
+
supportedInEmail: true,
|
|
11
|
+
mcnSince: null,
|
|
12
|
+
handlebarsEquivalent: null,
|
|
13
|
+
mcnNotes: null,
|
|
14
|
+
isConfirmed: true,
|
|
15
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-http/mc-ampscript-reference-http-get.html',
|
|
16
|
+
guideUrl: 'https://ampscript.guide/httpget/',
|
|
17
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/httpget/',
|
|
18
|
+
minArgs: 1,
|
|
19
|
+
maxArgs: 4,
|
|
20
|
+
category: 'HTTP',
|
|
21
|
+
description: 'Performs an HTTP GET request and returns the response body.',
|
|
22
|
+
params: [
|
|
23
|
+
{
|
|
24
|
+
name: 'httpGetUrl',
|
|
25
|
+
description: 'The URL to perform the HTTP GET operation on',
|
|
26
|
+
type: 'string',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'continueOnError',
|
|
30
|
+
mcnSince: null,
|
|
31
|
+
mcnNotes: null,
|
|
32
|
+
description: 'If true, ignore errors encountered during the GET operation',
|
|
33
|
+
type: 'boolean',
|
|
34
|
+
optional: true,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'emptyContentHandling',
|
|
38
|
+
mcnSince: null,
|
|
39
|
+
mcnNotes: null,
|
|
40
|
+
description:
|
|
41
|
+
'How empty content is handled: 0 allows empty content, 1 returns an error, 2 skips the subscriber in a send',
|
|
42
|
+
type: 'number',
|
|
43
|
+
optional: true,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'status',
|
|
47
|
+
mcnSince: null,
|
|
48
|
+
mcnNotes: null,
|
|
49
|
+
description:
|
|
50
|
+
'Output variable that receives the function status: 0 success, -1 not found, -2 HTTP request error, -3 empty content',
|
|
51
|
+
type: 'number',
|
|
52
|
+
optional: true,
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
returnType: 'string',
|
|
56
|
+
returnDescription: 'The body of the HTTP response as a string.',
|
|
57
|
+
syntax: 'HTTPGet(httpGetUrl[, continueOnError, emptyContentHandling, status])',
|
|
58
|
+
example: "%%=HTTPGet('https://example.com/api')=%%",
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'HTTPPost',
|
|
62
|
+
supportedInCloudPage: true,
|
|
63
|
+
supportedInEmail: true,
|
|
64
|
+
mcnSince: null,
|
|
65
|
+
handlebarsEquivalent: null,
|
|
66
|
+
mcnNotes: null,
|
|
67
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-http/mc-ampscript-reference-http-post.html',
|
|
68
|
+
guideUrl: 'https://ampscript.guide/httppost/',
|
|
69
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/httppost/',
|
|
70
|
+
minArgs: 3,
|
|
71
|
+
maxArgs: INF,
|
|
72
|
+
category: 'HTTP',
|
|
73
|
+
isConfirmed: true,
|
|
74
|
+
differsFromOfficialDocs: true,
|
|
75
|
+
officialDocsNote:
|
|
76
|
+
'The official reference labels the fourth argument as an output parameter holding the "status" of the request, but on a live Engagement CloudPage (child BU) that variable receives the response BODY, not the status. The HTTP status code is the function return value. A non-2xx response (proven with a 404) and an empty URL both abort the whole page rather than returning the status, so a failing status can never be read from the return value.',
|
|
77
|
+
description:
|
|
78
|
+
'Performs an HTTP POST request and returns the HTTP status code. The response body is written to the optional output variable.',
|
|
79
|
+
params: [
|
|
80
|
+
{
|
|
81
|
+
name: 'urlEndpoint',
|
|
82
|
+
description: 'The URL to post the specified content to',
|
|
83
|
+
type: 'string',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'contentTypeHeader',
|
|
87
|
+
description: 'The content-type header to use in the POST request',
|
|
88
|
+
type: 'string',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'contentToPost',
|
|
92
|
+
description: 'The content to send to the specified URL in the POST request',
|
|
93
|
+
type: 'string',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'response',
|
|
97
|
+
mcnSince: null,
|
|
98
|
+
mcnNotes: null,
|
|
99
|
+
description: 'Output variable that receives the response body',
|
|
100
|
+
type: 'string',
|
|
101
|
+
optional: true,
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'headerName1',
|
|
105
|
+
description: 'The name of an additional header to include in the request',
|
|
106
|
+
type: 'string',
|
|
107
|
+
optional: true,
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'headerValue1',
|
|
111
|
+
description: 'The value of an additional header to include in the request',
|
|
112
|
+
type: 'string',
|
|
113
|
+
optional: true,
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'headerNameN',
|
|
117
|
+
description: 'The name of a further additional header',
|
|
118
|
+
type: 'string',
|
|
119
|
+
optional: true,
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: 'headerValueN',
|
|
123
|
+
description: 'The value of a further additional header',
|
|
124
|
+
type: 'string',
|
|
125
|
+
optional: true,
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
returnType: 'number',
|
|
129
|
+
returnDescription: 'The HTTP status code of the POST request.',
|
|
130
|
+
repeat: [{ startIndex: 4, groupSize: 2, minGroups: 0 }],
|
|
131
|
+
syntax: 'HTTPPost(urlEndpoint, contentTypeHeader, contentToPost[, @response, headerName1, headerValue1, headerNameN, headerValueN, ...])',
|
|
132
|
+
example:
|
|
133
|
+
"%%=HTTPPost('https://example.com/api', 'application/json', @payload, @response)=%%",
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'HTTPPost2',
|
|
137
|
+
supportedInCloudPage: true,
|
|
138
|
+
supportedInEmail: true,
|
|
139
|
+
mcnSince: null,
|
|
140
|
+
handlebarsEquivalent: null,
|
|
141
|
+
mcnNotes: null,
|
|
142
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-http/mc-ampscript-reference-http-post2.html',
|
|
143
|
+
guideUrl: 'https://ampscript.guide/httppost2/',
|
|
144
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/httppost2/',
|
|
145
|
+
minArgs: 3,
|
|
146
|
+
maxArgs: INF,
|
|
147
|
+
category: 'HTTP',
|
|
148
|
+
isConfirmed: true,
|
|
149
|
+
differsFromOfficialDocs: true,
|
|
150
|
+
officialDocsNote:
|
|
151
|
+
'The official reference labels the fifth argument (response) as storing the "status" of the request, but on a live Engagement CloudPage (child BU) it receives the response BODY and the sixth argument (responseRowSet) receives the response HEADERS as a rowset (11 header rows observed). The HTTP status code is the function return value. The boolean exceptionOnError flag is accepted at position four.',
|
|
152
|
+
description:
|
|
153
|
+
'Performs an HTTP POST and returns the HTTP status code. The response body and the response headers (as a rowset) are written to optional output variables.',
|
|
154
|
+
params: [
|
|
155
|
+
{ name: 'url', description: 'Request URL', type: 'string' },
|
|
156
|
+
{ name: 'contentType', description: 'Content-Type header', type: 'string' },
|
|
157
|
+
{ name: 'contentToPost', description: 'Request body', type: 'string' },
|
|
158
|
+
{
|
|
159
|
+
name: 'exceptionOnError',
|
|
160
|
+
description:
|
|
161
|
+
'If `true`, raise an exception when the request fails; if `false`, continue after an error',
|
|
162
|
+
type: 'boolean',
|
|
163
|
+
optional: true,
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: 'response',
|
|
167
|
+
description: 'Output variable for the response body',
|
|
168
|
+
type: 'string',
|
|
169
|
+
optional: true,
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: 'responseRowSet',
|
|
173
|
+
mcnSince: null,
|
|
174
|
+
mcnNotes: null,
|
|
175
|
+
description: 'Output variable for the response headers, returned as a rowset',
|
|
176
|
+
type: 'string',
|
|
177
|
+
optional: true,
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: 'headerName1',
|
|
181
|
+
description: 'First request header name',
|
|
182
|
+
type: 'string',
|
|
183
|
+
optional: true,
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: 'headerValue1',
|
|
187
|
+
description: 'First request header value',
|
|
188
|
+
type: 'string',
|
|
189
|
+
optional: true,
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: 'headerNameN',
|
|
193
|
+
description: 'Additional request header name',
|
|
194
|
+
type: 'string',
|
|
195
|
+
optional: true,
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: 'headerValueN',
|
|
199
|
+
description: 'Additional request header value',
|
|
200
|
+
type: 'string',
|
|
201
|
+
optional: true,
|
|
202
|
+
},
|
|
203
|
+
],
|
|
204
|
+
returnType: 'number',
|
|
205
|
+
returnDescription: 'The HTTP status code of the POST request.',
|
|
206
|
+
repeat: [{ startIndex: 6, groupSize: 2, minGroups: 0 }],
|
|
207
|
+
syntax: 'HTTPPost2(url, contentType, contentToPost[, exceptionOnError, @response, @responseRowSet, headerName1, headerValue1, headerNameN, headerValueN, ...])',
|
|
208
|
+
example:
|
|
209
|
+
"%%=HTTPPost2('https://example.com/api', 'application/json', @payload, true, @response, @responseRows)=%%",
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: 'HTTPPostWithRetry',
|
|
213
|
+
supportedInCloudPage: true,
|
|
214
|
+
supportedInEmail: true,
|
|
215
|
+
mcnSince: null,
|
|
216
|
+
handlebarsEquivalent: null,
|
|
217
|
+
mcnNotes: null,
|
|
218
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-http/mc-ampscript-reference-http-post-with-retry.html',
|
|
219
|
+
guideUrl: 'https://ampscript.guide/httppostwithretry/',
|
|
220
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/httppostwithretry/',
|
|
221
|
+
minArgs: 3,
|
|
222
|
+
maxArgs: INF,
|
|
223
|
+
category: 'HTTP',
|
|
224
|
+
isConfirmed: true,
|
|
225
|
+
differsFromOfficialDocs: true,
|
|
226
|
+
officialDocsNote:
|
|
227
|
+
'The official reference labels the responseStatus argument as storing the "status" of the request, but on a live Engagement CloudPage (child BU) it receives the response BODY and responseContentRowset receives the response HEADERS as a rowset (11 header rows observed). The HTTP status code is the function return value. The numRetries, reschedule and returnExceptionOnError arguments are all accepted at runtime; retry-on-failure is documented but was not forced here because a transient failure could not be induced safely against the echo endpoint.',
|
|
228
|
+
description:
|
|
229
|
+
'Posts content to the specified URL with automatic retry logic on failure, and returns the HTTP status code. Similar to HTTPPost2 but adds configurable retries and rescheduling; the response body and headers (as a rowset) are written to optional output variables.',
|
|
230
|
+
params: [
|
|
231
|
+
{ name: 'urlEndpoint', description: 'The URL to send the content to', type: 'string' },
|
|
232
|
+
{
|
|
233
|
+
name: 'contentTypeHeader',
|
|
234
|
+
description: 'The content-type header to use in the POST request',
|
|
235
|
+
type: 'string',
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
name: 'content',
|
|
239
|
+
description: 'The content to send to the specified URL in the POST request',
|
|
240
|
+
type: 'string',
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
name: 'numRetries',
|
|
244
|
+
description: 'The number of times the request can be retried',
|
|
245
|
+
type: 'number',
|
|
246
|
+
optional: true,
|
|
247
|
+
default: 3,
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
name: 'reschedule',
|
|
251
|
+
description:
|
|
252
|
+
'Whether the request is rescheduled (retried after 15 minutes) if it still fails after all retries',
|
|
253
|
+
type: 'boolean',
|
|
254
|
+
optional: true,
|
|
255
|
+
default: false,
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
name: 'returnExceptionOnError',
|
|
259
|
+
description:
|
|
260
|
+
'If true, raise an exception on error; if false, continue after an error',
|
|
261
|
+
type: 'boolean',
|
|
262
|
+
optional: true,
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
name: 'responseStatus',
|
|
266
|
+
description: 'An AMPscript variable that receives the response body',
|
|
267
|
+
type: 'string',
|
|
268
|
+
optional: true,
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
name: 'responseContentRowset',
|
|
272
|
+
description: 'An AMPscript variable that stores the response content as a rowset',
|
|
273
|
+
type: 'rowset',
|
|
274
|
+
optional: true,
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
name: 'headerName1',
|
|
278
|
+
description: 'The name of an additional header to include in the request',
|
|
279
|
+
type: 'string',
|
|
280
|
+
optional: true,
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
name: 'headerValue1',
|
|
284
|
+
description: 'The value of an additional header to include in the request',
|
|
285
|
+
type: 'string',
|
|
286
|
+
optional: true,
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
name: 'headerNameN',
|
|
290
|
+
description: 'The name of a further additional header',
|
|
291
|
+
type: 'string',
|
|
292
|
+
optional: true,
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
name: 'headerValueN',
|
|
296
|
+
description: 'The value of a further additional header',
|
|
297
|
+
type: 'string',
|
|
298
|
+
optional: true,
|
|
299
|
+
},
|
|
300
|
+
],
|
|
301
|
+
returnType: 'number',
|
|
302
|
+
returnDescription: 'The HTTP status code of the POST request.',
|
|
303
|
+
repeat: [{ startIndex: 8, groupSize: 2, minGroups: 0 }],
|
|
304
|
+
syntax: 'HTTPPostWithRetry(urlEndpoint, contentTypeHeader, content[, numRetries, reschedule, returnExceptionOnError, @responseStatus, @responseContentRowset, headerName1, headerValue1, headerNameN, headerValueN, ...])',
|
|
305
|
+
example: "%%=HTTPPostWithRetry('https://example.com/api', 'application/json', @payload)=%%",
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
name: 'HTTPRequestHeader',
|
|
309
|
+
supportedInCloudPage: true,
|
|
310
|
+
supportedInEmail: false,
|
|
311
|
+
mcnSince: null,
|
|
312
|
+
handlebarsEquivalent: null,
|
|
313
|
+
mcnNotes: null,
|
|
314
|
+
isConfirmed: true,
|
|
315
|
+
differsFromOfficialDocs: true,
|
|
316
|
+
officialDocsNote:
|
|
317
|
+
'Runtime-verified on a live Marketing Cloud Engagement CloudPage (child BU). The official reference states this function can only retrieve the standard HTTP headers listed in RFC 7231, but at runtime it also returns the value of a non-standard custom request header: a request sent with an X-Amp-Probe header returned that exact value, so the RFC 7231 restriction is not enforced when reading headers. A header that is absent from the request (for example Referer when none was sent) returns the empty string, matching the documented note. Email/send-context finding: rendered through the Email Preview API against a seeded sendable row, an isolated HTTPRequestHeader("User-Agent") was rejected with HTTP 400 errorcode 10004 ("HTTPRequestHeader Function is not valid in content. This function is only allowed in content with an HTTP context."). So it works only where an inbound HTTP request exists (CloudPages / landing pages) and cannot be used inside a sendable email, which fits its purpose since request headers are a request-time value absent at send time.',
|
|
318
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-http/mc-ampscript-reference-http-request-header.html',
|
|
319
|
+
guideUrl: 'https://ampscript.guide/httprequestheader/',
|
|
320
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/httprequestheader/',
|
|
321
|
+
minArgs: 1,
|
|
322
|
+
maxArgs: 1,
|
|
323
|
+
category: 'HTTP',
|
|
324
|
+
description:
|
|
325
|
+
'Returns the value of a specified HTTP request header from the inbound request.',
|
|
326
|
+
params: [
|
|
327
|
+
{
|
|
328
|
+
name: 'headerToRetrieve',
|
|
329
|
+
description: 'The header that you want to retrieve',
|
|
330
|
+
type: 'string',
|
|
331
|
+
},
|
|
332
|
+
],
|
|
333
|
+
returnType: 'string',
|
|
334
|
+
returnDescription: 'The value of the named HTTP request header.',
|
|
335
|
+
syntax: 'HTTPRequestHeader(headerToRetrieve)',
|
|
336
|
+
example: "%%=HTTPRequestHeader('X-Forwarded-For')=%%",
|
|
337
|
+
},
|
|
338
|
+
];
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
// AUTO-SPLIT from the original single-file src/index.js. Data moved verbatim.
|
|
2
|
+
// Reassembles the full AMPscript FUNCTIONS catalog from the per-category files
|
|
3
|
+
// and restores the exact original source order so downstream order
|
|
4
|
+
// (CANONICAL_FUNCTIONS, completions) is byte-for-byte unchanged.
|
|
5
|
+
import { CONTENT_FUNCTIONS } from './content.js';
|
|
6
|
+
import { DATA_EXTENSION_FUNCTIONS } from './data-extension.js';
|
|
7
|
+
import { DATE_TIME_FUNCTIONS } from './date-time.js';
|
|
8
|
+
import { EINSTEIN_EMAIL_RECS_FUNCTIONS } from './einstein-email-recs.js';
|
|
9
|
+
import { ENCRYPTION_ENCODING_FUNCTIONS } from './encryption-encoding.js';
|
|
10
|
+
import { HTTP_FUNCTIONS } from './http.js';
|
|
11
|
+
import { MARKETING_CLOUD_API_FUNCTIONS } from './marketing-cloud-api.js';
|
|
12
|
+
import { MATH_FUNCTIONS } from './math.js';
|
|
13
|
+
import { MICROSOFT_DYNAMICS_FUNCTIONS } from './microsoft-dynamics.js';
|
|
14
|
+
import { MOBILECONNECT_FUNCTIONS } from './mobileconnect.js';
|
|
15
|
+
import { SALES_SERVICE_CLOUD_FUNCTIONS } from './sales-service-cloud.js';
|
|
16
|
+
import { SOCIAL_FUNCTIONS } from './social.js';
|
|
17
|
+
import { STRING_FUNCTIONS } from './string.js';
|
|
18
|
+
import { UTILITY_FUNCTIONS } from './utility.js';
|
|
19
|
+
|
|
20
|
+
const CATEGORY_ENTRIES = [
|
|
21
|
+
...CONTENT_FUNCTIONS,
|
|
22
|
+
...DATA_EXTENSION_FUNCTIONS,
|
|
23
|
+
...DATE_TIME_FUNCTIONS,
|
|
24
|
+
...EINSTEIN_EMAIL_RECS_FUNCTIONS,
|
|
25
|
+
...ENCRYPTION_ENCODING_FUNCTIONS,
|
|
26
|
+
...HTTP_FUNCTIONS,
|
|
27
|
+
...MARKETING_CLOUD_API_FUNCTIONS,
|
|
28
|
+
...MATH_FUNCTIONS,
|
|
29
|
+
...MICROSOFT_DYNAMICS_FUNCTIONS,
|
|
30
|
+
...MOBILECONNECT_FUNCTIONS,
|
|
31
|
+
...SALES_SERVICE_CLOUD_FUNCTIONS,
|
|
32
|
+
...SOCIAL_FUNCTIONS,
|
|
33
|
+
...STRING_FUNCTIONS,
|
|
34
|
+
...UTILITY_FUNCTIONS,
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
// Original source order of function names (preserves the curated ordering).
|
|
38
|
+
const ORDER = [
|
|
39
|
+
'Add',
|
|
40
|
+
'AddMscrmListMember',
|
|
41
|
+
'AddObjectArrayItem',
|
|
42
|
+
'AttachFile',
|
|
43
|
+
'AttributeValue',
|
|
44
|
+
'AuthenticatedEmployeeID',
|
|
45
|
+
'AuthenticatedEmployeeNotificationAddress',
|
|
46
|
+
'AuthenticatedEmployeeUserName',
|
|
47
|
+
'AuthenticatedEnterpriseID',
|
|
48
|
+
'AuthenticatedMemberID',
|
|
49
|
+
'AuthenticatedMemberName',
|
|
50
|
+
'BarcodeURL',
|
|
51
|
+
'Base64Decode',
|
|
52
|
+
'Base64Encode',
|
|
53
|
+
'BeginImpressionRegion',
|
|
54
|
+
'BuildOptionList',
|
|
55
|
+
'BuildRowsetFromJSON',
|
|
56
|
+
'BuildRowSetFromString',
|
|
57
|
+
'BuildRowSetFromXML',
|
|
58
|
+
'Char',
|
|
59
|
+
'ClaimRow',
|
|
60
|
+
'ClaimRowValue',
|
|
61
|
+
'CloudPagesURL',
|
|
62
|
+
'Concat',
|
|
63
|
+
'ContentArea',
|
|
64
|
+
'ContentAreaByName',
|
|
65
|
+
'ContentBlockByID',
|
|
66
|
+
'ContentBlockByKey',
|
|
67
|
+
'ContentBlockByName',
|
|
68
|
+
'ContentImageByID',
|
|
69
|
+
'ContentImageByKey',
|
|
70
|
+
'CreateMSCRMRecord',
|
|
71
|
+
'CreateObject',
|
|
72
|
+
'CreateSalesforceObject',
|
|
73
|
+
'CreateSmsConversation',
|
|
74
|
+
'DataExtensionRowCount',
|
|
75
|
+
'DateAdd',
|
|
76
|
+
'DateDiff',
|
|
77
|
+
'DateParse',
|
|
78
|
+
'DatePart',
|
|
79
|
+
'DecryptSymmetric',
|
|
80
|
+
'DeleteData',
|
|
81
|
+
'DeleteDE',
|
|
82
|
+
'DescribeMSCRMEntities',
|
|
83
|
+
'DescribeMSCRMEntityAttributes',
|
|
84
|
+
'Divide',
|
|
85
|
+
'Domain',
|
|
86
|
+
'Empty',
|
|
87
|
+
'EncryptSymmetric',
|
|
88
|
+
'EndImpressionRegion',
|
|
89
|
+
'EndSmsConversation',
|
|
90
|
+
'ExecuteFilter',
|
|
91
|
+
'ExecuteFilterOrderedRows',
|
|
92
|
+
'Field',
|
|
93
|
+
'Format',
|
|
94
|
+
'FormatCurrency',
|
|
95
|
+
'FormatDate',
|
|
96
|
+
'FormatNumber',
|
|
97
|
+
'GetJWT',
|
|
98
|
+
'GetJWTByKeyName',
|
|
99
|
+
'GetPortfolioItem',
|
|
100
|
+
'GetPublishedSocialContent',
|
|
101
|
+
'GetSendTime',
|
|
102
|
+
'GetSocialPublishURL',
|
|
103
|
+
'GetSocialPublishURLByName',
|
|
104
|
+
'GUID',
|
|
105
|
+
'HTTPGet',
|
|
106
|
+
'HTTPPost',
|
|
107
|
+
'HTTPPost2',
|
|
108
|
+
'HTTPPostWithRetry',
|
|
109
|
+
'HTTPRequestHeader',
|
|
110
|
+
'IIf',
|
|
111
|
+
'Image',
|
|
112
|
+
'IndexOf',
|
|
113
|
+
'InsertData',
|
|
114
|
+
'InsertDE',
|
|
115
|
+
'InvokeCreate',
|
|
116
|
+
'InvokeDelete',
|
|
117
|
+
'InvokeExecute',
|
|
118
|
+
'InvokePerform',
|
|
119
|
+
'InvokeRetrieve',
|
|
120
|
+
'InvokeUpdate',
|
|
121
|
+
'IsCHTMLBrowser',
|
|
122
|
+
'IsEmailAddress',
|
|
123
|
+
'IsNull',
|
|
124
|
+
'IsNullDefault',
|
|
125
|
+
'IsPhoneNumber',
|
|
126
|
+
'Length',
|
|
127
|
+
'LiveContentMicrositeURL',
|
|
128
|
+
'LocalDateToSystemDate',
|
|
129
|
+
'LongSFID',
|
|
130
|
+
'Lookup',
|
|
131
|
+
'LookupOrderedRows',
|
|
132
|
+
'LookupOrderedRowsCS',
|
|
133
|
+
'LookupRows',
|
|
134
|
+
'LookupRowsCS',
|
|
135
|
+
'Lowercase',
|
|
136
|
+
'MD5',
|
|
137
|
+
'MMS_Content_URL',
|
|
138
|
+
'MicrositeURL',
|
|
139
|
+
'Mod',
|
|
140
|
+
'Msg',
|
|
141
|
+
'Multiply',
|
|
142
|
+
'Noun',
|
|
143
|
+
'Nouns',
|
|
144
|
+
'Now',
|
|
145
|
+
'Output',
|
|
146
|
+
'OutputLine',
|
|
147
|
+
'ProperCase',
|
|
148
|
+
'QueryParameter',
|
|
149
|
+
'RaiseError',
|
|
150
|
+
'Random',
|
|
151
|
+
'RatingStars',
|
|
152
|
+
'Redirect',
|
|
153
|
+
'RedirectTo',
|
|
154
|
+
'RegExMatch',
|
|
155
|
+
'Replace',
|
|
156
|
+
'ReplaceList',
|
|
157
|
+
'RequestParameter',
|
|
158
|
+
'RetrieveMSCRMRecords',
|
|
159
|
+
'RetrieveMSCRMRecordsFetchXML',
|
|
160
|
+
'RetrieveSalesforceJobSources',
|
|
161
|
+
'RetrieveSalesforceObjects',
|
|
162
|
+
'Row',
|
|
163
|
+
'RowCount',
|
|
164
|
+
'SetObjectProperty',
|
|
165
|
+
'SetSmsConversationNextKeyword',
|
|
166
|
+
'SetStateMscrmRecord',
|
|
167
|
+
'SHA1',
|
|
168
|
+
'SHA256',
|
|
169
|
+
'SHA512',
|
|
170
|
+
'StringToDate',
|
|
171
|
+
'StringToHex',
|
|
172
|
+
'Substring',
|
|
173
|
+
'Subtract',
|
|
174
|
+
'SystemDateToLocalDate',
|
|
175
|
+
'TransformXML',
|
|
176
|
+
'TreatAsContent',
|
|
177
|
+
'TreatAsContentArea',
|
|
178
|
+
'Trim',
|
|
179
|
+
'UpdateData',
|
|
180
|
+
'UpdateDE',
|
|
181
|
+
'UpdateMSCRMRecords',
|
|
182
|
+
'UpdateSingleSalesforceObject',
|
|
183
|
+
'Uppercase',
|
|
184
|
+
'UpsertContact',
|
|
185
|
+
'UpsertData',
|
|
186
|
+
'UpsertDE',
|
|
187
|
+
'UpsertMSCRMRecord',
|
|
188
|
+
'URLEncode',
|
|
189
|
+
'Verb',
|
|
190
|
+
'v',
|
|
191
|
+
'WAT',
|
|
192
|
+
'WATP',
|
|
193
|
+
'WrapLongURL',
|
|
194
|
+
];
|
|
195
|
+
|
|
196
|
+
const byName = new Map(CATEGORY_ENTRIES.map((f) => [f.name, f]));
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Canonical AMPscript function catalog, in original source order.
|
|
200
|
+
*
|
|
201
|
+
* @type {typeof CATEGORY_ENTRIES}
|
|
202
|
+
*/
|
|
203
|
+
export const FUNCTIONS = ORDER.map((name) => byName.get(name));
|