ampscript-data 1.0.0 → 2.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/README.md +7 -1
- package/package.json +1 -1
- package/src/index.js +2141 -671
package/src/index.js
CHANGED
|
@@ -11,7 +11,21 @@ const INF = Infinity;
|
|
|
11
11
|
|
|
12
12
|
// ── Function catalog ─────────────────────────────────────────────────────────
|
|
13
13
|
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* `repeat` (variadic functions only): describes how trailing arguments repeat when
|
|
16
|
+
* `maxArgs === Infinity`. Coordinates are 0-based ARGUMENT-STREAM indices (the actual
|
|
17
|
+
* call arguments), not `params[]` indices. Each element is one repeating group; most
|
|
18
|
+
* functions have a single group, but the DataExtension Update/Upsert family has two.
|
|
19
|
+
* - `startIndex` first argument index where the group begins
|
|
20
|
+
* - `groupSize` number of arguments forming one repeatable unit
|
|
21
|
+
* - `minGroups` minimum number of complete groups required
|
|
22
|
+
* - `countParam` optional name of an earlier param whose literal value dictates how many
|
|
23
|
+
* groups of this block are present (e.g. `columnValuePairs`)
|
|
24
|
+
*
|
|
25
|
+
* Param naming convention for variadic functions: the first required occurrence of a
|
|
26
|
+
* group member is `<base>1` and the repeating occurrence is `<base>N` (with `optional`).
|
|
27
|
+
*
|
|
28
|
+
@type {{name: string, mcnSince: number | null, mcnNotes: string | null, docUrl?: string, guideUrl?: string, minArgs: number, maxArgs: number, category: string, description: string, params: {name: string, description: string, type?: string, enum?: (string | number)[], optional?: boolean, default?: string | number | boolean}[], returnType?: string, returnDescription?: string, returnEnum?: (string | number)[], syntax?: string, example?: string, repeat?: {startIndex: number, groupSize: number, minGroups: number, countParam?: string}[], deprecated?: boolean, deprecatedReplacement?: string, deprecatedReason?: string}[]} */
|
|
15
29
|
export const FUNCTIONS = [
|
|
16
30
|
{
|
|
17
31
|
name: 'Add',
|
|
@@ -28,11 +42,12 @@ export const FUNCTIONS = [
|
|
|
28
42
|
{ name: 'number2', description: 'Second operand', type: 'number' },
|
|
29
43
|
],
|
|
30
44
|
returnType: 'number',
|
|
45
|
+
returnDescription: 'The numeric sum of the two operands.',
|
|
31
46
|
syntax: 'Add(number1, number2)',
|
|
32
47
|
example: '%%=Add(15, 27)=%%',
|
|
33
48
|
},
|
|
34
49
|
{
|
|
35
|
-
name: '
|
|
50
|
+
name: 'AddMscrmListMember',
|
|
36
51
|
mcnSince: null,
|
|
37
52
|
mcnNotes: null,
|
|
38
53
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-mscrm/mc-ampscript-reference-microsoft-dynamics-crm-add-list-member.html',
|
|
@@ -42,11 +57,26 @@ export const FUNCTIONS = [
|
|
|
42
57
|
category: 'Microsoft Dynamics CRM',
|
|
43
58
|
description: 'Appends a member to a Dynamics CRM list.',
|
|
44
59
|
params: [
|
|
45
|
-
{
|
|
46
|
-
|
|
60
|
+
{
|
|
61
|
+
name: 'recordGuid',
|
|
62
|
+
description: 'The GUID of the record that you want to add to the marketing list',
|
|
63
|
+
type: 'string',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'listGuid',
|
|
67
|
+
description: 'The GUID of the marketing list that you want to add the record to',
|
|
68
|
+
type: 'string',
|
|
69
|
+
},
|
|
47
70
|
],
|
|
48
71
|
returnType: 'void',
|
|
49
|
-
|
|
72
|
+
returnDescription: 'No value is returned.',
|
|
73
|
+
syntax: 'AddMscrmListMember(recordGuid, listGuid)',
|
|
74
|
+
example:
|
|
75
|
+
'%%[\n' +
|
|
76
|
+
'var @member = "43b4a7c9-7360-4753-955f-738bd89934b5"\n' +
|
|
77
|
+
'var @list = "fdc5dfe4-e5e1-48af-87a1-4ac10433e895"\n' +
|
|
78
|
+
'AddMscrmListMember(@member, @list)\n' +
|
|
79
|
+
']%%',
|
|
50
80
|
},
|
|
51
81
|
{
|
|
52
82
|
name: 'AddObjectArrayItem',
|
|
@@ -59,12 +89,15 @@ export const FUNCTIONS = [
|
|
|
59
89
|
category: 'Marketing Cloud API',
|
|
60
90
|
description: "Appends an item to an API object's array property.",
|
|
61
91
|
params: [
|
|
62
|
-
{ name: 'apiObject', description: 'API object reference' },
|
|
63
|
-
{ name: '
|
|
64
|
-
{ name: '
|
|
92
|
+
{ name: 'apiObject', description: 'API object reference', type: 'object' },
|
|
93
|
+
{ name: 'arrayProperty', description: 'Array property name', type: 'string' },
|
|
94
|
+
{ name: 'itemToAdd', description: 'Value to append', type: 'string' },
|
|
65
95
|
],
|
|
66
96
|
returnType: 'void',
|
|
67
|
-
|
|
97
|
+
returnDescription:
|
|
98
|
+
'No value is returned; the item is appended to the named array property.',
|
|
99
|
+
syntax: 'AddObjectArrayItem(apiObject, arrayProperty, itemToAdd)',
|
|
100
|
+
example: "AddObjectArrayItem(@apiObject, 'Recipients', @recipient)",
|
|
68
101
|
},
|
|
69
102
|
{
|
|
70
103
|
name: 'AttachFile',
|
|
@@ -72,36 +105,71 @@ export const FUNCTIONS = [
|
|
|
72
105
|
mcnNotes: null,
|
|
73
106
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-content/mc-ampscript-reference-content-attach-file.html',
|
|
74
107
|
guideUrl: 'https://ampscript.guide/attachfile/',
|
|
75
|
-
minArgs:
|
|
108
|
+
minArgs: 2,
|
|
76
109
|
maxArgs: 8,
|
|
77
110
|
category: 'Content',
|
|
78
111
|
description: 'Includes a file attachment in the outgoing message.',
|
|
79
112
|
params: [
|
|
80
|
-
{ name: 'portfolio', description: 'Portfolio source', type: 'string' },
|
|
81
|
-
{ name: 'customerKey', description: 'File customer key', type: 'string' },
|
|
82
|
-
{ name: 'fileName', description: 'Attachment display name', type: 'string' },
|
|
83
|
-
{ name: 'mimeType', description: 'MIME type', type: 'string' },
|
|
84
|
-
{ name: 'isInline', description: 'Display inline', type: 'boolean', optional: true },
|
|
85
113
|
{
|
|
86
|
-
name: '
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
114
|
+
name: 'fileLocationType',
|
|
115
|
+
description:
|
|
116
|
+
'The type of location to pull the file from. Accepted values: http, ftp, contentbuilder',
|
|
117
|
+
type: 'string',
|
|
118
|
+
enum: ['http', 'ftp', 'contentbuilder'],
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'fileLocation',
|
|
122
|
+
description:
|
|
123
|
+
'The location to pull the file from. This parameter can contain a maximum of 2088 characters. If you specify http for the first parameter, this parameter must contain a URL. If you specify ftp for the first parameter, this parameter must contain the name of a file in the Import folder of your Enhanced FTP site. If you specify contentbuilder for the first parameter, this parameter must contain the external key of the file to attach.',
|
|
124
|
+
type: 'string',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'attachmentFileName',
|
|
128
|
+
description:
|
|
129
|
+
"The name assigned to a file when it's attached to an email message. If you don't specify a new name, the function uses the original file name. If you specify http for the first parameter and don't provide a value for this parameter, the function uses the Content-Disposition information from the HTTP header. If the server providing the file doesn't provide Content-Disposition information, the function uses an auto-generated value.",
|
|
90
130
|
type: 'string',
|
|
91
131
|
optional: true,
|
|
92
132
|
},
|
|
93
|
-
{ name: 'encoding', description: 'Character encoding', type: 'string', optional: true },
|
|
94
133
|
{
|
|
95
|
-
name: '
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
134
|
+
name: 'viewOnWeb',
|
|
135
|
+
description:
|
|
136
|
+
'If `true` or `1`, a link to the file is included when a recipient selects the "View as a Web Page" link in the email. If `false` or `0`, the link is omitted. You can only use this parameter if the value of the first parameter is `http`.',
|
|
137
|
+
type: 'boolean',
|
|
138
|
+
optional: true,
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: 'viewOnWebUrl',
|
|
142
|
+
description:
|
|
143
|
+
'The URL to use when including a link to the file in the "View as a Web Page" context. If the value of `viewOnWeb` is true, you must provide a value for this parameter. You can only use this parameter if the value of the first parameter is `http`.',
|
|
144
|
+
type: 'string',
|
|
145
|
+
optional: true,
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: 'viewOnWebFileName',
|
|
149
|
+
description:
|
|
150
|
+
'The file name to use when including a link to the file in the "View as a Web Page" context. You can only use this parameter if the value of the first parameter is `http`.',
|
|
99
151
|
type: 'string',
|
|
100
152
|
optional: true,
|
|
101
153
|
},
|
|
154
|
+
{
|
|
155
|
+
name: 'viewOnWebDuration',
|
|
156
|
+
description:
|
|
157
|
+
'The number of days the link appears in the "View as a Web Page" context. You can only use this parameter if the value of the first parameter is `http`.',
|
|
158
|
+
type: 'number',
|
|
159
|
+
optional: true,
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: 'contentDispositionAttachment',
|
|
163
|
+
description:
|
|
164
|
+
'If `true` or `1`, the function changes the value of the `content-disposition` header for the attachment to `attachment`. If `false` or `0`, the value of this header is set to `inline`.',
|
|
165
|
+
type: 'boolean',
|
|
166
|
+
optional: true,
|
|
167
|
+
},
|
|
102
168
|
],
|
|
103
169
|
returnType: 'void',
|
|
104
|
-
|
|
170
|
+
returnDescription: 'No value is returned; the file is attached to the outgoing email.',
|
|
171
|
+
syntax: 'AttachFile(fileLocationType, fileLocation, attachmentFileName, viewOnWeb, viewOnWebUrl, viewOnWebFileName, viewOnWebDuration, contentDispositionAttachment)',
|
|
172
|
+
example: "%%=AttachFile('http', 'https://example.com/catalog.pdf', 'Catalog.pdf')=%%",
|
|
105
173
|
},
|
|
106
174
|
{
|
|
107
175
|
name: 'AttributeValue',
|
|
@@ -116,6 +184,7 @@ export const FUNCTIONS = [
|
|
|
116
184
|
'Safely retrieves a subscriber attribute value, returning empty string if null.',
|
|
117
185
|
params: [{ name: 'attributeName', description: 'Attribute name', type: 'string' }],
|
|
118
186
|
returnType: 'string',
|
|
187
|
+
returnDescription: 'The value of the named subscriber or send attribute as a string.',
|
|
119
188
|
syntax: 'AttributeValue(attributeName)',
|
|
120
189
|
example: "%%=AttributeValue('firstname')=%%",
|
|
121
190
|
},
|
|
@@ -131,7 +200,9 @@ export const FUNCTIONS = [
|
|
|
131
200
|
description: 'Returns the employee ID of the currently authenticated user.',
|
|
132
201
|
params: [],
|
|
133
202
|
returnType: 'string',
|
|
203
|
+
returnDescription: 'The ID of the authenticated employee, or empty when none is set.',
|
|
134
204
|
syntax: 'AuthenticatedEmployeeID()',
|
|
205
|
+
example: '%%=AuthenticatedEmployeeID()=%%',
|
|
135
206
|
},
|
|
136
207
|
{
|
|
137
208
|
name: 'AuthenticatedEmployeeNotificationAddress',
|
|
@@ -145,7 +216,9 @@ export const FUNCTIONS = [
|
|
|
145
216
|
description: 'Returns the notification email address of the authenticated employee.',
|
|
146
217
|
params: [],
|
|
147
218
|
returnType: 'string',
|
|
219
|
+
returnDescription: 'The notification email address of the authenticated employee.',
|
|
148
220
|
syntax: 'AuthenticatedEmployeeNotificationAddress()',
|
|
221
|
+
example: '%%=AuthenticatedEmployeeNotificationAddress()=%%',
|
|
149
222
|
},
|
|
150
223
|
{
|
|
151
224
|
name: 'AuthenticatedEmployeeUserName',
|
|
@@ -159,7 +232,9 @@ export const FUNCTIONS = [
|
|
|
159
232
|
description: 'Returns the username of the authenticated employee.',
|
|
160
233
|
params: [],
|
|
161
234
|
returnType: 'string',
|
|
235
|
+
returnDescription: 'The user name of the authenticated employee.',
|
|
162
236
|
syntax: 'AuthenticatedEmployeeUserName()',
|
|
237
|
+
example: '%%=AuthenticatedEmployeeUserName()=%%',
|
|
163
238
|
},
|
|
164
239
|
{
|
|
165
240
|
name: 'AuthenticatedEnterpriseID',
|
|
@@ -173,7 +248,9 @@ export const FUNCTIONS = [
|
|
|
173
248
|
description: 'Returns the enterprise ID (top-level MID) of the authenticated user.',
|
|
174
249
|
params: [],
|
|
175
250
|
returnType: 'string',
|
|
251
|
+
returnDescription: 'The enterprise ID (EID) of the authenticated context.',
|
|
176
252
|
syntax: 'AuthenticatedEnterpriseID()',
|
|
253
|
+
example: '%%=AuthenticatedEnterpriseID()=%%',
|
|
177
254
|
},
|
|
178
255
|
{
|
|
179
256
|
name: 'AuthenticatedMemberID',
|
|
@@ -187,7 +264,9 @@ export const FUNCTIONS = [
|
|
|
187
264
|
description: 'Returns the member ID (MID) of the authenticated business unit.',
|
|
188
265
|
params: [],
|
|
189
266
|
returnType: 'string',
|
|
267
|
+
returnDescription: 'The member ID (MID) of the authenticated business unit.',
|
|
190
268
|
syntax: 'AuthenticatedMemberID()',
|
|
269
|
+
example: '%%=AuthenticatedMemberID()=%%',
|
|
191
270
|
},
|
|
192
271
|
{
|
|
193
272
|
name: 'AuthenticatedMemberName',
|
|
@@ -201,7 +280,9 @@ export const FUNCTIONS = [
|
|
|
201
280
|
description: 'Returns the name of the authenticated business unit.',
|
|
202
281
|
params: [],
|
|
203
282
|
returnType: 'string',
|
|
283
|
+
returnDescription: 'The name of the authenticated business unit.',
|
|
204
284
|
syntax: 'AuthenticatedMemberName()',
|
|
285
|
+
example: '%%=AuthenticatedMemberName()=%%',
|
|
205
286
|
},
|
|
206
287
|
{
|
|
207
288
|
name: 'BarcodeURL',
|
|
@@ -215,18 +296,77 @@ export const FUNCTIONS = [
|
|
|
215
296
|
description:
|
|
216
297
|
'Generates a URL pointing to a barcode image rendered from the given parameters.',
|
|
217
298
|
params: [
|
|
218
|
-
{
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
{
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
299
|
+
{
|
|
300
|
+
name: 'valueToConvert',
|
|
301
|
+
description: 'Data to convert into a barcode',
|
|
302
|
+
type: 'string',
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
name: 'barcodeType',
|
|
306
|
+
description: 'Type of barcode to generate',
|
|
307
|
+
type: 'string',
|
|
308
|
+
enum: [
|
|
309
|
+
'codabar',
|
|
310
|
+
'code11',
|
|
311
|
+
'code128auto',
|
|
312
|
+
'code128a',
|
|
313
|
+
'code128b',
|
|
314
|
+
'code128c',
|
|
315
|
+
'code39',
|
|
316
|
+
'code39ext',
|
|
317
|
+
'code93',
|
|
318
|
+
'code93ext',
|
|
319
|
+
'datamatrix',
|
|
320
|
+
'ean13',
|
|
321
|
+
'ean8',
|
|
322
|
+
'industr25',
|
|
323
|
+
'interl25',
|
|
324
|
+
'msi',
|
|
325
|
+
'pdf417',
|
|
326
|
+
'upca',
|
|
327
|
+
'upce',
|
|
328
|
+
],
|
|
329
|
+
},
|
|
330
|
+
{ name: 'width', description: 'Barcode image width in pixels', type: 'number' },
|
|
331
|
+
{ name: 'height', description: 'Barcode image height in pixels', type: 'number' },
|
|
332
|
+
{
|
|
333
|
+
name: 'checksumValue',
|
|
334
|
+
description: 'Checksum value for barcode',
|
|
335
|
+
type: 'string',
|
|
336
|
+
optional: true,
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
name: 'showText',
|
|
340
|
+
description:
|
|
341
|
+
"If `true` or `1`, the function includes the text of `valueToConvert` under the barcode. If `false` or `0`, the function doesn't include the text of `valueToConvert` under the barcode. The default value is `false`.",
|
|
342
|
+
type: 'boolean',
|
|
343
|
+
optional: true,
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
name: 'altText',
|
|
347
|
+
description: 'Alternate text to display under the barcode if `showText` is `false`',
|
|
348
|
+
type: 'string',
|
|
349
|
+
optional: true,
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
name: 'rotation',
|
|
353
|
+
description: 'Orientation of barcode in degrees',
|
|
354
|
+
type: 'number',
|
|
355
|
+
enum: [0, 90, 180, 270],
|
|
356
|
+
optional: true,
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
name: 'transparentBG',
|
|
360
|
+
description:
|
|
361
|
+
'If `true` or `1`, the barcode includes a transparent background. Otherwise, the background is white. The default value is `false`.',
|
|
362
|
+
type: 'boolean',
|
|
363
|
+
optional: true,
|
|
364
|
+
},
|
|
227
365
|
],
|
|
228
366
|
returnType: 'string',
|
|
229
|
-
|
|
367
|
+
returnDescription: 'A URL that renders the requested barcode image.',
|
|
368
|
+
syntax: 'BarcodeURL(valueToConvert, barcodeType, width, height, checksumValue, boolShowText, altText, rotation, boolTransparentBG)',
|
|
369
|
+
example: "%%=BarcodeURL('12345', 'qr', 150, 150, 0, 0, '', 0, 0)=%%",
|
|
230
370
|
},
|
|
231
371
|
{
|
|
232
372
|
name: 'Base64Decode',
|
|
@@ -251,6 +391,7 @@ export const FUNCTIONS = [
|
|
|
251
391
|
},
|
|
252
392
|
],
|
|
253
393
|
returnType: 'string',
|
|
394
|
+
returnDescription: 'The decoded string.',
|
|
254
395
|
syntax: 'Base64Decode(encodedString[, encoding, characterSet])',
|
|
255
396
|
example: "%%=Base64Decode('SGVsbG8=')=%%",
|
|
256
397
|
},
|
|
@@ -269,6 +410,7 @@ export const FUNCTIONS = [
|
|
|
269
410
|
{ name: 'encoding', description: 'Encoding scheme', type: 'string', optional: true },
|
|
270
411
|
],
|
|
271
412
|
returnType: 'string',
|
|
413
|
+
returnDescription: 'The Base64-encoded representation of the input.',
|
|
272
414
|
syntax: 'Base64Encode(value[, encoding])',
|
|
273
415
|
example: "%%=Base64Encode('Hello')=%%",
|
|
274
416
|
},
|
|
@@ -284,7 +426,9 @@ export const FUNCTIONS = [
|
|
|
284
426
|
description: 'Marks the start of an impression tracking region.',
|
|
285
427
|
params: [{ name: 'regionName', description: 'Impression region name', type: 'string' }],
|
|
286
428
|
returnType: 'void',
|
|
429
|
+
returnDescription: 'No value is returned; it marks the start of an impression region.',
|
|
287
430
|
syntax: 'BeginImpressionRegion(regionName)',
|
|
431
|
+
example: "BeginImpressionRegion('Region A')",
|
|
288
432
|
},
|
|
289
433
|
{
|
|
290
434
|
name: 'BuildOptionList',
|
|
@@ -299,31 +443,48 @@ export const FUNCTIONS = [
|
|
|
299
443
|
'Builds HTML <option> elements from a data extension for use in a <select> dropdown.',
|
|
300
444
|
params: [
|
|
301
445
|
{
|
|
302
|
-
name: '
|
|
446
|
+
name: 'defaultSelection',
|
|
303
447
|
mcnSince: null,
|
|
304
448
|
mcnNotes: null,
|
|
305
|
-
description: '
|
|
449
|
+
description: 'The option that is selected by default',
|
|
450
|
+
type: 'string|number',
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
name: 'option1Value',
|
|
454
|
+
description:
|
|
455
|
+
'An identifier for the first option. The function sets the `value` parameter in the `<option>` tag to this value.',
|
|
306
456
|
type: 'string',
|
|
307
457
|
},
|
|
308
|
-
{ name: 'selectedValue', description: 'Value to mark as selected', type: 'string' },
|
|
309
458
|
{
|
|
310
|
-
name: '
|
|
311
|
-
|
|
312
|
-
mcnNotes: null,
|
|
313
|
-
description: 'Column for option display text',
|
|
459
|
+
name: 'option1Text',
|
|
460
|
+
description: 'The display text for the option tag.',
|
|
314
461
|
type: 'string',
|
|
315
462
|
},
|
|
316
463
|
{
|
|
317
|
-
name: '
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
464
|
+
name: 'optionValueN',
|
|
465
|
+
description:
|
|
466
|
+
'An identifier for an additional option. The function sets the `value` parameter in the `<option>` tag to this value.',
|
|
467
|
+
type: 'string',
|
|
468
|
+
optional: true,
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
name: 'optionTextN',
|
|
472
|
+
description: 'The display text for the additional option tag.',
|
|
321
473
|
type: 'string',
|
|
322
474
|
optional: true,
|
|
323
475
|
},
|
|
324
476
|
],
|
|
325
477
|
returnType: 'string',
|
|
326
|
-
|
|
478
|
+
returnDescription: 'An HTML string of option elements built from the supplied values.',
|
|
479
|
+
repeat: [{ startIndex: 1, groupSize: 2, minGroups: 1 }],
|
|
480
|
+
syntax: 'BuildOptionList(defaultSelection, option1Value, option1Text[, optionValueN, optionTextN, ...])',
|
|
481
|
+
example:
|
|
482
|
+
'%%[\n' +
|
|
483
|
+
'set @DefaultOption = 2\n' +
|
|
484
|
+
'set @OptionList = BuildOptionList(@DefaultOption, "1", "Option A", "2", "Option B", "3", "Option C")\n' +
|
|
485
|
+
']%%\n' +
|
|
486
|
+
'<p>Choose an option:</p>\n' +
|
|
487
|
+
'<select name="choice">\n%%=v(@OptionList)=%%\n</select>',
|
|
327
488
|
},
|
|
328
489
|
{
|
|
329
490
|
name: 'BuildRowsetFromJSON',
|
|
@@ -331,30 +492,36 @@ export const FUNCTIONS = [
|
|
|
331
492
|
mcnNotes: null,
|
|
332
493
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-content/mc-ampscript-reference-content-build-rowset-from-json.html',
|
|
333
494
|
guideUrl: 'https://ampscript.guide/buildrowsetfromjson/',
|
|
334
|
-
minArgs:
|
|
495
|
+
minArgs: 3,
|
|
335
496
|
maxArgs: 3,
|
|
336
497
|
category: 'Content',
|
|
337
498
|
description: 'Parses a JSON string and returns a rowset.',
|
|
338
499
|
params: [
|
|
339
|
-
{ name: 'json', description: 'JSON string to parse', type: 'string' },
|
|
340
500
|
{
|
|
341
|
-
name: '
|
|
501
|
+
name: 'jsonData',
|
|
502
|
+
description: 'The JSON data that you want to parse',
|
|
503
|
+
type: 'string',
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
name: 'jsonPathExpression',
|
|
342
507
|
mcnSince: null,
|
|
343
508
|
mcnNotes: null,
|
|
344
|
-
description: 'JSONPath expression
|
|
509
|
+
description: 'The JSONPath expression that parses the source data',
|
|
345
510
|
type: 'string',
|
|
346
511
|
},
|
|
347
512
|
{
|
|
348
|
-
name: '
|
|
513
|
+
name: 'returnEmptyOnError',
|
|
349
514
|
mcnSince: null,
|
|
350
515
|
mcnNotes: null,
|
|
351
|
-
description:
|
|
352
|
-
|
|
353
|
-
|
|
516
|
+
description:
|
|
517
|
+
'If false, return an empty rowset on a syntax error; if true, raise an exception',
|
|
518
|
+
type: 'boolean',
|
|
354
519
|
},
|
|
355
520
|
],
|
|
356
521
|
returnType: 'rowset',
|
|
357
|
-
|
|
522
|
+
returnDescription: 'A rowset built from the matched JSON nodes.',
|
|
523
|
+
syntax: 'BuildRowsetFromJSON(jsonData, jsonPathExpression, returnEmptyOnError)',
|
|
524
|
+
example: "%%[ SET @rows = BuildRowsetFromJSON(@json, '$.items[*]', 1) ]%%",
|
|
358
525
|
},
|
|
359
526
|
{
|
|
360
527
|
name: 'BuildRowSetFromString',
|
|
@@ -367,11 +534,21 @@ export const FUNCTIONS = [
|
|
|
367
534
|
category: 'Content',
|
|
368
535
|
description: 'Splits a delimited string into a single-column rowset.',
|
|
369
536
|
params: [
|
|
370
|
-
{
|
|
371
|
-
|
|
537
|
+
{
|
|
538
|
+
name: 'sourceData',
|
|
539
|
+
description: 'A string that contains the data to load into a rowset',
|
|
540
|
+
type: 'string',
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
name: 'delimiter',
|
|
544
|
+
description: 'The character used as a delimiter in the source data',
|
|
545
|
+
type: 'string',
|
|
546
|
+
},
|
|
372
547
|
],
|
|
373
548
|
returnType: 'rowset',
|
|
374
|
-
|
|
549
|
+
returnDescription:
|
|
550
|
+
'A rowset where each row holds one delimited segment of the input string.',
|
|
551
|
+
syntax: 'BuildRowSetFromString(sourceData, delimiter)',
|
|
375
552
|
example: "%%=BuildRowSetFromString('a,b,c', ',')=%%",
|
|
376
553
|
},
|
|
377
554
|
{
|
|
@@ -380,24 +557,30 @@ export const FUNCTIONS = [
|
|
|
380
557
|
mcnNotes: null,
|
|
381
558
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-content/mc-ampscript-reference-content-build-rowset-from-xml.html',
|
|
382
559
|
guideUrl: 'https://ampscript.guide/buildrowsetfromxml/',
|
|
383
|
-
minArgs:
|
|
560
|
+
minArgs: 3,
|
|
384
561
|
maxArgs: 3,
|
|
385
562
|
category: 'Content',
|
|
386
563
|
description: 'Parses an XML string using an XPath expression and returns a rowset.',
|
|
387
564
|
params: [
|
|
388
|
-
{ name: '
|
|
389
|
-
{
|
|
565
|
+
{ name: 'xmlData', description: 'The XML data that you want to parse', type: 'string' },
|
|
566
|
+
{
|
|
567
|
+
name: 'xpathExpression',
|
|
568
|
+
description: 'The XPath expression that parses the source data',
|
|
569
|
+
type: 'string',
|
|
570
|
+
},
|
|
390
571
|
{
|
|
391
|
-
name: '
|
|
572
|
+
name: 'returnEmptyOnError',
|
|
392
573
|
mcnSince: null,
|
|
393
574
|
mcnNotes: null,
|
|
394
|
-
description:
|
|
575
|
+
description:
|
|
576
|
+
'If false, return an empty rowset on a syntax error; if true, raise an exception',
|
|
395
577
|
type: 'boolean',
|
|
396
|
-
optional: true,
|
|
397
578
|
},
|
|
398
579
|
],
|
|
399
580
|
returnType: 'rowset',
|
|
400
|
-
|
|
581
|
+
returnDescription: 'A rowset built from the matched XML nodes.',
|
|
582
|
+
syntax: 'BuildRowSetFromXML(xmlData, xpathExpression, returnEmptyOnError)',
|
|
583
|
+
example: "%%[ SET @rows = BuildRowSetFromXML(@xml, '/root/item', 1) ]%%",
|
|
401
584
|
},
|
|
402
585
|
{
|
|
403
586
|
name: 'Char',
|
|
@@ -410,9 +593,9 @@ export const FUNCTIONS = [
|
|
|
410
593
|
category: 'String',
|
|
411
594
|
description: 'Returns the character for the given ASCII code.',
|
|
412
595
|
params: [
|
|
413
|
-
{ name: '
|
|
596
|
+
{ name: 'characterCode', description: 'ASCII character code', type: 'number' },
|
|
414
597
|
{
|
|
415
|
-
name: '
|
|
598
|
+
name: 'numRepetitions',
|
|
416
599
|
mcnSince: null,
|
|
417
600
|
mcnNotes: null,
|
|
418
601
|
description: 'Number of times to repeat the returned character',
|
|
@@ -421,7 +604,8 @@ export const FUNCTIONS = [
|
|
|
421
604
|
},
|
|
422
605
|
],
|
|
423
606
|
returnType: 'string',
|
|
424
|
-
|
|
607
|
+
returnDescription: 'The character that corresponds to the supplied character code.',
|
|
608
|
+
syntax: 'Char(characterCode[, numRepetitions])',
|
|
425
609
|
example: '%%=Char(10)=%%',
|
|
426
610
|
},
|
|
427
611
|
{
|
|
@@ -437,34 +621,36 @@ export const FUNCTIONS = [
|
|
|
437
621
|
'Atomically claims an unclaimed row in a data extension by setting a key column value.',
|
|
438
622
|
params: [
|
|
439
623
|
{
|
|
440
|
-
name: '
|
|
624
|
+
name: 'dataExt',
|
|
441
625
|
mcnSince: null,
|
|
442
626
|
mcnNotes: null,
|
|
443
|
-
description: '
|
|
627
|
+
description: 'The data extension that contains the value to return (hard-coded)',
|
|
444
628
|
type: 'string',
|
|
445
629
|
},
|
|
446
630
|
{
|
|
447
|
-
name: '
|
|
631
|
+
name: 'claimColumn',
|
|
448
632
|
mcnSince: null,
|
|
449
633
|
mcnNotes: null,
|
|
450
|
-
description: '
|
|
634
|
+
description: 'The column the function uses to track whether a row is claimed',
|
|
451
635
|
type: 'string',
|
|
452
636
|
},
|
|
453
637
|
{
|
|
454
|
-
name: '
|
|
638
|
+
name: 'claimantColumn',
|
|
455
639
|
mcnSince: null,
|
|
456
640
|
mcnNotes: null,
|
|
457
|
-
description:
|
|
641
|
+
description:
|
|
642
|
+
'The column the function uses to track the subscriber who claimed the row',
|
|
458
643
|
type: 'string',
|
|
459
644
|
},
|
|
460
645
|
{
|
|
461
|
-
name: '
|
|
646
|
+
name: 'claimantValue',
|
|
462
647
|
mcnSince: null,
|
|
463
648
|
mcnNotes: null,
|
|
464
|
-
description:
|
|
649
|
+
description:
|
|
650
|
+
'The value to enter in the claimantColumn when the function claims a row',
|
|
465
651
|
},
|
|
466
652
|
{
|
|
467
|
-
name: '
|
|
653
|
+
name: 'additionalColumnNameN',
|
|
468
654
|
mcnSince: null,
|
|
469
655
|
mcnNotes: null,
|
|
470
656
|
description: 'Additional column name to populate',
|
|
@@ -472,7 +658,7 @@ export const FUNCTIONS = [
|
|
|
472
658
|
optional: true,
|
|
473
659
|
},
|
|
474
660
|
{
|
|
475
|
-
name: '
|
|
661
|
+
name: 'additionalColumnValueN',
|
|
476
662
|
mcnSince: null,
|
|
477
663
|
mcnNotes: null,
|
|
478
664
|
description: 'Additional column value to populate',
|
|
@@ -480,7 +666,10 @@ export const FUNCTIONS = [
|
|
|
480
666
|
},
|
|
481
667
|
],
|
|
482
668
|
returnType: 'row',
|
|
483
|
-
|
|
669
|
+
returnDescription: 'The claimed row, or an empty row when none could be claimed.',
|
|
670
|
+
repeat: [{ startIndex: 4, groupSize: 2, minGroups: 0 }],
|
|
671
|
+
syntax: 'ClaimRow(dataExt, claimColumn, claimantColumn, claimantValue[, additionalColumnNameN, additionalColumnValueN, ...])',
|
|
672
|
+
example: "%%[ SET @row = ClaimRow('Coupons', 'Claimed', 'SubKey', _subscriberkey) ]%%",
|
|
484
673
|
},
|
|
485
674
|
{
|
|
486
675
|
name: 'ClaimRowValue',
|
|
@@ -494,45 +683,54 @@ export const FUNCTIONS = [
|
|
|
494
683
|
description: 'Atomically claims a row and returns a specific column value from it.',
|
|
495
684
|
params: [
|
|
496
685
|
{
|
|
497
|
-
name: '
|
|
686
|
+
name: 'dataExt',
|
|
498
687
|
mcnSince: null,
|
|
499
688
|
mcnNotes: null,
|
|
500
|
-
description: '
|
|
689
|
+
description: 'The data extension that contains the value to return (hard-coded)',
|
|
690
|
+
type: 'string',
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
name: 'returnValueColumn',
|
|
694
|
+
description: 'The name of the column that contains the data to return',
|
|
501
695
|
type: 'string',
|
|
502
696
|
},
|
|
503
|
-
{ name: 'returnColumn', description: 'Column whose value to return', type: 'string' },
|
|
504
697
|
{
|
|
505
|
-
name: '
|
|
698
|
+
name: 'claimColumn',
|
|
506
699
|
mcnSince: null,
|
|
507
700
|
mcnNotes: null,
|
|
508
|
-
description: '
|
|
701
|
+
description: 'The column the function uses to track whether a row is claimed',
|
|
509
702
|
type: 'string',
|
|
510
703
|
},
|
|
511
704
|
{
|
|
512
|
-
name: '
|
|
705
|
+
name: 'valueIfClaimed',
|
|
513
706
|
mcnSince: null,
|
|
514
707
|
mcnNotes: null,
|
|
515
|
-
description: '
|
|
708
|
+
description: 'A fallback value returned if there are no unclaimed rows',
|
|
516
709
|
optional: true,
|
|
517
710
|
},
|
|
518
711
|
{
|
|
519
|
-
name: '
|
|
712
|
+
name: 'claimantColumnN',
|
|
520
713
|
mcnSince: null,
|
|
521
714
|
mcnNotes: null,
|
|
522
|
-
description:
|
|
715
|
+
description:
|
|
716
|
+
'The column the function uses to track the subscriber who claimed the row',
|
|
523
717
|
type: 'string',
|
|
524
718
|
optional: true,
|
|
525
719
|
},
|
|
526
720
|
{
|
|
527
|
-
name: '
|
|
721
|
+
name: 'claimantValueN',
|
|
528
722
|
mcnSince: null,
|
|
529
723
|
mcnNotes: null,
|
|
530
|
-
description:
|
|
724
|
+
description:
|
|
725
|
+
'The value to enter in the claimant column when the function claims a row',
|
|
531
726
|
optional: true,
|
|
532
727
|
},
|
|
533
728
|
],
|
|
534
729
|
returnType: 'string',
|
|
535
|
-
|
|
730
|
+
returnDescription: 'The value from the requested column of the claimed row.',
|
|
731
|
+
repeat: [{ startIndex: 4, groupSize: 2, minGroups: 0 }],
|
|
732
|
+
syntax: 'ClaimRowValue(dataExt, returnValueColumn, claimColumn[, valueIfClaimed, claimantColumnN, claimantValueN, ...])',
|
|
733
|
+
example: "%%=ClaimRowValue('Coupons', 'Code', 'Claimed', '', 'SubKey', _subscriberkey)=%%",
|
|
536
734
|
},
|
|
537
735
|
{
|
|
538
736
|
name: 'CloudPagesURL',
|
|
@@ -548,24 +746,35 @@ export const FUNCTIONS = [
|
|
|
548
746
|
params: [
|
|
549
747
|
{ name: 'pageId', description: 'CloudPages page ID (number or string)' },
|
|
550
748
|
{
|
|
551
|
-
name: '
|
|
552
|
-
mcnSince: null,
|
|
553
|
-
mcnNotes: null,
|
|
749
|
+
name: 'paramName1',
|
|
554
750
|
description: 'Query parameter name',
|
|
555
751
|
type: 'string',
|
|
556
752
|
optional: true,
|
|
557
753
|
},
|
|
558
754
|
{
|
|
559
|
-
name: '
|
|
560
|
-
mcnSince: null,
|
|
561
|
-
mcnNotes: null,
|
|
755
|
+
name: 'paramValue1',
|
|
562
756
|
description: 'Query parameter value',
|
|
563
757
|
type: 'string',
|
|
564
758
|
optional: true,
|
|
565
759
|
},
|
|
760
|
+
{
|
|
761
|
+
name: 'paramNameN',
|
|
762
|
+
description: 'Additional query parameter name',
|
|
763
|
+
type: 'string',
|
|
764
|
+
optional: true,
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
name: 'paramValueN',
|
|
768
|
+
description: 'Additional query parameter value',
|
|
769
|
+
type: 'string',
|
|
770
|
+
optional: true,
|
|
771
|
+
},
|
|
566
772
|
],
|
|
567
773
|
returnType: 'string',
|
|
568
|
-
|
|
774
|
+
returnDescription:
|
|
775
|
+
'A tracked URL to the referenced CloudPage, including any passed parameters.',
|
|
776
|
+
repeat: [{ startIndex: 1, groupSize: 2, minGroups: 0 }],
|
|
777
|
+
syntax: 'CloudPagesURL(pageId[, paramName1, paramValue1, paramNameN, paramValueN, ...])',
|
|
569
778
|
example: "%%=CloudPagesURL(123, 'key', 'value')=%%",
|
|
570
779
|
},
|
|
571
780
|
{
|
|
@@ -584,6 +793,8 @@ export const FUNCTIONS = [
|
|
|
584
793
|
{ name: 'stringN', description: 'Additional string', type: 'string', optional: true },
|
|
585
794
|
],
|
|
586
795
|
returnType: 'string',
|
|
796
|
+
returnDescription: 'The concatenation of all supplied values as a single string.',
|
|
797
|
+
repeat: [{ startIndex: 0, groupSize: 1, minGroups: 2 }],
|
|
587
798
|
syntax: 'Concat(string1, string2[, ...])',
|
|
588
799
|
example: "%%=Concat('Hello', ' ', 'World')=%%",
|
|
589
800
|
},
|
|
@@ -598,35 +809,57 @@ export const FUNCTIONS = [
|
|
|
598
809
|
category: 'Content',
|
|
599
810
|
description: 'Inserts a classic content area by its numeric ID.',
|
|
600
811
|
params: [
|
|
601
|
-
{ name: 'contentAreaId', description: 'Content area ID', type: 'number' },
|
|
602
812
|
{
|
|
603
|
-
name: '
|
|
813
|
+
name: 'contentAreaId',
|
|
604
814
|
mcnSince: null,
|
|
605
815
|
mcnNotes: null,
|
|
606
|
-
description: '
|
|
816
|
+
description: 'The ID of the content area to retrieve',
|
|
817
|
+
type: 'number|string',
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
name: 'impressionRegionName',
|
|
821
|
+
mcnSince: null,
|
|
822
|
+
mcnNotes: null,
|
|
823
|
+
description: 'The name of the impression region to associate with the content area',
|
|
607
824
|
type: 'string',
|
|
608
825
|
optional: true,
|
|
609
826
|
},
|
|
610
827
|
{
|
|
611
|
-
name: '
|
|
828
|
+
name: 'errorOnMissingContentArea',
|
|
612
829
|
mcnSince: null,
|
|
613
830
|
mcnNotes: null,
|
|
614
|
-
description:
|
|
615
|
-
|
|
831
|
+
description:
|
|
832
|
+
"Determines whether the function returns an error when the system can't locate the specified content area or returns an invalid content area. A value of true returns an error. Defaults to true.",
|
|
833
|
+
type: 'boolean',
|
|
616
834
|
optional: true,
|
|
835
|
+
default: true,
|
|
617
836
|
},
|
|
618
|
-
{ name: 'tag', description: 'Wrapping HTML tag', type: 'string', optional: true },
|
|
619
837
|
{
|
|
620
838
|
name: 'errorMessage',
|
|
621
839
|
mcnSince: null,
|
|
622
840
|
mcnNotes: null,
|
|
623
|
-
description: '
|
|
841
|
+
description: 'Default content to return if an error occurs',
|
|
624
842
|
type: 'string',
|
|
625
843
|
optional: true,
|
|
626
844
|
},
|
|
845
|
+
{
|
|
846
|
+
name: 'statusCode',
|
|
847
|
+
mcnSince: null,
|
|
848
|
+
mcnNotes: null,
|
|
849
|
+
description:
|
|
850
|
+
'An output variable that contains the exit code of the function. A value of 0 indicates the function found the content area and successfully rendered the content. A value of -1 indicates either no content or an invalid content area.',
|
|
851
|
+
type: 'number',
|
|
852
|
+
optional: true,
|
|
853
|
+
},
|
|
627
854
|
],
|
|
628
855
|
returnType: 'string',
|
|
629
|
-
|
|
856
|
+
returnDescription: 'The rendered HTML of the referenced content area.',
|
|
857
|
+
syntax: 'ContentArea(contentAreaId[, impressionRegionName, errorOnMissingContentArea, errorMessage, statusCode])',
|
|
858
|
+
example: '%%=ContentArea(12345)=%%',
|
|
859
|
+
deprecated: true,
|
|
860
|
+
deprecatedReplacement: 'ContentBlockById',
|
|
861
|
+
deprecatedReason:
|
|
862
|
+
'ContentArea references classic content areas, which are no longer supported. Use Content Builder content blocks instead.',
|
|
630
863
|
},
|
|
631
864
|
{
|
|
632
865
|
name: 'ContentAreaByName',
|
|
@@ -639,28 +872,55 @@ export const FUNCTIONS = [
|
|
|
639
872
|
category: 'Content',
|
|
640
873
|
description: 'Inserts a classic content area by its folder path and name.',
|
|
641
874
|
params: [
|
|
642
|
-
{ name: 'name', description: 'Content area folder path and name', type: 'string' },
|
|
643
875
|
{
|
|
644
|
-
name: '
|
|
876
|
+
name: 'contentAreaName',
|
|
877
|
+
description: 'The name of the content area to retrieve',
|
|
878
|
+
type: 'string',
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
name: 'impressionRegionName',
|
|
645
882
|
mcnSince: null,
|
|
646
883
|
mcnNotes: null,
|
|
647
|
-
description: '
|
|
884
|
+
description: 'The name of the impression region to associate with the content area',
|
|
648
885
|
type: 'string',
|
|
649
886
|
optional: true,
|
|
650
887
|
},
|
|
651
|
-
{
|
|
652
|
-
|
|
888
|
+
{
|
|
889
|
+
name: 'errorOnMissingContentArea',
|
|
890
|
+
mcnSince: null,
|
|
891
|
+
mcnNotes: null,
|
|
892
|
+
description:
|
|
893
|
+
"Determines whether the function returns an error when the system can't locate the specified content area or returns an invalid content area. A value of true returns an error. Defaults to true.",
|
|
894
|
+
type: 'boolean',
|
|
895
|
+
optional: true,
|
|
896
|
+
default: true,
|
|
897
|
+
},
|
|
653
898
|
{
|
|
654
899
|
name: 'errorMessage',
|
|
655
900
|
mcnSince: null,
|
|
656
901
|
mcnNotes: null,
|
|
657
|
-
description: '
|
|
902
|
+
description: 'Default content to return if an error occurs',
|
|
658
903
|
type: 'string',
|
|
659
904
|
optional: true,
|
|
660
905
|
},
|
|
906
|
+
{
|
|
907
|
+
name: 'statusCode',
|
|
908
|
+
mcnSince: null,
|
|
909
|
+
mcnNotes: null,
|
|
910
|
+
description:
|
|
911
|
+
'An output variable that contains the exit code of the function. A value of 0 indicates the function found the content area and successfully rendered the content. A value of -1 indicates either no content or an invalid content area.',
|
|
912
|
+
type: 'number',
|
|
913
|
+
optional: true,
|
|
914
|
+
},
|
|
661
915
|
],
|
|
662
916
|
returnType: 'string',
|
|
663
|
-
|
|
917
|
+
returnDescription: 'The rendered HTML of the named content area.',
|
|
918
|
+
syntax: 'ContentAreaByName(contentAreaName[, impressionRegionName, errorOnMissingContentArea, errorMessage, statusCode])',
|
|
919
|
+
example: String.raw`%%=ContentAreaByName('My Folder\My Content')=%%`,
|
|
920
|
+
deprecated: true,
|
|
921
|
+
deprecatedReplacement: 'ContentBlockByName',
|
|
922
|
+
deprecatedReason:
|
|
923
|
+
'ContentAreaByName references classic content areas, which are no longer supported. Use Content Builder content blocks instead.',
|
|
664
924
|
},
|
|
665
925
|
{
|
|
666
926
|
name: 'ContentBlockByID',
|
|
@@ -673,42 +933,52 @@ export const FUNCTIONS = [
|
|
|
673
933
|
category: 'Content',
|
|
674
934
|
description: 'Retrieves and renders a Content Builder content block by its numeric ID.',
|
|
675
935
|
params: [
|
|
676
|
-
{ name: 'id', description: 'Content block ID (number or string)' },
|
|
677
936
|
{
|
|
678
|
-
name: '
|
|
937
|
+
name: 'contentBlockId',
|
|
938
|
+
description: 'The ID of the content block to retrieve',
|
|
939
|
+
type: 'number|string',
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
name: 'impressionRegionName',
|
|
679
943
|
mcnSince: null,
|
|
680
944
|
mcnNotes: null,
|
|
681
|
-
description:
|
|
945
|
+
description:
|
|
946
|
+
'The name of the impression region to associate with the content block',
|
|
682
947
|
type: 'string',
|
|
683
948
|
optional: true,
|
|
684
949
|
},
|
|
685
950
|
{
|
|
686
|
-
name: '
|
|
951
|
+
name: 'errorOnMissingContentBlock',
|
|
687
952
|
mcnSince: null,
|
|
688
953
|
mcnNotes: null,
|
|
689
|
-
description:
|
|
954
|
+
description:
|
|
955
|
+
"If true, the function returns an error if the content block can't be found. If false, the function doesn't return an error. The default value is true",
|
|
690
956
|
type: 'boolean',
|
|
691
957
|
optional: true,
|
|
958
|
+
default: true,
|
|
692
959
|
},
|
|
693
960
|
{
|
|
694
|
-
name: '
|
|
961
|
+
name: 'errorMessage',
|
|
695
962
|
mcnSince: null,
|
|
696
963
|
mcnNotes: null,
|
|
697
|
-
description: '
|
|
964
|
+
description: 'Default content to return if an error occurs',
|
|
698
965
|
type: 'string',
|
|
699
966
|
optional: true,
|
|
700
967
|
},
|
|
701
968
|
{
|
|
702
|
-
name: '
|
|
969
|
+
name: 'statusCode',
|
|
703
970
|
mcnSince: null,
|
|
704
971
|
mcnNotes: null,
|
|
705
|
-
description:
|
|
706
|
-
|
|
972
|
+
description:
|
|
973
|
+
'The exit code of the function. A value of 0 indicates the function found the content block and successfully rendered the content. A value of -1 indicates either no content or an invalid content block.',
|
|
974
|
+
type: 'number',
|
|
707
975
|
optional: true,
|
|
708
976
|
},
|
|
709
977
|
],
|
|
710
978
|
returnType: 'string',
|
|
711
|
-
|
|
979
|
+
returnDescription: 'The rendered HTML of the content block identified by ID.',
|
|
980
|
+
syntax: 'ContentBlockByID(contentBlockId[, impressionRegionName, errorOnMissingContentBlock, errorMessage, statusCode])',
|
|
981
|
+
example: '%%=ContentBlockByID(12345)=%%',
|
|
712
982
|
},
|
|
713
983
|
{
|
|
714
984
|
name: 'ContentBlockByKey',
|
|
@@ -721,42 +991,52 @@ export const FUNCTIONS = [
|
|
|
721
991
|
category: 'Content',
|
|
722
992
|
description: 'Retrieves and renders a Content Builder content block by its customer key.',
|
|
723
993
|
params: [
|
|
724
|
-
{ name: 'customerKey', description: 'Content block customer key', type: 'string' },
|
|
725
994
|
{
|
|
726
|
-
name: '
|
|
995
|
+
name: 'contentBlockKey',
|
|
996
|
+
description: 'The key of the content block to retrieve',
|
|
997
|
+
type: 'string',
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
name: 'impressionRegionName',
|
|
727
1001
|
mcnSince: null,
|
|
728
1002
|
mcnNotes: null,
|
|
729
|
-
description:
|
|
1003
|
+
description:
|
|
1004
|
+
'The name of the impression region to associate with the content block',
|
|
730
1005
|
type: 'string',
|
|
731
1006
|
optional: true,
|
|
732
1007
|
},
|
|
733
1008
|
{
|
|
734
|
-
name: '
|
|
1009
|
+
name: 'errorOnMissingContentBlock',
|
|
735
1010
|
mcnSince: null,
|
|
736
1011
|
mcnNotes: null,
|
|
737
|
-
description:
|
|
1012
|
+
description:
|
|
1013
|
+
"If true, the function returns an error if the content block can't be found. If false, the function doesn't return an error. The default value is true",
|
|
738
1014
|
type: 'boolean',
|
|
739
1015
|
optional: true,
|
|
1016
|
+
default: true,
|
|
740
1017
|
},
|
|
741
1018
|
{
|
|
742
|
-
name: '
|
|
1019
|
+
name: 'errorMessage',
|
|
743
1020
|
mcnSince: null,
|
|
744
1021
|
mcnNotes: null,
|
|
745
|
-
description: '
|
|
1022
|
+
description: 'Default content to return if an error occurs',
|
|
746
1023
|
type: 'string',
|
|
747
1024
|
optional: true,
|
|
748
1025
|
},
|
|
749
1026
|
{
|
|
750
|
-
name: '
|
|
1027
|
+
name: 'statusCode',
|
|
751
1028
|
mcnSince: null,
|
|
752
1029
|
mcnNotes: null,
|
|
753
|
-
description:
|
|
754
|
-
|
|
1030
|
+
description:
|
|
1031
|
+
'The exit code of the function. A value of 0 indicates the function found the content block and successfully rendered the content. A value of -1 indicates either no content or an invalid content block.',
|
|
1032
|
+
type: 'number',
|
|
755
1033
|
optional: true,
|
|
756
1034
|
},
|
|
757
1035
|
],
|
|
758
1036
|
returnType: 'string',
|
|
759
|
-
|
|
1037
|
+
returnDescription: 'The rendered HTML of the content block identified by customer key.',
|
|
1038
|
+
syntax: 'ContentBlockByKey(contentBlockKey[, impressionRegionName, errorOnMissingContentBlock, errorMessage, statusCode])',
|
|
1039
|
+
example: "%%=ContentBlockByKey('welcome-header')=%%",
|
|
760
1040
|
},
|
|
761
1041
|
{
|
|
762
1042
|
name: 'ContentBlockByName',
|
|
@@ -770,42 +1050,52 @@ export const FUNCTIONS = [
|
|
|
770
1050
|
description:
|
|
771
1051
|
'Retrieves and renders a Content Builder content block by its folder path and name.',
|
|
772
1052
|
params: [
|
|
773
|
-
{ name: 'name', description: 'Content block folder path and name', type: 'string' },
|
|
774
1053
|
{
|
|
775
|
-
name: '
|
|
1054
|
+
name: 'contentBlockName',
|
|
1055
|
+
description: 'The full path of the content block to retrieve',
|
|
1056
|
+
type: 'string',
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
name: 'impressionRegionName',
|
|
776
1060
|
mcnSince: null,
|
|
777
1061
|
mcnNotes: null,
|
|
778
|
-
description:
|
|
1062
|
+
description:
|
|
1063
|
+
'The name of the impression region to associate with the content block',
|
|
779
1064
|
type: 'string',
|
|
780
1065
|
optional: true,
|
|
781
1066
|
},
|
|
782
1067
|
{
|
|
783
|
-
name: '
|
|
1068
|
+
name: 'errorOnMissingContentBlock',
|
|
784
1069
|
mcnSince: null,
|
|
785
1070
|
mcnNotes: null,
|
|
786
|
-
description:
|
|
1071
|
+
description:
|
|
1072
|
+
"If true, the function returns an error if the content block can't be found. If false, the function doesn't return an error. The default value is true",
|
|
787
1073
|
type: 'boolean',
|
|
788
1074
|
optional: true,
|
|
1075
|
+
default: true,
|
|
789
1076
|
},
|
|
790
1077
|
{
|
|
791
|
-
name: '
|
|
1078
|
+
name: 'errorMessage',
|
|
792
1079
|
mcnSince: null,
|
|
793
1080
|
mcnNotes: null,
|
|
794
|
-
description: '
|
|
1081
|
+
description: 'Default content to return if an error occurs',
|
|
795
1082
|
type: 'string',
|
|
796
1083
|
optional: true,
|
|
797
1084
|
},
|
|
798
1085
|
{
|
|
799
|
-
name: '
|
|
1086
|
+
name: 'statusCode',
|
|
800
1087
|
mcnSince: null,
|
|
801
1088
|
mcnNotes: null,
|
|
802
|
-
description:
|
|
803
|
-
|
|
1089
|
+
description:
|
|
1090
|
+
'The exit code of the function. A value of 0 indicates the function found the content block and successfully rendered the content. A value of -1 indicates either no content or an invalid content block.',
|
|
1091
|
+
type: 'number',
|
|
804
1092
|
optional: true,
|
|
805
1093
|
},
|
|
806
1094
|
],
|
|
807
1095
|
returnType: 'string',
|
|
808
|
-
|
|
1096
|
+
returnDescription: 'The rendered HTML of the content block identified by name or path.',
|
|
1097
|
+
syntax: 'ContentBlockByName(contentBlockName[, impressionRegionName, errorOnMissingContentBlock, errorMessage, statusCode])',
|
|
1098
|
+
example: String.raw`%%=ContentBlockByName('My Folder\Welcome Header')=%%`,
|
|
809
1099
|
},
|
|
810
1100
|
{
|
|
811
1101
|
name: 'ContentImageByID',
|
|
@@ -818,18 +1108,24 @@ export const FUNCTIONS = [
|
|
|
818
1108
|
category: 'Content',
|
|
819
1109
|
description: 'Returns the URL of a Content Builder image asset by its numeric ID.',
|
|
820
1110
|
params: [
|
|
821
|
-
{ name: 'id', description: 'Image asset ID', type: 'number' },
|
|
822
1111
|
{
|
|
823
|
-
name: '
|
|
1112
|
+
name: 'id',
|
|
1113
|
+
description: 'The ID of an image in Content Builder',
|
|
1114
|
+
type: 'number|string',
|
|
1115
|
+
},
|
|
1116
|
+
{
|
|
1117
|
+
name: 'defaultImageExternalId',
|
|
824
1118
|
mcnSince: null,
|
|
825
1119
|
mcnNotes: null,
|
|
826
|
-
description:
|
|
827
|
-
|
|
828
|
-
|
|
1120
|
+
description:
|
|
1121
|
+
"The ID of a fallback image in Content Builder. The function uses this image if it can't find the image that you specified in the first parameter",
|
|
1122
|
+
type: 'number|string',
|
|
829
1123
|
},
|
|
830
1124
|
],
|
|
831
1125
|
returnType: 'string',
|
|
832
|
-
|
|
1126
|
+
returnDescription: 'The URL of the image identified by ID.',
|
|
1127
|
+
syntax: 'ContentImageByID(id, defaultImageExternalId)',
|
|
1128
|
+
example: '%%=ContentImageByID(12345, 0)=%%',
|
|
833
1129
|
},
|
|
834
1130
|
{
|
|
835
1131
|
name: 'ContentImageByKey',
|
|
@@ -837,23 +1133,28 @@ export const FUNCTIONS = [
|
|
|
837
1133
|
mcnNotes: null,
|
|
838
1134
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-content/mc-ampscript-reference-content-image-by-key.html',
|
|
839
1135
|
guideUrl: 'https://ampscript.guide/contentimagebykey/',
|
|
840
|
-
minArgs:
|
|
1136
|
+
minArgs: 2,
|
|
841
1137
|
maxArgs: 2,
|
|
842
1138
|
category: 'Content',
|
|
843
1139
|
description: 'Returns the URL of a Content Builder image asset by its customer key.',
|
|
844
1140
|
params: [
|
|
845
|
-
{ name: 'customerKey', description: 'Image asset customer key', type: 'string' },
|
|
846
1141
|
{
|
|
847
|
-
name: '
|
|
1142
|
+
name: 'imageExternalKey',
|
|
1143
|
+
description: 'External key of the image asset',
|
|
1144
|
+
type: 'string',
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
name: 'defaultImageExternalKey',
|
|
848
1148
|
mcnSince: null,
|
|
849
1149
|
mcnNotes: null,
|
|
850
|
-
description: '
|
|
1150
|
+
description: 'External key of the fallback image asset',
|
|
851
1151
|
type: 'string',
|
|
852
|
-
optional: true,
|
|
853
1152
|
},
|
|
854
1153
|
],
|
|
855
1154
|
returnType: 'string',
|
|
856
|
-
|
|
1155
|
+
returnDescription: 'The URL of the image identified by customer key.',
|
|
1156
|
+
syntax: 'ContentImageByKey(imageExternalKey, defaultImageExternalKey)',
|
|
1157
|
+
example: "%%=ContentImageByKey('hero-image', '')=%%",
|
|
857
1158
|
},
|
|
858
1159
|
{
|
|
859
1160
|
name: 'CreateMSCRMRecord',
|
|
@@ -861,26 +1162,45 @@ export const FUNCTIONS = [
|
|
|
861
1162
|
mcnNotes: null,
|
|
862
1163
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-mscrm/mc-ampscript-reference-microsoft-dynamics-crm-create-record.html',
|
|
863
1164
|
guideUrl: 'https://ampscript.guide/createmscrmrecord/',
|
|
864
|
-
minArgs:
|
|
1165
|
+
minArgs: 4,
|
|
865
1166
|
maxArgs: INF,
|
|
866
1167
|
category: 'Microsoft Dynamics CRM',
|
|
867
1168
|
description: 'Creates a new record in Microsoft Dynamics CRM.',
|
|
868
1169
|
params: [
|
|
869
|
-
{ name: 'entityType', description: 'CRM entity type name', type: 'string' },
|
|
870
|
-
{ name: 'field1', description: 'First field name to set', type: 'string' },
|
|
871
|
-
{ name: 'value1', description: 'First field value' },
|
|
872
1170
|
{
|
|
873
|
-
name: '
|
|
1171
|
+
name: 'entityName',
|
|
1172
|
+
description: 'The name of the Microsoft Dynamics CRM entity',
|
|
1173
|
+
type: 'string',
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1176
|
+
name: 'numFields',
|
|
1177
|
+
description: 'The number of name and value pairs of fields to create',
|
|
1178
|
+
type: 'number',
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
name: 'attributeName1',
|
|
1182
|
+
description: 'The name of the first attribute to populate in the record',
|
|
1183
|
+
type: 'string',
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
name: 'attributeValue1',
|
|
1187
|
+
description: 'The value of the first attribute to populate in the record',
|
|
1188
|
+
},
|
|
1189
|
+
{
|
|
1190
|
+
name: 'attributeNameN',
|
|
874
1191
|
mcnSince: null,
|
|
875
1192
|
mcnNotes: null,
|
|
876
|
-
description: 'Additional
|
|
1193
|
+
description: 'Additional attribute name',
|
|
877
1194
|
type: 'string',
|
|
878
1195
|
optional: true,
|
|
879
1196
|
},
|
|
880
|
-
{ name: '
|
|
1197
|
+
{ name: 'attributeValueN', description: 'Additional attribute value', optional: true },
|
|
881
1198
|
],
|
|
882
1199
|
returnType: 'string',
|
|
883
|
-
|
|
1200
|
+
returnDescription: 'The GUID of the newly created Microsoft Dynamics CRM record.',
|
|
1201
|
+
repeat: [{ startIndex: 2, groupSize: 2, minGroups: 1, countParam: 'numFields' }],
|
|
1202
|
+
syntax: 'CreateMSCRMRecord(entityName, numFields, attributeName1, attributeValue1[, attributeNameN, attributeValueN, ...])',
|
|
1203
|
+
example: "%%=CreateMSCRMRecord('contact', 1, 'lastname', 'Smith')=%%",
|
|
884
1204
|
},
|
|
885
1205
|
{
|
|
886
1206
|
name: 'CreateObject',
|
|
@@ -893,9 +1213,12 @@ export const FUNCTIONS = [
|
|
|
893
1213
|
category: 'Marketing Cloud API',
|
|
894
1214
|
description:
|
|
895
1215
|
'Instantiates a Marketing Cloud SOAP API object for use with Invoke* functions.',
|
|
896
|
-
params: [
|
|
1216
|
+
params: [
|
|
1217
|
+
{ name: 'objectName', description: 'The name of the new API Object', type: 'string' },
|
|
1218
|
+
],
|
|
897
1219
|
returnType: 'object',
|
|
898
|
-
|
|
1220
|
+
returnDescription: 'A new API object instance for use with the Invoke* functions.',
|
|
1221
|
+
syntax: 'CreateObject(objectName)',
|
|
899
1222
|
example: "%%=CreateObject('DataExtensionObject')=%%",
|
|
900
1223
|
},
|
|
901
1224
|
{
|
|
@@ -909,22 +1232,38 @@ export const FUNCTIONS = [
|
|
|
909
1232
|
category: 'Sales and Service Cloud',
|
|
910
1233
|
description: 'Creates a new record in a connected Salesforce CRM object.',
|
|
911
1234
|
params: [
|
|
912
|
-
{ name: 'objectType', description: 'Salesforce object API name', type: 'string' },
|
|
913
|
-
{ name: 'fieldCount', description: 'Number of field-value pairs', type: 'number' },
|
|
914
|
-
{ name: 'field1', description: 'First field API name', type: 'string' },
|
|
915
|
-
{ name: 'value1', description: 'First field value' },
|
|
916
1235
|
{
|
|
917
|
-
name: '
|
|
1236
|
+
name: 'objectName',
|
|
1237
|
+
description: 'The API name of the Salesforce object to insert the record into',
|
|
1238
|
+
type: 'string',
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
name: 'numFields',
|
|
1242
|
+
description:
|
|
1243
|
+
'The number of fields to insert. Must match the number of name-value pairs specified',
|
|
1244
|
+
type: 'number',
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
name: 'fieldName1',
|
|
1248
|
+
description: 'The name of the field to insert in the object',
|
|
1249
|
+
type: 'string',
|
|
1250
|
+
},
|
|
1251
|
+
{ name: 'fieldValue1', description: 'The value to insert for the field' },
|
|
1252
|
+
{
|
|
1253
|
+
name: 'fieldNameN',
|
|
918
1254
|
mcnSince: null,
|
|
919
1255
|
mcnNotes: null,
|
|
920
|
-
description: 'Additional field
|
|
1256
|
+
description: 'Additional field name',
|
|
921
1257
|
type: 'string',
|
|
922
1258
|
optional: true,
|
|
923
1259
|
},
|
|
924
|
-
{ name: '
|
|
1260
|
+
{ name: 'fieldValueN', description: 'Additional field value', optional: true },
|
|
925
1261
|
],
|
|
926
1262
|
returnType: 'string',
|
|
927
|
-
|
|
1263
|
+
returnDescription: 'The ID of the newly created Salesforce object record.',
|
|
1264
|
+
repeat: [{ startIndex: 2, groupSize: 2, minGroups: 1, countParam: 'numFields' }],
|
|
1265
|
+
syntax: 'CreateSalesforceObject(objectName, numFields, fieldName1, fieldValue1[, fieldNameN, fieldValueN, ...])',
|
|
1266
|
+
example: "%%=CreateSalesforceObject('Contact', 1, 'LastName', 'Smith')=%%",
|
|
928
1267
|
},
|
|
929
1268
|
{
|
|
930
1269
|
name: 'CreateSmsConversation',
|
|
@@ -943,7 +1282,9 @@ export const FUNCTIONS = [
|
|
|
943
1282
|
{ name: 'messageText', description: 'Message to send', type: 'string' },
|
|
944
1283
|
],
|
|
945
1284
|
returnType: 'void',
|
|
1285
|
+
returnDescription: 'No value is returned; an SMS conversation is started.',
|
|
946
1286
|
syntax: 'CreateSmsConversation(shortCode, keyword, nextKeyword, messageText)',
|
|
1287
|
+
example: "CreateSmsConversation('12345', 'JOIN', 'CONFIRM', 'Reply CONFIRM to continue')",
|
|
947
1288
|
},
|
|
948
1289
|
{
|
|
949
1290
|
name: 'DataExtensionRowCount',
|
|
@@ -965,6 +1306,7 @@ export const FUNCTIONS = [
|
|
|
965
1306
|
},
|
|
966
1307
|
],
|
|
967
1308
|
returnType: 'number',
|
|
1309
|
+
returnDescription: 'The total number of rows in the data extension.',
|
|
968
1310
|
syntax: 'DataExtensionRowCount(dataExtensionName)',
|
|
969
1311
|
example: "%%=DataExtensionRowCount('MyDE')=%%",
|
|
970
1312
|
},
|
|
@@ -980,11 +1322,17 @@ export const FUNCTIONS = [
|
|
|
980
1322
|
description: 'Adds a specified interval to a date value.',
|
|
981
1323
|
params: [
|
|
982
1324
|
{ name: 'date', description: 'Base date', type: 'date' },
|
|
983
|
-
{ name: '
|
|
984
|
-
{
|
|
1325
|
+
{ name: 'amountToAdd', description: 'Number of intervals to add', type: 'number' },
|
|
1326
|
+
{
|
|
1327
|
+
name: 'unitToAdd',
|
|
1328
|
+
description:
|
|
1329
|
+
'The unit of the time value being added to the date. Accepted values: Y (years), M (months), D (days), H (hours), and MI (minutes)',
|
|
1330
|
+
type: 'string',
|
|
1331
|
+
},
|
|
985
1332
|
],
|
|
986
1333
|
returnType: 'date',
|
|
987
|
-
|
|
1334
|
+
returnDescription: 'The resulting date after the interval is added.',
|
|
1335
|
+
syntax: 'DateAdd(date, amountToAdd, unitToAdd)',
|
|
988
1336
|
example: "%%=DateAdd(Now(), 7, 'D')=%%",
|
|
989
1337
|
},
|
|
990
1338
|
{
|
|
@@ -998,12 +1346,28 @@ export const FUNCTIONS = [
|
|
|
998
1346
|
category: 'Date and Time',
|
|
999
1347
|
description: 'Returns the difference between two dates in the specified interval.',
|
|
1000
1348
|
params: [
|
|
1001
|
-
{
|
|
1002
|
-
|
|
1003
|
-
|
|
1349
|
+
{
|
|
1350
|
+
name: 'startDate',
|
|
1351
|
+
description: 'The starting date for the comparison',
|
|
1352
|
+
type: 'date',
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
name: 'endDate',
|
|
1356
|
+
description: 'The end date; the function subtracts startDate from endDate',
|
|
1357
|
+
type: 'date',
|
|
1358
|
+
},
|
|
1359
|
+
{
|
|
1360
|
+
name: 'unitOfDifference',
|
|
1361
|
+
description: 'Unit of time difference to return',
|
|
1362
|
+
type: 'string',
|
|
1363
|
+
enum: ['Y', 'M', 'D', 'H', 'MI'],
|
|
1364
|
+
},
|
|
1004
1365
|
],
|
|
1005
1366
|
returnType: 'number',
|
|
1006
|
-
|
|
1367
|
+
returnDescription:
|
|
1368
|
+
'The whole-number difference between the two dates in the requested unit.',
|
|
1369
|
+
syntax: 'DateDiff(startDate, endDate, unitOfDifference)',
|
|
1370
|
+
example: "%%=DateDiff(Now(), DateAdd(Now(), 1, 'D'), 'MI')=%%",
|
|
1007
1371
|
},
|
|
1008
1372
|
{
|
|
1009
1373
|
name: 'DateParse',
|
|
@@ -1016,18 +1380,26 @@ export const FUNCTIONS = [
|
|
|
1016
1380
|
category: 'Date and Time',
|
|
1017
1381
|
description: 'Parses a date string into a date value.',
|
|
1018
1382
|
params: [
|
|
1019
|
-
{ name: 'dateString', description: 'String to parse as a date', type: 'string' },
|
|
1020
1383
|
{
|
|
1021
|
-
name: '
|
|
1022
|
-
|
|
1384
|
+
name: 'dateString',
|
|
1385
|
+
description: 'A string that contains a date or timestamp',
|
|
1386
|
+
type: 'string',
|
|
1387
|
+
},
|
|
1388
|
+
{
|
|
1389
|
+
name: 'useUtc',
|
|
1390
|
+
mcnSince: null,
|
|
1023
1391
|
mcnNotes: null,
|
|
1024
|
-
description:
|
|
1392
|
+
description:
|
|
1393
|
+
'If true, return the date and time in UTC; if false, use the Business Unit local time',
|
|
1025
1394
|
type: 'boolean',
|
|
1026
1395
|
optional: true,
|
|
1396
|
+
default: false,
|
|
1027
1397
|
},
|
|
1028
1398
|
],
|
|
1029
1399
|
returnType: 'date',
|
|
1030
|
-
|
|
1400
|
+
returnDescription: 'The parsed date value.',
|
|
1401
|
+
syntax: 'DateParse(dateString[, useUtc])',
|
|
1402
|
+
example: "%%=DateParse('2026-01-15T08:30:00', 1)=%%",
|
|
1031
1403
|
},
|
|
1032
1404
|
{
|
|
1033
1405
|
name: 'DatePart',
|
|
@@ -1040,17 +1412,25 @@ export const FUNCTIONS = [
|
|
|
1040
1412
|
category: 'Date and Time',
|
|
1041
1413
|
description: 'Extracts a specific component from a date value.',
|
|
1042
1414
|
params: [
|
|
1043
|
-
{
|
|
1415
|
+
{
|
|
1416
|
+
name: 'dateString',
|
|
1417
|
+
description: 'A string that contains a date or timestamp',
|
|
1418
|
+
type: 'string',
|
|
1419
|
+
},
|
|
1044
1420
|
{
|
|
1045
1421
|
name: 'datePart',
|
|
1046
1422
|
mcnSince: null,
|
|
1047
1423
|
mcnNotes: null,
|
|
1048
|
-
description: '
|
|
1424
|
+
description: 'The date part to extract from the string',
|
|
1049
1425
|
type: 'string',
|
|
1426
|
+
enum: ['Y', 'M', 'D', 'H', 'MI'],
|
|
1050
1427
|
},
|
|
1051
1428
|
],
|
|
1052
1429
|
returnType: 'number',
|
|
1053
|
-
|
|
1430
|
+
returnDescription:
|
|
1431
|
+
'The requested component of the date as a number (month name is returned as text).',
|
|
1432
|
+
syntax: 'DatePart(dateString, datePart)',
|
|
1433
|
+
example: "%%=DatePart('2026-01-15', 'Y')=%%",
|
|
1054
1434
|
},
|
|
1055
1435
|
{
|
|
1056
1436
|
name: 'DecryptSymmetric',
|
|
@@ -1097,7 +1477,10 @@ export const FUNCTIONS = [
|
|
|
1097
1477
|
{ name: 'iv', description: 'IV value or empty to use external key', type: 'string' },
|
|
1098
1478
|
],
|
|
1099
1479
|
returnType: 'string',
|
|
1480
|
+
returnDescription: 'The decrypted plain-text value.',
|
|
1100
1481
|
syntax: 'DecryptSymmetric(encryptedValue, algorithm, passwordExternalKey, password, saltExternalKey, salt, ivExternalKey, iv)',
|
|
1482
|
+
example:
|
|
1483
|
+
"%%=DecryptSymmetric(@encrypted, 'aes', 'pwKey', '', 'saltKey', '', 'ivKey', '')=%%",
|
|
1101
1484
|
},
|
|
1102
1485
|
{
|
|
1103
1486
|
name: 'DeleteData',
|
|
@@ -1111,21 +1494,36 @@ export const FUNCTIONS = [
|
|
|
1111
1494
|
description:
|
|
1112
1495
|
'Deletes rows from a data extension matching the specified key column criteria.',
|
|
1113
1496
|
params: [
|
|
1114
|
-
{ name: 'dataExtensionName', description: 'Target data extension', type: 'string' },
|
|
1115
|
-
{ name: 'column1', description: 'First filter column name', type: 'string' },
|
|
1116
|
-
{ name: 'value1', description: 'First filter column value' },
|
|
1117
1497
|
{
|
|
1118
|
-
name: '
|
|
1498
|
+
name: 'dataExt',
|
|
1499
|
+
description:
|
|
1500
|
+
'The name of the data extension that contains the data you want to delete',
|
|
1501
|
+
type: 'string',
|
|
1502
|
+
},
|
|
1503
|
+
{
|
|
1504
|
+
name: 'columnName1',
|
|
1505
|
+
description: 'The name of the column to search for the data you want to delete',
|
|
1506
|
+
type: 'string',
|
|
1507
|
+
},
|
|
1508
|
+
{
|
|
1509
|
+
name: 'valueToDelete1',
|
|
1510
|
+
description: 'The value that determines which row to delete',
|
|
1511
|
+
},
|
|
1512
|
+
{
|
|
1513
|
+
name: 'columnNameN',
|
|
1119
1514
|
mcnSince: null,
|
|
1120
1515
|
mcnNotes: null,
|
|
1121
1516
|
description: 'Additional filter column name',
|
|
1122
1517
|
type: 'string',
|
|
1123
1518
|
optional: true,
|
|
1124
1519
|
},
|
|
1125
|
-
{ name: '
|
|
1520
|
+
{ name: 'valueToDeleteN', description: 'Additional filter value', optional: true },
|
|
1126
1521
|
],
|
|
1127
1522
|
returnType: 'number',
|
|
1128
|
-
|
|
1523
|
+
returnDescription: 'The number of rows deleted.',
|
|
1524
|
+
repeat: [{ startIndex: 1, groupSize: 2, minGroups: 1 }],
|
|
1525
|
+
syntax: 'DeleteData(dataExt, columnName1, valueToDelete1[, columnNameN, valueToDeleteN, ...])',
|
|
1526
|
+
example: "%%=DeleteData('Subscribers', 'SubscriberKey', _subscriberkey)=%%",
|
|
1129
1527
|
},
|
|
1130
1528
|
{
|
|
1131
1529
|
name: 'DeleteDE',
|
|
@@ -1136,23 +1534,38 @@ export const FUNCTIONS = [
|
|
|
1136
1534
|
minArgs: 3,
|
|
1137
1535
|
maxArgs: INF,
|
|
1138
1536
|
category: 'Data Extension',
|
|
1139
|
-
description: '
|
|
1537
|
+
description: 'Deletes rows from a data extension. Email-context variant of DeleteData.',
|
|
1140
1538
|
params: [
|
|
1141
|
-
{ name: 'dataExtensionName', description: 'Target data extension', type: 'string' },
|
|
1142
|
-
{ name: 'column1', description: 'First filter column name', type: 'string' },
|
|
1143
|
-
{ name: 'value1', description: 'First filter column value' },
|
|
1144
1539
|
{
|
|
1145
|
-
name: '
|
|
1540
|
+
name: 'dataExt',
|
|
1541
|
+
description:
|
|
1542
|
+
'The name of the data extension that contains the data you want to delete',
|
|
1543
|
+
type: 'string',
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
name: 'columnName1',
|
|
1547
|
+
description: 'The name of the column to search for the data you want to delete',
|
|
1548
|
+
type: 'string',
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
name: 'valueToDelete1',
|
|
1552
|
+
description: 'The value that determines which row to delete',
|
|
1553
|
+
},
|
|
1554
|
+
{
|
|
1555
|
+
name: 'columnNameN',
|
|
1146
1556
|
mcnSince: null,
|
|
1147
1557
|
mcnNotes: null,
|
|
1148
1558
|
description: 'Additional filter column name',
|
|
1149
1559
|
type: 'string',
|
|
1150
1560
|
optional: true,
|
|
1151
1561
|
},
|
|
1152
|
-
{ name: '
|
|
1562
|
+
{ name: 'valueToDeleteN', description: 'Additional filter value', optional: true },
|
|
1153
1563
|
],
|
|
1154
1564
|
returnType: 'number',
|
|
1155
|
-
|
|
1565
|
+
returnDescription: 'The number of rows deleted.',
|
|
1566
|
+
repeat: [{ startIndex: 1, groupSize: 2, minGroups: 1 }],
|
|
1567
|
+
syntax: 'DeleteDE(dataExt, columnName1, valueToDelete1[, columnNameN, valueToDeleteN, ...])',
|
|
1568
|
+
example: "%%=DeleteDE('Subscribers', 'SubscriberKey', _subscriberkey)=%%",
|
|
1156
1569
|
},
|
|
1157
1570
|
{
|
|
1158
1571
|
name: 'DescribeMSCRMEntities',
|
|
@@ -1166,7 +1579,9 @@ export const FUNCTIONS = [
|
|
|
1166
1579
|
description: 'Returns a rowset describing all available Dynamics CRM entity types.',
|
|
1167
1580
|
params: [],
|
|
1168
1581
|
returnType: 'rowset',
|
|
1582
|
+
returnDescription: 'A rowset describing the available Microsoft Dynamics CRM entities.',
|
|
1169
1583
|
syntax: 'DescribeMSCRMEntities()',
|
|
1584
|
+
example: '%%[ SET @entities = DescribeMSCRMEntities() ]%%',
|
|
1170
1585
|
},
|
|
1171
1586
|
{
|
|
1172
1587
|
name: 'DescribeMSCRMEntityAttributes',
|
|
@@ -1180,7 +1595,9 @@ export const FUNCTIONS = [
|
|
|
1180
1595
|
description: 'Returns a rowset of attributes for the specified CRM entity type.',
|
|
1181
1596
|
params: [{ name: 'entityType', description: 'CRM entity type name', type: 'string' }],
|
|
1182
1597
|
returnType: 'rowset',
|
|
1598
|
+
returnDescription: 'A rowset describing the attributes of the requested CRM entity.',
|
|
1183
1599
|
syntax: 'DescribeMSCRMEntityAttributes(entityType)',
|
|
1600
|
+
example: "%%[ SET @attrs = DescribeMSCRMEntityAttributes('contact') ]%%",
|
|
1184
1601
|
},
|
|
1185
1602
|
{
|
|
1186
1603
|
name: 'Divide',
|
|
@@ -1197,6 +1614,7 @@ export const FUNCTIONS = [
|
|
|
1197
1614
|
{ name: 'divisor', description: 'Number to divide by', type: 'number' },
|
|
1198
1615
|
],
|
|
1199
1616
|
returnType: 'number',
|
|
1617
|
+
returnDescription: 'The quotient of the two operands.',
|
|
1200
1618
|
syntax: 'Divide(dividend, divisor)',
|
|
1201
1619
|
example: '%%=Divide(100, 4)=%%',
|
|
1202
1620
|
},
|
|
@@ -1212,6 +1630,7 @@ export const FUNCTIONS = [
|
|
|
1212
1630
|
description: 'Extracts the domain portion from an email address.',
|
|
1213
1631
|
params: [{ name: 'emailAddress', description: 'Email address', type: 'string' }],
|
|
1214
1632
|
returnType: 'string',
|
|
1633
|
+
returnDescription: 'The domain portion of the supplied email address.',
|
|
1215
1634
|
syntax: 'Domain(emailAddress)',
|
|
1216
1635
|
example: "%%=Domain('user@example.com')=%%",
|
|
1217
1636
|
},
|
|
@@ -1227,6 +1646,8 @@ export const FUNCTIONS = [
|
|
|
1227
1646
|
description: 'Returns true if the value is empty, null, or not defined.',
|
|
1228
1647
|
params: [{ name: 'value', description: 'Value to test' }],
|
|
1229
1648
|
returnType: 'boolean',
|
|
1649
|
+
returnDescription: 'True when the value is empty or null, otherwise false.',
|
|
1650
|
+
returnEnum: [true, false],
|
|
1230
1651
|
syntax: 'Empty(value)',
|
|
1231
1652
|
example: '%%=Empty(@myVar)=%%',
|
|
1232
1653
|
},
|
|
@@ -1275,7 +1696,9 @@ export const FUNCTIONS = [
|
|
|
1275
1696
|
{ name: 'iv', description: 'IV value or empty to use external key', type: 'string' },
|
|
1276
1697
|
],
|
|
1277
1698
|
returnType: 'string',
|
|
1699
|
+
returnDescription: 'The encrypted value.',
|
|
1278
1700
|
syntax: 'EncryptSymmetric(value, algorithm, passwordExternalKey, password, saltExternalKey, salt, ivExternalKey, iv)',
|
|
1701
|
+
example: "%%=EncryptSymmetric('secret', 'aes', 'pwKey', '', 'saltKey', '', 'ivKey', '')=%%",
|
|
1279
1702
|
},
|
|
1280
1703
|
{
|
|
1281
1704
|
name: 'EndImpressionRegion',
|
|
@@ -1289,16 +1712,18 @@ export const FUNCTIONS = [
|
|
|
1289
1712
|
description: 'Marks the end of an impression tracking region.',
|
|
1290
1713
|
params: [
|
|
1291
1714
|
{
|
|
1292
|
-
name: '
|
|
1715
|
+
name: 'endAllRegions',
|
|
1293
1716
|
mcnSince: null,
|
|
1294
1717
|
mcnNotes: null,
|
|
1295
|
-
description: 'Whether to
|
|
1718
|
+
description: 'Whether to end all open impression regions',
|
|
1296
1719
|
type: 'boolean',
|
|
1297
1720
|
optional: true,
|
|
1298
1721
|
},
|
|
1299
1722
|
],
|
|
1300
1723
|
returnType: 'void',
|
|
1301
|
-
|
|
1724
|
+
returnDescription: 'No value is returned; it marks the end of an impression region.',
|
|
1725
|
+
syntax: 'EndImpressionRegion([endAllRegions])',
|
|
1726
|
+
example: 'EndImpressionRegion(0)',
|
|
1302
1727
|
},
|
|
1303
1728
|
{
|
|
1304
1729
|
name: 'EndSmsConversation',
|
|
@@ -1315,7 +1740,9 @@ export const FUNCTIONS = [
|
|
|
1315
1740
|
{ name: 'keyword', description: 'Conversation keyword to end', type: 'string' },
|
|
1316
1741
|
],
|
|
1317
1742
|
returnType: 'void',
|
|
1743
|
+
returnDescription: 'No value is returned; the SMS conversation is ended.',
|
|
1318
1744
|
syntax: 'EndSmsConversation(shortCode, keyword)',
|
|
1745
|
+
example: "EndSmsConversation('12345', 'JOIN')",
|
|
1319
1746
|
},
|
|
1320
1747
|
{
|
|
1321
1748
|
name: 'ExecuteFilter',
|
|
@@ -1327,9 +1754,18 @@ export const FUNCTIONS = [
|
|
|
1327
1754
|
maxArgs: 1,
|
|
1328
1755
|
category: 'Data Extension',
|
|
1329
1756
|
description: 'Executes a predefined data filter and returns the resulting rowset.',
|
|
1330
|
-
params: [
|
|
1757
|
+
params: [
|
|
1758
|
+
{
|
|
1759
|
+
name: 'dataFilterExternalId',
|
|
1760
|
+
description:
|
|
1761
|
+
'The external ID of the data filter to execute. This function only works with data filters that are based on data extensions',
|
|
1762
|
+
type: 'string',
|
|
1763
|
+
},
|
|
1764
|
+
],
|
|
1331
1765
|
returnType: 'rowset',
|
|
1332
|
-
|
|
1766
|
+
returnDescription: 'A rowset containing the rows that match the data filter.',
|
|
1767
|
+
syntax: 'ExecuteFilter(dataFilterExternalId)',
|
|
1768
|
+
example: "%%[ SET @rows = ExecuteFilter('FilterExternalKey') ]%%",
|
|
1333
1769
|
},
|
|
1334
1770
|
{
|
|
1335
1771
|
name: 'ExecuteFilterOrderedRows',
|
|
@@ -1342,12 +1778,30 @@ export const FUNCTIONS = [
|
|
|
1342
1778
|
category: 'Data Extension',
|
|
1343
1779
|
description: 'Executes a predefined data filter and returns results sorted by a column.',
|
|
1344
1780
|
params: [
|
|
1345
|
-
{
|
|
1346
|
-
|
|
1347
|
-
|
|
1781
|
+
{
|
|
1782
|
+
name: 'dataFilterExternalId',
|
|
1783
|
+
description:
|
|
1784
|
+
'The external ID of the data filter to execute. This function only works with data filters that are based on data extensions',
|
|
1785
|
+
type: 'string',
|
|
1786
|
+
},
|
|
1787
|
+
{
|
|
1788
|
+
name: 'numRows',
|
|
1789
|
+
description:
|
|
1790
|
+
'The number of rows to return in the rowset. A value of 0 returns all results. There is no maximum number of rows that can be returned',
|
|
1791
|
+
type: 'number',
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
name: 'sortColumn',
|
|
1795
|
+
description:
|
|
1796
|
+
'The column to sort data by, followed by a space and either "ASC" (for ascending order) or "DESC" (descending)',
|
|
1797
|
+
type: 'string',
|
|
1798
|
+
},
|
|
1348
1799
|
],
|
|
1349
1800
|
returnType: 'rowset',
|
|
1350
|
-
|
|
1801
|
+
returnDescription: 'A sorted, row-limited rowset of rows that match the data filter.',
|
|
1802
|
+
syntax: 'ExecuteFilterOrderedRows(dataFilterExternalId, numRows, sortColumn)',
|
|
1803
|
+
example:
|
|
1804
|
+
"%%[ SET @rows = ExecuteFilterOrderedRows('FilterExternalKey', 10, 'LastName ASC') ]%%",
|
|
1351
1805
|
},
|
|
1352
1806
|
{
|
|
1353
1807
|
name: 'Field',
|
|
@@ -1360,19 +1814,22 @@ export const FUNCTIONS = [
|
|
|
1360
1814
|
category: 'Data Extension',
|
|
1361
1815
|
description: 'Retrieves the value of a specific field from a rowset row.',
|
|
1362
1816
|
params: [
|
|
1363
|
-
{ name: 'row', description: 'Row object from a rowset' },
|
|
1817
|
+
{ name: 'row', description: 'Row object from a rowset', type: 'row' },
|
|
1364
1818
|
{ name: 'fieldName', description: 'Column name to retrieve', type: 'string' },
|
|
1365
1819
|
{
|
|
1366
|
-
name: '
|
|
1820
|
+
name: 'exceptionIfNotFound',
|
|
1367
1821
|
mcnSince: null,
|
|
1368
1822
|
mcnNotes: null,
|
|
1369
|
-
description:
|
|
1370
|
-
|
|
1823
|
+
description:
|
|
1824
|
+
"If true, the function returns an exception if the specified field doesn't exist. If false, the function returns an empty string if the field doesn't exist. The default value is true.",
|
|
1825
|
+
type: 'boolean',
|
|
1371
1826
|
optional: true,
|
|
1827
|
+
default: true,
|
|
1372
1828
|
},
|
|
1373
1829
|
],
|
|
1374
1830
|
returnType: 'string',
|
|
1375
|
-
|
|
1831
|
+
returnDescription: 'The value of the named field from the supplied row.',
|
|
1832
|
+
syntax: 'Field(row, fieldName[, exceptionIfNotFound])',
|
|
1376
1833
|
example: "%%=Field(Row(@rows, 1), 'Name')=%%",
|
|
1377
1834
|
},
|
|
1378
1835
|
{
|
|
@@ -1399,7 +1856,9 @@ export const FUNCTIONS = [
|
|
|
1399
1856
|
{ name: 'timeZone', description: 'Target time zone', type: 'string', optional: true },
|
|
1400
1857
|
],
|
|
1401
1858
|
returnType: 'string',
|
|
1859
|
+
returnDescription: 'The formatted string representation of the value.',
|
|
1402
1860
|
syntax: 'Format(value, formatString[, culture, timeZone])',
|
|
1861
|
+
example: "%%=Format('2026-01-15', 'dd.MM.yyyy')=%%",
|
|
1403
1862
|
},
|
|
1404
1863
|
{
|
|
1405
1864
|
name: 'FormatCurrency',
|
|
@@ -1418,9 +1877,11 @@ export const FUNCTIONS = [
|
|
|
1418
1877
|
name: 'decimalPlaces',
|
|
1419
1878
|
mcnSince: null,
|
|
1420
1879
|
mcnNotes: null,
|
|
1421
|
-
description:
|
|
1880
|
+
description:
|
|
1881
|
+
'Number of decimal places; defaults to 2 when omitted (locale-dependent rounding may apply)',
|
|
1422
1882
|
type: 'number',
|
|
1423
1883
|
optional: true,
|
|
1884
|
+
default: 2,
|
|
1424
1885
|
},
|
|
1425
1886
|
{
|
|
1426
1887
|
name: 'symbol',
|
|
@@ -1432,7 +1893,9 @@ export const FUNCTIONS = [
|
|
|
1432
1893
|
},
|
|
1433
1894
|
],
|
|
1434
1895
|
returnType: 'string',
|
|
1896
|
+
returnDescription: 'The value formatted as a localized currency string.',
|
|
1435
1897
|
syntax: 'FormatCurrency(value, locale[, decimalPlaces, symbol])',
|
|
1898
|
+
example: "%%=FormatCurrency(1234.5, 'en-US', 2, '$')=%%",
|
|
1436
1899
|
},
|
|
1437
1900
|
{
|
|
1438
1901
|
name: 'FormatDate',
|
|
@@ -1441,25 +1904,42 @@ export const FUNCTIONS = [
|
|
|
1441
1904
|
'In MCN, uses Java SimpleDateFormat format strings instead of .NET. Omitting dateFormat returns the G standard format (e.g. "5/15/2026 1:23:45 PM").',
|
|
1442
1905
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-date-time/mc-ampscript-reference-date-time-format-date.html',
|
|
1443
1906
|
guideUrl: 'https://ampscript.guide/formatdate/',
|
|
1444
|
-
minArgs:
|
|
1907
|
+
minArgs: 1,
|
|
1445
1908
|
maxArgs: 4,
|
|
1446
1909
|
category: 'Date and Time',
|
|
1447
|
-
description:
|
|
1910
|
+
description:
|
|
1911
|
+
'Formats a date string according to the specified date and time format patterns.',
|
|
1448
1912
|
params: [
|
|
1449
|
-
{ name: 'date', description: 'Date to format', type: 'date' },
|
|
1450
1913
|
{
|
|
1451
|
-
name: '
|
|
1914
|
+
name: 'dateString',
|
|
1915
|
+
description: 'The date string that you want to format',
|
|
1916
|
+
type: 'string',
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
name: 'dateFormat',
|
|
1452
1920
|
mcnSince: 67,
|
|
1453
1921
|
mcnNotes: null,
|
|
1454
|
-
description: '
|
|
1922
|
+
description: 'A string that represents the format to apply to the date',
|
|
1455
1923
|
type: 'string',
|
|
1924
|
+
optional: true,
|
|
1925
|
+
},
|
|
1926
|
+
{
|
|
1927
|
+
name: 'timeFormat',
|
|
1928
|
+
description: 'A string that represents the format to apply to the time',
|
|
1929
|
+
type: 'string',
|
|
1930
|
+
optional: true,
|
|
1931
|
+
},
|
|
1932
|
+
{
|
|
1933
|
+
name: 'localeCode',
|
|
1934
|
+
description: 'The locale code to use when formatting the date',
|
|
1935
|
+
type: 'string',
|
|
1936
|
+
optional: true,
|
|
1456
1937
|
},
|
|
1457
|
-
{ name: 'locale', description: 'Locale code', type: 'string', optional: true },
|
|
1458
|
-
{ name: 'timeZone', description: 'Target time zone', type: 'string', optional: true },
|
|
1459
1938
|
],
|
|
1460
1939
|
returnType: 'string',
|
|
1461
|
-
|
|
1462
|
-
|
|
1940
|
+
returnDescription: 'The date formatted according to the supplied format and locale.',
|
|
1941
|
+
syntax: 'FormatDate(dateString[, dateFormat, timeFormat, localeCode])',
|
|
1942
|
+
example: '%%=FormatDate(Now(), "dddd, MMMM d yyyy", "HH:mm:ss")=%%',
|
|
1463
1943
|
},
|
|
1464
1944
|
{
|
|
1465
1945
|
name: 'FormatNumber',
|
|
@@ -1477,7 +1957,9 @@ export const FUNCTIONS = [
|
|
|
1477
1957
|
{ name: 'locale', description: 'Locale code', type: 'string', optional: true },
|
|
1478
1958
|
],
|
|
1479
1959
|
returnType: 'string',
|
|
1960
|
+
returnDescription: 'The number formatted according to the supplied format string.',
|
|
1480
1961
|
syntax: 'FormatNumber(number, format[, locale])',
|
|
1962
|
+
example: "%%=FormatNumber(1234.567, 'N2', 'en-US')=%%",
|
|
1481
1963
|
},
|
|
1482
1964
|
{
|
|
1483
1965
|
name: 'GetJWT',
|
|
@@ -1490,12 +1972,24 @@ export const FUNCTIONS = [
|
|
|
1490
1972
|
category: 'Encryption and Encoding',
|
|
1491
1973
|
description: 'Generates a JSON Web Token using the supplied claims, algorithm, and secret.',
|
|
1492
1974
|
params: [
|
|
1493
|
-
{ name: 'claimsSet', description: 'JSON claims payload', type: 'string' },
|
|
1494
|
-
{ name: 'algorithm', description: 'Signing algorithm (e.g. HS256)', type: 'string' },
|
|
1495
1975
|
{ name: 'secret', description: 'Secret key for signing', type: 'string' },
|
|
1976
|
+
{
|
|
1977
|
+
name: 'algorithm',
|
|
1978
|
+
description: 'Hashing algorithm',
|
|
1979
|
+
type: 'string',
|
|
1980
|
+
enum: ['HS256', 'HS384', 'HS512'],
|
|
1981
|
+
},
|
|
1982
|
+
{
|
|
1983
|
+
name: 'jsonPayload',
|
|
1984
|
+
description:
|
|
1985
|
+
"The payload of the JWT. Typically, the payload is a JSON object with name-value pairs. The JWT payload isn't encrypted.",
|
|
1986
|
+
type: 'string',
|
|
1987
|
+
},
|
|
1496
1988
|
],
|
|
1497
1989
|
returnType: 'string',
|
|
1498
|
-
|
|
1990
|
+
returnDescription: 'A signed JSON Web Token string.',
|
|
1991
|
+
syntax: 'GetJWT(secret, algorithm, jsonPayload)',
|
|
1992
|
+
example: "%%=GetJWT(@secret, 'HS256', @payload)=%%",
|
|
1499
1993
|
},
|
|
1500
1994
|
{
|
|
1501
1995
|
name: 'GetJWTByKeyName',
|
|
@@ -1508,12 +2002,24 @@ export const FUNCTIONS = [
|
|
|
1508
2002
|
category: 'Encryption and Encoding',
|
|
1509
2003
|
description: 'Generates a JSON Web Token using a named encryption key from Key Management.',
|
|
1510
2004
|
params: [
|
|
1511
|
-
{ name: 'claimsSet', description: 'JSON claims payload', type: 'string' },
|
|
1512
|
-
{ name: 'algorithm', description: 'Signing algorithm', type: 'string' },
|
|
1513
2005
|
{ name: 'keyName', description: 'Key Management key external key', type: 'string' },
|
|
2006
|
+
{
|
|
2007
|
+
name: 'algorithm',
|
|
2008
|
+
description: 'Signing algorithm',
|
|
2009
|
+
type: 'string',
|
|
2010
|
+
enum: ['HS256', 'HS384', 'HS512', 'RS256', 'RS384', 'RS512'],
|
|
2011
|
+
},
|
|
2012
|
+
{
|
|
2013
|
+
name: 'jsonPayload',
|
|
2014
|
+
description:
|
|
2015
|
+
"The payload of the JWT. Typically, the payload is a JSON object with name-value pairs. The JWT payload isn't encrypted.",
|
|
2016
|
+
type: 'string',
|
|
2017
|
+
},
|
|
1514
2018
|
],
|
|
1515
2019
|
returnType: 'string',
|
|
1516
|
-
|
|
2020
|
+
returnDescription: 'A signed JSON Web Token string created with the named key.',
|
|
2021
|
+
syntax: 'GetJWTByKeyName(keyName, algorithm, jsonPayload)',
|
|
2022
|
+
example: "%%=GetJWTByKeyName('MyKeyName', 'HS256', @payload)=%%",
|
|
1517
2023
|
},
|
|
1518
2024
|
{
|
|
1519
2025
|
name: 'GetPortfolioItem',
|
|
@@ -1525,9 +2031,17 @@ export const FUNCTIONS = [
|
|
|
1525
2031
|
maxArgs: 1,
|
|
1526
2032
|
category: 'Content',
|
|
1527
2033
|
description: 'Retrieves metadata for a classic portfolio item.',
|
|
1528
|
-
params: [
|
|
2034
|
+
params: [
|
|
2035
|
+
{
|
|
2036
|
+
name: 'itemExternalKey',
|
|
2037
|
+
description: 'External key of the portfolio item',
|
|
2038
|
+
type: 'string',
|
|
2039
|
+
},
|
|
2040
|
+
],
|
|
1529
2041
|
returnType: 'string',
|
|
1530
|
-
|
|
2042
|
+
returnDescription: 'The content of the requested Portfolio item.',
|
|
2043
|
+
syntax: 'GetPortfolioItem(itemExternalKey)',
|
|
2044
|
+
example: "%%=GetPortfolioItem('my-portfolio-key')=%%",
|
|
1531
2045
|
},
|
|
1532
2046
|
{
|
|
1533
2047
|
name: 'GetPublishedSocialContent',
|
|
@@ -1541,7 +2055,9 @@ export const FUNCTIONS = [
|
|
|
1541
2055
|
description: 'Retrieves published social media content by its identifier.',
|
|
1542
2056
|
params: [{ name: 'socialContentId', description: 'Social content ID', type: 'string' }],
|
|
1543
2057
|
returnType: 'string',
|
|
2058
|
+
returnDescription: 'The published social content for the supplied identifier.',
|
|
1544
2059
|
syntax: 'GetPublishedSocialContent(socialContentId)',
|
|
2060
|
+
example: "%%=GetPublishedSocialContent('socialContentId')=%%",
|
|
1545
2061
|
},
|
|
1546
2062
|
{
|
|
1547
2063
|
name: 'GetSendTime',
|
|
@@ -1565,7 +2081,9 @@ export const FUNCTIONS = [
|
|
|
1565
2081
|
},
|
|
1566
2082
|
],
|
|
1567
2083
|
returnType: 'date',
|
|
2084
|
+
returnDescription: 'The send time of the message as a date value.',
|
|
1568
2085
|
syntax: 'GetSendTime([persistFormat])',
|
|
2086
|
+
example: '%%=GetSendTime(1)=%%',
|
|
1569
2087
|
},
|
|
1570
2088
|
{
|
|
1571
2089
|
name: 'GetSocialPublishURL',
|
|
@@ -1576,13 +2094,49 @@ export const FUNCTIONS = [
|
|
|
1576
2094
|
minArgs: 2,
|
|
1577
2095
|
maxArgs: INF,
|
|
1578
2096
|
category: 'Social',
|
|
1579
|
-
description:
|
|
2097
|
+
description:
|
|
2098
|
+
'Returns HTML for sharing a content region on a supported social network via Social Forward. Optionally accepts repeating key/value parameter pairs.',
|
|
1580
2099
|
params: [
|
|
1581
|
-
{
|
|
1582
|
-
|
|
2100
|
+
{
|
|
2101
|
+
name: 'socialNetworkCode',
|
|
2102
|
+
description: 'The number code of the social network to share to',
|
|
2103
|
+
type: 'string',
|
|
2104
|
+
},
|
|
2105
|
+
{
|
|
2106
|
+
name: 'contentRegion',
|
|
2107
|
+
description: 'The name of the content region to share on the social network',
|
|
2108
|
+
type: 'string',
|
|
2109
|
+
},
|
|
2110
|
+
{
|
|
2111
|
+
name: 'socialNetworkParamKey1',
|
|
2112
|
+
description: 'The key of a parameter to pass to the target social network',
|
|
2113
|
+
type: 'string',
|
|
2114
|
+
optional: true,
|
|
2115
|
+
},
|
|
2116
|
+
{
|
|
2117
|
+
name: 'socialNetworkParamValue1',
|
|
2118
|
+
description: 'The value of a parameter to pass to the target social network',
|
|
2119
|
+
type: 'string',
|
|
2120
|
+
optional: true,
|
|
2121
|
+
},
|
|
2122
|
+
{
|
|
2123
|
+
name: 'socialNetworkParamKeyN',
|
|
2124
|
+
description: 'Additional parameter key',
|
|
2125
|
+
type: 'string',
|
|
2126
|
+
optional: true,
|
|
2127
|
+
},
|
|
2128
|
+
{
|
|
2129
|
+
name: 'socialNetworkParamValueN',
|
|
2130
|
+
description: 'Additional parameter value',
|
|
2131
|
+
type: 'string',
|
|
2132
|
+
optional: true,
|
|
2133
|
+
},
|
|
1583
2134
|
],
|
|
1584
2135
|
returnType: 'string',
|
|
1585
|
-
|
|
2136
|
+
returnDescription: 'HTML that publishes the social-forward content for the region.',
|
|
2137
|
+
repeat: [{ startIndex: 2, groupSize: 2, minGroups: 0 }],
|
|
2138
|
+
syntax: 'GetSocialPublishURL(socialNetworkCode, contentRegion[, socialNetworkParamKey1, socialNetworkParamValue1, ...])',
|
|
2139
|
+
example: "%%=GetSocialPublishURL('1', 'Shared content region 1')=%%",
|
|
1586
2140
|
},
|
|
1587
2141
|
{
|
|
1588
2142
|
name: 'GetSocialPublishURLByName',
|
|
@@ -1590,16 +2144,53 @@ export const FUNCTIONS = [
|
|
|
1590
2144
|
mcnNotes: null,
|
|
1591
2145
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-social/mc-ampscript-reference-social-get-social-publish-url-by-name.html',
|
|
1592
2146
|
guideUrl: 'https://ampscript.guide/getsocialpublishurlbyname/',
|
|
1593
|
-
minArgs:
|
|
2147
|
+
minArgs: 3,
|
|
1594
2148
|
maxArgs: INF,
|
|
1595
2149
|
category: 'Social',
|
|
1596
|
-
description:
|
|
2150
|
+
description:
|
|
2151
|
+
'Returns HTML for sharing a content region on a supported social network (identified by name) via Social Forward. Optionally accepts repeating key/value parameter pairs.',
|
|
1597
2152
|
params: [
|
|
1598
|
-
{
|
|
1599
|
-
|
|
2153
|
+
{
|
|
2154
|
+
name: 'socialNetworkName',
|
|
2155
|
+
description: 'The name of the social network to share to',
|
|
2156
|
+
type: 'string',
|
|
2157
|
+
},
|
|
2158
|
+
{ name: 'countryCode', description: 'An ISO country code', type: 'string' },
|
|
2159
|
+
{
|
|
2160
|
+
name: 'contentRegion',
|
|
2161
|
+
description: 'The name of the content region to share on the social network',
|
|
2162
|
+
type: 'string',
|
|
2163
|
+
},
|
|
2164
|
+
{
|
|
2165
|
+
name: 'socialNetworkParamKey1',
|
|
2166
|
+
description: 'The key of a parameter to pass to the target social network',
|
|
2167
|
+
type: 'string',
|
|
2168
|
+
optional: true,
|
|
2169
|
+
},
|
|
2170
|
+
{
|
|
2171
|
+
name: 'socialNetworkParamValue1',
|
|
2172
|
+
description: 'The value of a parameter to pass to the target social network',
|
|
2173
|
+
type: 'string',
|
|
2174
|
+
optional: true,
|
|
2175
|
+
},
|
|
2176
|
+
{
|
|
2177
|
+
name: 'socialNetworkParamKeyN',
|
|
2178
|
+
description: 'Additional parameter key',
|
|
2179
|
+
type: 'string',
|
|
2180
|
+
optional: true,
|
|
2181
|
+
},
|
|
2182
|
+
{
|
|
2183
|
+
name: 'socialNetworkParamValueN',
|
|
2184
|
+
description: 'Additional parameter value',
|
|
2185
|
+
type: 'string',
|
|
2186
|
+
optional: true,
|
|
2187
|
+
},
|
|
1600
2188
|
],
|
|
1601
2189
|
returnType: 'string',
|
|
1602
|
-
|
|
2190
|
+
returnDescription: 'HTML that publishes the social-forward content for the named region.',
|
|
2191
|
+
repeat: [{ startIndex: 3, groupSize: 2, minGroups: 0 }],
|
|
2192
|
+
syntax: 'GetSocialPublishURLByName(socialNetworkName, countryCode, contentRegion[, socialNetworkParamKey1, socialNetworkParamValue1, ...])',
|
|
2193
|
+
example: "%%=GetSocialPublishURLByName('Facebook', 'US', 'Shared content region 1')=%%",
|
|
1603
2194
|
},
|
|
1604
2195
|
{
|
|
1605
2196
|
name: 'GUID',
|
|
@@ -1613,6 +2204,7 @@ export const FUNCTIONS = [
|
|
|
1613
2204
|
description: 'Generates a new globally unique identifier (GUID).',
|
|
1614
2205
|
params: [],
|
|
1615
2206
|
returnType: 'string',
|
|
2207
|
+
returnDescription: 'A newly generated globally unique identifier.',
|
|
1616
2208
|
syntax: 'GUID()',
|
|
1617
2209
|
example: '%%=GUID()=%%',
|
|
1618
2210
|
},
|
|
@@ -1627,12 +2219,16 @@ export const FUNCTIONS = [
|
|
|
1627
2219
|
category: 'HTTP',
|
|
1628
2220
|
description: 'Performs an HTTP GET request and returns the response body.',
|
|
1629
2221
|
params: [
|
|
1630
|
-
{
|
|
2222
|
+
{
|
|
2223
|
+
name: 'httpGetUrl',
|
|
2224
|
+
description: 'The URL to perform the HTTP GET operation on',
|
|
2225
|
+
type: 'string',
|
|
2226
|
+
},
|
|
1631
2227
|
{
|
|
1632
2228
|
name: 'continueOnError',
|
|
1633
2229
|
mcnSince: null,
|
|
1634
2230
|
mcnNotes: null,
|
|
1635
|
-
description: '
|
|
2231
|
+
description: 'If true, ignore errors encountered during the GET operation',
|
|
1636
2232
|
type: 'boolean',
|
|
1637
2233
|
optional: true,
|
|
1638
2234
|
},
|
|
@@ -1654,7 +2250,8 @@ export const FUNCTIONS = [
|
|
|
1654
2250
|
},
|
|
1655
2251
|
],
|
|
1656
2252
|
returnType: 'string',
|
|
1657
|
-
|
|
2253
|
+
returnDescription: 'The body of the HTTP response as a string.',
|
|
2254
|
+
syntax: 'HTTPGet(httpGetUrl[, continueOnError, headerName, headerValue])',
|
|
1658
2255
|
example: "%%=HTTPGet('https://example.com/api')=%%",
|
|
1659
2256
|
},
|
|
1660
2257
|
{
|
|
@@ -1669,36 +2266,60 @@ export const FUNCTIONS = [
|
|
|
1669
2266
|
description:
|
|
1670
2267
|
'Performs an HTTP POST request. The response body is stored in the output variable.',
|
|
1671
2268
|
params: [
|
|
1672
|
-
{
|
|
1673
|
-
|
|
1674
|
-
|
|
2269
|
+
{
|
|
2270
|
+
name: 'urlEndpoint',
|
|
2271
|
+
description: 'The URL to post the specified content to',
|
|
2272
|
+
type: 'string',
|
|
2273
|
+
},
|
|
2274
|
+
{
|
|
2275
|
+
name: 'contentTypeHeader',
|
|
2276
|
+
description: 'The content-type header to use in the POST request',
|
|
2277
|
+
type: 'string',
|
|
2278
|
+
},
|
|
2279
|
+
{
|
|
2280
|
+
name: 'contentToPost',
|
|
2281
|
+
description: 'The content to send to the specified URL in the POST request',
|
|
2282
|
+
type: 'string',
|
|
2283
|
+
},
|
|
1675
2284
|
{
|
|
1676
2285
|
name: 'response',
|
|
1677
2286
|
mcnSince: null,
|
|
1678
2287
|
mcnNotes: null,
|
|
1679
|
-
description: 'Output variable
|
|
2288
|
+
description: 'Output variable that contains the status of the POST request',
|
|
1680
2289
|
type: 'string',
|
|
1681
2290
|
optional: true,
|
|
1682
2291
|
},
|
|
1683
2292
|
{
|
|
1684
|
-
name: '
|
|
1685
|
-
|
|
1686
|
-
mcnNotes: null,
|
|
1687
|
-
description: 'Request header name',
|
|
2293
|
+
name: 'headerName1',
|
|
2294
|
+
description: 'The name of an additional header to include in the request',
|
|
1688
2295
|
type: 'string',
|
|
1689
2296
|
optional: true,
|
|
1690
2297
|
},
|
|
1691
2298
|
{
|
|
1692
|
-
name: '
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
2299
|
+
name: 'headerValue1',
|
|
2300
|
+
description: 'The value of an additional header to include in the request',
|
|
2301
|
+
type: 'string',
|
|
2302
|
+
optional: true,
|
|
2303
|
+
},
|
|
2304
|
+
{
|
|
2305
|
+
name: 'headerNameN',
|
|
2306
|
+
description: 'The name of a further additional header',
|
|
2307
|
+
type: 'string',
|
|
2308
|
+
optional: true,
|
|
2309
|
+
},
|
|
2310
|
+
{
|
|
2311
|
+
name: 'headerValueN',
|
|
2312
|
+
description: 'The value of a further additional header',
|
|
1696
2313
|
type: 'string',
|
|
1697
2314
|
optional: true,
|
|
1698
2315
|
},
|
|
1699
2316
|
],
|
|
1700
2317
|
returnType: 'number',
|
|
1701
|
-
|
|
2318
|
+
returnDescription: 'The HTTP status code of the POST request.',
|
|
2319
|
+
repeat: [{ startIndex: 4, groupSize: 2, minGroups: 0 }],
|
|
2320
|
+
syntax: 'HTTPPost(urlEndpoint, contentTypeHeader, contentToPost[, @response, headerName1, headerValue1, headerNameN, headerValueN, ...])',
|
|
2321
|
+
example:
|
|
2322
|
+
"%%=HTTPPost('https://example.com/api', 'application/json', @payload, @response)=%%",
|
|
1702
2323
|
},
|
|
1703
2324
|
{
|
|
1704
2325
|
name: 'HTTPPost2',
|
|
@@ -1706,28 +2327,67 @@ export const FUNCTIONS = [
|
|
|
1706
2327
|
mcnNotes: null,
|
|
1707
2328
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-http/mc-ampscript-reference-http-post2.html',
|
|
1708
2329
|
guideUrl: 'https://ampscript.guide/httppost2/',
|
|
1709
|
-
minArgs:
|
|
2330
|
+
minArgs: 3,
|
|
1710
2331
|
maxArgs: INF,
|
|
1711
2332
|
category: 'HTTP',
|
|
1712
2333
|
description:
|
|
1713
|
-
'Performs an HTTP POST with access to response headers. Response body and headers stored in output variables.',
|
|
2334
|
+
'Performs an HTTP POST with access to response headers. Response body and headers are stored in output variables.',
|
|
1714
2335
|
params: [
|
|
1715
2336
|
{ name: 'url', description: 'Request URL', type: 'string' },
|
|
1716
2337
|
{ name: 'contentType', description: 'Content-Type header', type: 'string' },
|
|
1717
|
-
{ name: '
|
|
1718
|
-
{
|
|
2338
|
+
{ name: 'contentToPost', description: 'Request body', type: 'string' },
|
|
2339
|
+
{
|
|
2340
|
+
name: 'exceptionOnError',
|
|
2341
|
+
description:
|
|
2342
|
+
'If `true`, raise an exception when the request fails; if `false`, continue after an error',
|
|
2343
|
+
type: 'boolean',
|
|
2344
|
+
optional: true,
|
|
2345
|
+
},
|
|
2346
|
+
{
|
|
2347
|
+
name: 'response',
|
|
2348
|
+
description: 'Output variable for the response body',
|
|
2349
|
+
type: 'string',
|
|
2350
|
+
optional: true,
|
|
2351
|
+
},
|
|
1719
2352
|
{
|
|
1720
|
-
name: '
|
|
2353
|
+
name: 'responseRowSet',
|
|
1721
2354
|
mcnSince: null,
|
|
1722
2355
|
mcnNotes: null,
|
|
1723
|
-
description: 'Output variable for response headers',
|
|
2356
|
+
description: 'Output variable for the response headers, returned as a rowset',
|
|
2357
|
+
type: 'string',
|
|
2358
|
+
optional: true,
|
|
2359
|
+
},
|
|
2360
|
+
{
|
|
2361
|
+
name: 'headerName1',
|
|
2362
|
+
description: 'First request header name',
|
|
2363
|
+
type: 'string',
|
|
2364
|
+
optional: true,
|
|
2365
|
+
},
|
|
2366
|
+
{
|
|
2367
|
+
name: 'headerValue1',
|
|
2368
|
+
description: 'First request header value',
|
|
2369
|
+
type: 'string',
|
|
2370
|
+
optional: true,
|
|
2371
|
+
},
|
|
2372
|
+
{
|
|
2373
|
+
name: 'headerNameN',
|
|
2374
|
+
description: 'Additional request header name',
|
|
2375
|
+
type: 'string',
|
|
2376
|
+
optional: true,
|
|
2377
|
+
},
|
|
2378
|
+
{
|
|
2379
|
+
name: 'headerValueN',
|
|
2380
|
+
description: 'Additional request header value',
|
|
1724
2381
|
type: 'string',
|
|
2382
|
+
optional: true,
|
|
1725
2383
|
},
|
|
1726
|
-
{ name: 'headerName1', description: 'First request header name', type: 'string' },
|
|
1727
|
-
{ name: 'headerValue1', description: 'First request header value', type: 'string' },
|
|
1728
2384
|
],
|
|
1729
2385
|
returnType: 'number',
|
|
1730
|
-
|
|
2386
|
+
returnDescription: 'The HTTP status code of the POST request.',
|
|
2387
|
+
repeat: [{ startIndex: 6, groupSize: 2, minGroups: 0 }],
|
|
2388
|
+
syntax: 'HTTPPost2(url, contentType, contentToPost[, exceptionOnError, @response, @responseRowSet, headerName1, headerValue1, headerNameN, headerValueN, ...])',
|
|
2389
|
+
example:
|
|
2390
|
+
"%%=HTTPPost2('https://example.com/api', 'application/json', @payload, true, @response, @responseRows)=%%",
|
|
1731
2391
|
},
|
|
1732
2392
|
{
|
|
1733
2393
|
name: 'HTTPPostWithRetry',
|
|
@@ -1735,33 +2395,87 @@ export const FUNCTIONS = [
|
|
|
1735
2395
|
mcnNotes: null,
|
|
1736
2396
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-http/mc-ampscript-reference-http-post-with-retry.html',
|
|
1737
2397
|
guideUrl: 'https://ampscript.guide/httppostwithretry/',
|
|
1738
|
-
minArgs:
|
|
2398
|
+
minArgs: 3,
|
|
1739
2399
|
maxArgs: INF,
|
|
1740
2400
|
category: 'HTTP',
|
|
1741
|
-
description:
|
|
2401
|
+
description:
|
|
2402
|
+
'Posts content to the specified URL with automatic retry logic on failure. Similar to HTTPPost2 but adds configurable retries and rescheduling.',
|
|
1742
2403
|
params: [
|
|
1743
|
-
{ name: '
|
|
1744
|
-
{ name: 'contentType', description: 'Content-Type header', type: 'string' },
|
|
1745
|
-
{ name: 'payload', description: 'Request body', type: 'string' },
|
|
1746
|
-
{ name: 'response', description: 'Output variable for response body', type: 'string' },
|
|
2404
|
+
{ name: 'urlEndpoint', description: 'The URL to send the content to', type: 'string' },
|
|
1747
2405
|
{
|
|
1748
|
-
name: '
|
|
1749
|
-
|
|
1750
|
-
mcnNotes: null,
|
|
1751
|
-
description: 'Output variable for response headers',
|
|
2406
|
+
name: 'contentTypeHeader',
|
|
2407
|
+
description: 'The content-type header to use in the POST request',
|
|
1752
2408
|
type: 'string',
|
|
1753
2409
|
},
|
|
1754
|
-
{ name: 'maxRetries', description: 'Maximum number of retry attempts', type: 'number' },
|
|
1755
2410
|
{
|
|
1756
|
-
name: '
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
2411
|
+
name: 'content',
|
|
2412
|
+
description: 'The content to send to the specified URL in the POST request',
|
|
2413
|
+
type: 'string',
|
|
2414
|
+
},
|
|
2415
|
+
{
|
|
2416
|
+
name: 'numRetries',
|
|
2417
|
+
description: 'The number of times the request can be retried',
|
|
1760
2418
|
type: 'number',
|
|
2419
|
+
optional: true,
|
|
2420
|
+
default: 3,
|
|
2421
|
+
},
|
|
2422
|
+
{
|
|
2423
|
+
name: 'reschedule',
|
|
2424
|
+
description:
|
|
2425
|
+
'Whether the request is rescheduled (retried after 15 minutes) if it still fails after all retries',
|
|
2426
|
+
type: 'boolean',
|
|
2427
|
+
optional: true,
|
|
2428
|
+
default: false,
|
|
2429
|
+
},
|
|
2430
|
+
{
|
|
2431
|
+
name: 'returnExceptionOnError',
|
|
2432
|
+
description:
|
|
2433
|
+
'If true, raise an exception on error; if false, continue after an error',
|
|
2434
|
+
type: 'boolean',
|
|
2435
|
+
optional: true,
|
|
2436
|
+
},
|
|
2437
|
+
{
|
|
2438
|
+
name: 'responseStatus',
|
|
2439
|
+
description: 'An AMPscript variable that stores the status of the POST request',
|
|
2440
|
+
type: 'string',
|
|
2441
|
+
optional: true,
|
|
2442
|
+
},
|
|
2443
|
+
{
|
|
2444
|
+
name: 'responseContentRowset',
|
|
2445
|
+
description: 'An AMPscript variable that stores the response content as a rowset',
|
|
2446
|
+
type: 'rowset',
|
|
2447
|
+
optional: true,
|
|
2448
|
+
},
|
|
2449
|
+
{
|
|
2450
|
+
name: 'headerName1',
|
|
2451
|
+
description: 'The name of an additional header to include in the request',
|
|
2452
|
+
type: 'string',
|
|
2453
|
+
optional: true,
|
|
2454
|
+
},
|
|
2455
|
+
{
|
|
2456
|
+
name: 'headerValue1',
|
|
2457
|
+
description: 'The value of an additional header to include in the request',
|
|
2458
|
+
type: 'string',
|
|
2459
|
+
optional: true,
|
|
2460
|
+
},
|
|
2461
|
+
{
|
|
2462
|
+
name: 'headerNameN',
|
|
2463
|
+
description: 'The name of a further additional header',
|
|
2464
|
+
type: 'string',
|
|
2465
|
+
optional: true,
|
|
2466
|
+
},
|
|
2467
|
+
{
|
|
2468
|
+
name: 'headerValueN',
|
|
2469
|
+
description: 'The value of a further additional header',
|
|
2470
|
+
type: 'string',
|
|
2471
|
+
optional: true,
|
|
1761
2472
|
},
|
|
1762
2473
|
],
|
|
1763
2474
|
returnType: 'number',
|
|
1764
|
-
|
|
2475
|
+
returnDescription: 'The HTTP status code of the POST request.',
|
|
2476
|
+
repeat: [{ startIndex: 8, groupSize: 2, minGroups: 0 }],
|
|
2477
|
+
syntax: 'HTTPPostWithRetry(urlEndpoint, contentTypeHeader, content[, numRetries, reschedule, returnExceptionOnError, @responseStatus, @responseContentRowset, headerName1, headerValue1, headerNameN, headerValueN, ...])',
|
|
2478
|
+
example: "%%=HTTPPostWithRetry('https://example.com/api', 'application/json', @payload)=%%",
|
|
1765
2479
|
},
|
|
1766
2480
|
{
|
|
1767
2481
|
name: 'HTTPRequestHeader',
|
|
@@ -1774,9 +2488,16 @@ export const FUNCTIONS = [
|
|
|
1774
2488
|
category: 'HTTP',
|
|
1775
2489
|
description:
|
|
1776
2490
|
'Returns the value of a specified HTTP request header from the inbound request.',
|
|
1777
|
-
params: [
|
|
2491
|
+
params: [
|
|
2492
|
+
{
|
|
2493
|
+
name: 'headerToRetrieve',
|
|
2494
|
+
description: 'The header that you want to retrieve',
|
|
2495
|
+
type: 'string',
|
|
2496
|
+
},
|
|
2497
|
+
],
|
|
1778
2498
|
returnType: 'string',
|
|
1779
|
-
|
|
2499
|
+
returnDescription: 'The value of the named HTTP request header.',
|
|
2500
|
+
syntax: 'HTTPRequestHeader(headerToRetrieve)',
|
|
1780
2501
|
example: "%%=HTTPRequestHeader('X-Forwarded-For')=%%",
|
|
1781
2502
|
},
|
|
1782
2503
|
{
|
|
@@ -1795,6 +2516,8 @@ export const FUNCTIONS = [
|
|
|
1795
2516
|
{ name: 'falseValue', description: 'Value returned when false' },
|
|
1796
2517
|
],
|
|
1797
2518
|
returnType: 'string',
|
|
2519
|
+
returnDescription:
|
|
2520
|
+
'The second argument when the condition is true, otherwise the third argument.',
|
|
1798
2521
|
syntax: 'IIf(expression, trueValue, falseValue)',
|
|
1799
2522
|
example: "%%=IIf(Empty(@name), 'Friend', @name)=%%",
|
|
1800
2523
|
},
|
|
@@ -1804,30 +2527,32 @@ export const FUNCTIONS = [
|
|
|
1804
2527
|
mcnNotes: null,
|
|
1805
2528
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-content/mc-ampscript-reference-content-image.html',
|
|
1806
2529
|
guideUrl: 'https://ampscript.guide/image/',
|
|
1807
|
-
minArgs:
|
|
2530
|
+
minArgs: 1,
|
|
1808
2531
|
maxArgs: 2,
|
|
1809
2532
|
category: 'Content',
|
|
1810
2533
|
description:
|
|
1811
|
-
'Returns an HTML img tag for the Portfolio image matching the specified
|
|
2534
|
+
'Returns an HTML img tag for the Portfolio image matching the specified external key.',
|
|
1812
2535
|
params: [
|
|
1813
2536
|
{
|
|
1814
|
-
name: '
|
|
2537
|
+
name: 'imageExternalKey',
|
|
1815
2538
|
mcnSince: null,
|
|
1816
2539
|
mcnNotes: null,
|
|
1817
|
-
description: '
|
|
2540
|
+
description: 'External key of an image in your Portfolio',
|
|
1818
2541
|
type: 'string',
|
|
1819
2542
|
},
|
|
1820
2543
|
{
|
|
1821
|
-
name: '
|
|
2544
|
+
name: 'defaultImageExternalKey',
|
|
1822
2545
|
mcnSince: null,
|
|
1823
2546
|
mcnNotes: null,
|
|
1824
|
-
description:
|
|
1825
|
-
'Customer/external key of the fallback image if the primary is not found',
|
|
2547
|
+
description: 'External key of a fallback image used if the primary is not found',
|
|
1826
2548
|
type: 'string',
|
|
2549
|
+
optional: true,
|
|
1827
2550
|
},
|
|
1828
2551
|
],
|
|
1829
2552
|
returnType: 'string',
|
|
1830
|
-
|
|
2553
|
+
returnDescription: 'An HTML img tag for the referenced image.',
|
|
2554
|
+
syntax: 'Image(imageExternalKey[, defaultImageExternalKey])',
|
|
2555
|
+
example: "%%=Image('CorpLogo', 'DefaultImage')=%%",
|
|
1831
2556
|
},
|
|
1832
2557
|
{
|
|
1833
2558
|
name: 'IndexOf',
|
|
@@ -1840,11 +2565,12 @@ export const FUNCTIONS = [
|
|
|
1840
2565
|
category: 'String',
|
|
1841
2566
|
description: 'Returns the 1-based position of the first occurrence of a substring.',
|
|
1842
2567
|
params: [
|
|
1843
|
-
{ name: '
|
|
2568
|
+
{ name: 'sourceString', description: 'String to search in', type: 'string' },
|
|
1844
2569
|
{ name: 'substring', description: 'Substring to find', type: 'string' },
|
|
1845
2570
|
],
|
|
1846
2571
|
returnType: 'number',
|
|
1847
|
-
|
|
2572
|
+
returnDescription: 'The 1-based position of the substring, or 0 when it is not found.',
|
|
2573
|
+
syntax: 'IndexOf(sourceString, substring)',
|
|
1848
2574
|
example: "%%=IndexOf('Hello World', 'World')=%%",
|
|
1849
2575
|
},
|
|
1850
2576
|
{
|
|
@@ -1858,21 +2584,35 @@ export const FUNCTIONS = [
|
|
|
1858
2584
|
category: 'Data Extension',
|
|
1859
2585
|
description: 'Inserts a new row into a data extension.',
|
|
1860
2586
|
params: [
|
|
1861
|
-
{ name: 'dataExtensionName', description: 'Target data extension', type: 'string' },
|
|
1862
|
-
{ name: 'column1', description: 'First column name', type: 'string' },
|
|
1863
|
-
{ name: 'value1', description: 'First column value' },
|
|
1864
2587
|
{
|
|
1865
|
-
name: '
|
|
2588
|
+
name: 'dataExt',
|
|
2589
|
+
description: 'The name of the data extension to insert data into',
|
|
2590
|
+
type: 'string',
|
|
2591
|
+
},
|
|
2592
|
+
{
|
|
2593
|
+
name: 'columnName1',
|
|
2594
|
+
description: 'The name of the column to insert into the data extension',
|
|
2595
|
+
type: 'string',
|
|
2596
|
+
},
|
|
2597
|
+
{
|
|
2598
|
+
name: 'valueToInsert1',
|
|
2599
|
+
description: 'The value to insert into the specified column',
|
|
2600
|
+
},
|
|
2601
|
+
{
|
|
2602
|
+
name: 'columnNameN',
|
|
1866
2603
|
mcnSince: null,
|
|
1867
2604
|
mcnNotes: null,
|
|
1868
2605
|
description: 'Additional column name',
|
|
1869
2606
|
type: 'string',
|
|
1870
2607
|
optional: true,
|
|
1871
2608
|
},
|
|
1872
|
-
{ name: '
|
|
2609
|
+
{ name: 'valueToInsertN', description: 'Additional column value', optional: true },
|
|
1873
2610
|
],
|
|
1874
2611
|
returnType: 'number',
|
|
1875
|
-
|
|
2612
|
+
returnDescription: 'The number of rows inserted.',
|
|
2613
|
+
repeat: [{ startIndex: 1, groupSize: 2, minGroups: 1 }],
|
|
2614
|
+
syntax: 'InsertData(dataExt, columnName1, valueToInsert1[, columnNameN, valueToInsertN, ...])',
|
|
2615
|
+
example: "%%=InsertData('Log', 'SubscriberKey', _subscriberkey, 'Status', 'Sent')=%%",
|
|
1876
2616
|
},
|
|
1877
2617
|
{
|
|
1878
2618
|
name: 'InsertDE',
|
|
@@ -1883,23 +2623,38 @@ export const FUNCTIONS = [
|
|
|
1883
2623
|
minArgs: 3,
|
|
1884
2624
|
maxArgs: INF,
|
|
1885
2625
|
category: 'Data Extension',
|
|
1886
|
-
description:
|
|
2626
|
+
description:
|
|
2627
|
+
'Inserts a new row into a data extension. Email-context variant of InsertData.',
|
|
1887
2628
|
params: [
|
|
1888
|
-
{ name: 'dataExtensionName', description: 'Target data extension', type: 'string' },
|
|
1889
|
-
{ name: 'column1', description: 'First column name', type: 'string' },
|
|
1890
|
-
{ name: 'value1', description: 'First column value' },
|
|
1891
2629
|
{
|
|
1892
|
-
name: '
|
|
2630
|
+
name: 'dataExt',
|
|
2631
|
+
description: 'The name of the data extension to insert data into',
|
|
2632
|
+
type: 'string',
|
|
2633
|
+
},
|
|
2634
|
+
{
|
|
2635
|
+
name: 'columnName1',
|
|
2636
|
+
description: 'The name of the column to insert into the data extension',
|
|
2637
|
+
type: 'string',
|
|
2638
|
+
},
|
|
2639
|
+
{
|
|
2640
|
+
name: 'valueToInsert1',
|
|
2641
|
+
description: 'The value to insert into the specified column',
|
|
2642
|
+
},
|
|
2643
|
+
{
|
|
2644
|
+
name: 'columnNameN',
|
|
1893
2645
|
mcnSince: null,
|
|
1894
2646
|
mcnNotes: null,
|
|
1895
2647
|
description: 'Additional column name',
|
|
1896
2648
|
type: 'string',
|
|
1897
2649
|
optional: true,
|
|
1898
2650
|
},
|
|
1899
|
-
{ name: '
|
|
2651
|
+
{ name: 'valueToInsertN', description: 'Additional column value', optional: true },
|
|
1900
2652
|
],
|
|
1901
2653
|
returnType: 'number',
|
|
1902
|
-
|
|
2654
|
+
returnDescription: 'The number of rows inserted.',
|
|
2655
|
+
repeat: [{ startIndex: 1, groupSize: 2, minGroups: 1 }],
|
|
2656
|
+
syntax: 'InsertDE(dataExt, columnName1, valueToInsert1[, columnNameN, valueToInsertN, ...])',
|
|
2657
|
+
example: "%%=InsertDE('Log', 'SubscriberKey', _subscriberkey, 'Status', 'Sent')=%%",
|
|
1903
2658
|
},
|
|
1904
2659
|
{
|
|
1905
2660
|
name: 'InvokeCreate',
|
|
@@ -1928,7 +2683,7 @@ export const FUNCTIONS = [
|
|
|
1928
2683
|
type: 'string',
|
|
1929
2684
|
},
|
|
1930
2685
|
{
|
|
1931
|
-
name: '
|
|
2686
|
+
name: 'createOptionsObject',
|
|
1932
2687
|
mcnSince: null,
|
|
1933
2688
|
mcnNotes: null,
|
|
1934
2689
|
description: 'Optional CreateOptions API object',
|
|
@@ -1936,7 +2691,9 @@ export const FUNCTIONS = [
|
|
|
1936
2691
|
},
|
|
1937
2692
|
],
|
|
1938
2693
|
returnType: 'string',
|
|
1939
|
-
|
|
2694
|
+
returnDescription: 'The status of the create operation as returned by the API.',
|
|
2695
|
+
syntax: 'InvokeCreate(apiObject, @statusMessage, @errorCode[, createOptionsObject])',
|
|
2696
|
+
example: '%%=InvokeCreate(@apiObject, @statusMessage, @errorCode)=%%',
|
|
1940
2697
|
},
|
|
1941
2698
|
{
|
|
1942
2699
|
name: 'InvokeDelete',
|
|
@@ -1965,7 +2722,7 @@ export const FUNCTIONS = [
|
|
|
1965
2722
|
type: 'string',
|
|
1966
2723
|
},
|
|
1967
2724
|
{
|
|
1968
|
-
name: '
|
|
2725
|
+
name: 'deleteOptionsObject',
|
|
1969
2726
|
mcnSince: null,
|
|
1970
2727
|
mcnNotes: null,
|
|
1971
2728
|
description: 'Optional DeleteOptions API object',
|
|
@@ -1973,7 +2730,9 @@ export const FUNCTIONS = [
|
|
|
1973
2730
|
},
|
|
1974
2731
|
],
|
|
1975
2732
|
returnType: 'string',
|
|
1976
|
-
|
|
2733
|
+
returnDescription: 'The status of the delete operation as returned by the API.',
|
|
2734
|
+
syntax: 'InvokeDelete(apiObject, @statusMessage, @errorCode[, deleteOptionsObject])',
|
|
2735
|
+
example: '%%=InvokeDelete(@apiObject, @statusMessage, @errorCode)=%%',
|
|
1977
2736
|
},
|
|
1978
2737
|
{
|
|
1979
2738
|
name: 'InvokeExecute',
|
|
@@ -1981,23 +2740,33 @@ export const FUNCTIONS = [
|
|
|
1981
2740
|
mcnNotes: null,
|
|
1982
2741
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-api/mc-ampscript-reference-api-invoke-execute.html',
|
|
1983
2742
|
guideUrl: 'https://ampscript.guide/invokeexecute/',
|
|
1984
|
-
minArgs:
|
|
2743
|
+
minArgs: 1,
|
|
1985
2744
|
maxArgs: 3,
|
|
1986
2745
|
category: 'Marketing Cloud API',
|
|
1987
|
-
description:
|
|
2746
|
+
description:
|
|
2747
|
+
'Calls the SOAP API Execute method on the given API object and returns the API status code.',
|
|
1988
2748
|
params: [
|
|
1989
|
-
{ name: 'apiObject', description: 'API object to execute' },
|
|
2749
|
+
{ name: 'apiObject', description: 'The API object to execute' },
|
|
1990
2750
|
{
|
|
1991
2751
|
name: 'statusMessage',
|
|
1992
2752
|
mcnSince: null,
|
|
1993
2753
|
mcnNotes: null,
|
|
1994
|
-
description: '
|
|
2754
|
+
description: 'An AMPscript variable that stores the API status message',
|
|
2755
|
+
type: 'string',
|
|
2756
|
+
optional: true,
|
|
2757
|
+
},
|
|
2758
|
+
{
|
|
2759
|
+
name: 'requestId',
|
|
2760
|
+
description: 'An AMPscript variable that stores the request ID',
|
|
1995
2761
|
type: 'string',
|
|
2762
|
+
optional: true,
|
|
1996
2763
|
},
|
|
1997
|
-
{ name: 'errorCode', description: 'Output variable for error code', type: 'string' },
|
|
1998
2764
|
],
|
|
1999
|
-
returnType: '
|
|
2000
|
-
|
|
2765
|
+
returnType: 'rowset',
|
|
2766
|
+
returnDescription:
|
|
2767
|
+
'A rowset containing the API response. Use Row() and Field() to read the StatusMessage and ErrorCode.',
|
|
2768
|
+
syntax: 'InvokeExecute(apiObject[, @statusMessage, @requestId])',
|
|
2769
|
+
example: '%%[ SET @rows = InvokeExecute(@apiObject, @statusMessage, @requestId) ]%%',
|
|
2001
2770
|
},
|
|
2002
2771
|
{
|
|
2003
2772
|
name: 'InvokePerform',
|
|
@@ -2011,7 +2780,11 @@ export const FUNCTIONS = [
|
|
|
2011
2780
|
description: 'Calls the SOAP API Perform method on the given API object.',
|
|
2012
2781
|
params: [
|
|
2013
2782
|
{ name: 'apiObject', description: 'API object to perform on' },
|
|
2014
|
-
{
|
|
2783
|
+
{
|
|
2784
|
+
name: 'actionToPerform',
|
|
2785
|
+
description: 'Action to perform; valid values vary by object type',
|
|
2786
|
+
type: 'string',
|
|
2787
|
+
},
|
|
2015
2788
|
{
|
|
2016
2789
|
name: 'statusMessage',
|
|
2017
2790
|
mcnSince: null,
|
|
@@ -2022,7 +2795,9 @@ export const FUNCTIONS = [
|
|
|
2022
2795
|
},
|
|
2023
2796
|
],
|
|
2024
2797
|
returnType: 'string',
|
|
2025
|
-
|
|
2798
|
+
returnDescription: 'The status of the perform operation as returned by the API.',
|
|
2799
|
+
syntax: 'InvokePerform(apiObject, actionToPerform[, @statusMessage])',
|
|
2800
|
+
example: "%%=InvokePerform(@apiObject, 'Start', @statusMessage)=%%",
|
|
2026
2801
|
},
|
|
2027
2802
|
{
|
|
2028
2803
|
name: 'InvokeRetrieve',
|
|
@@ -2054,7 +2829,9 @@ export const FUNCTIONS = [
|
|
|
2054
2829
|
},
|
|
2055
2830
|
],
|
|
2056
2831
|
returnType: 'rowset',
|
|
2832
|
+
returnDescription: 'A rowset containing the retrieved API records.',
|
|
2057
2833
|
syntax: 'InvokeRetrieve(apiObject[, @statusMessage, @requestId])',
|
|
2834
|
+
example: '%%[ SET @rows = InvokeRetrieve(@apiObject, @statusMessage, @requestId) ]%%',
|
|
2058
2835
|
},
|
|
2059
2836
|
{
|
|
2060
2837
|
name: 'InvokeUpdate',
|
|
@@ -2093,7 +2870,9 @@ export const FUNCTIONS = [
|
|
|
2093
2870
|
},
|
|
2094
2871
|
],
|
|
2095
2872
|
returnType: 'string',
|
|
2873
|
+
returnDescription: 'The status of the update operation as returned by the API.',
|
|
2096
2874
|
syntax: 'InvokeUpdate(apiObject[, @statusMessage, @errorCode, updateOptions])',
|
|
2875
|
+
example: '%%=InvokeUpdate(@apiObject, @statusMessage, @errorCode)=%%',
|
|
2097
2876
|
},
|
|
2098
2877
|
{
|
|
2099
2878
|
name: 'IsCHTMLBrowser',
|
|
@@ -2108,7 +2887,10 @@ export const FUNCTIONS = [
|
|
|
2108
2887
|
"Returns true if the subscriber's browser is identified as a compact HTML (cHTML) device.",
|
|
2109
2888
|
params: [{ name: 'userAgent', description: 'User agent string to test', type: 'string' }],
|
|
2110
2889
|
returnType: 'boolean',
|
|
2890
|
+
returnDescription: 'True when the user agent indicates a cHTML browser, otherwise false.',
|
|
2891
|
+
returnEnum: [true, false],
|
|
2111
2892
|
syntax: 'IsCHTMLBrowser(userAgent)',
|
|
2893
|
+
example: '%%=IsCHTMLBrowser(@userAgent)=%%',
|
|
2112
2894
|
},
|
|
2113
2895
|
{
|
|
2114
2896
|
name: 'IsEmailAddress',
|
|
@@ -2122,6 +2904,9 @@ export const FUNCTIONS = [
|
|
|
2122
2904
|
description: 'Returns true if the value is a syntactically valid email address.',
|
|
2123
2905
|
params: [{ name: 'value', description: 'Value to validate', type: 'string' }],
|
|
2124
2906
|
returnType: 'boolean',
|
|
2907
|
+
returnDescription:
|
|
2908
|
+
'True when the value is a syntactically valid email address, otherwise false.',
|
|
2909
|
+
returnEnum: [true, false],
|
|
2125
2910
|
syntax: 'IsEmailAddress(value)',
|
|
2126
2911
|
example: "%%=IsEmailAddress('test@example.com')=%%",
|
|
2127
2912
|
},
|
|
@@ -2137,7 +2922,10 @@ export const FUNCTIONS = [
|
|
|
2137
2922
|
description: 'Returns true if the value is null.',
|
|
2138
2923
|
params: [{ name: 'value', description: 'Value to test' }],
|
|
2139
2924
|
returnType: 'boolean',
|
|
2925
|
+
returnDescription: 'True when the value is null, otherwise false.',
|
|
2926
|
+
returnEnum: [true, false],
|
|
2140
2927
|
syntax: 'IsNull(value)',
|
|
2928
|
+
example: '%%=IsNull(@value)=%%',
|
|
2141
2929
|
},
|
|
2142
2930
|
{
|
|
2143
2931
|
name: 'IsNullDefault',
|
|
@@ -2154,6 +2942,7 @@ export const FUNCTIONS = [
|
|
|
2154
2942
|
{ name: 'defaultValue', description: 'Default to return when null' },
|
|
2155
2943
|
],
|
|
2156
2944
|
returnType: 'string',
|
|
2945
|
+
returnDescription: 'The original value, or the default value when the original is null.',
|
|
2157
2946
|
syntax: 'IsNullDefault(value, defaultValue)',
|
|
2158
2947
|
example: "%%=IsNullDefault(@name, 'Friend')=%%",
|
|
2159
2948
|
},
|
|
@@ -2169,7 +2958,10 @@ export const FUNCTIONS = [
|
|
|
2169
2958
|
description: 'Returns true if the value is a valid phone number.',
|
|
2170
2959
|
params: [{ name: 'value', description: 'Value to validate', type: 'string' }],
|
|
2171
2960
|
returnType: 'boolean',
|
|
2961
|
+
returnDescription: 'True when the value is a valid phone number, otherwise false.',
|
|
2962
|
+
returnEnum: [true, false],
|
|
2172
2963
|
syntax: 'IsPhoneNumber(value)',
|
|
2964
|
+
example: "%%=IsPhoneNumber('+1 718 209 7651')=%%",
|
|
2173
2965
|
},
|
|
2174
2966
|
{
|
|
2175
2967
|
name: 'Length',
|
|
@@ -2181,9 +2973,10 @@ export const FUNCTIONS = [
|
|
|
2181
2973
|
maxArgs: 1,
|
|
2182
2974
|
category: 'String',
|
|
2183
2975
|
description: 'Returns the number of characters in a string.',
|
|
2184
|
-
params: [{ name: '
|
|
2976
|
+
params: [{ name: 'sourceString', description: 'String to measure', type: 'string' }],
|
|
2185
2977
|
returnType: 'number',
|
|
2186
|
-
|
|
2978
|
+
returnDescription: 'The number of characters in the string.',
|
|
2979
|
+
syntax: 'Length(sourceString)',
|
|
2187
2980
|
example: "%%=Length('Hello')=%%",
|
|
2188
2981
|
},
|
|
2189
2982
|
{
|
|
@@ -2197,11 +2990,23 @@ export const FUNCTIONS = [
|
|
|
2197
2990
|
category: 'Content',
|
|
2198
2991
|
description: 'Generates a URL to a microsite page that serves live, dynamic content.',
|
|
2199
2992
|
params: [
|
|
2200
|
-
{
|
|
2201
|
-
|
|
2993
|
+
{
|
|
2994
|
+
name: 'contentType',
|
|
2995
|
+
description:
|
|
2996
|
+
'The type of content to generate a URL for. Accepted values: microsite, landingpage',
|
|
2997
|
+
type: 'string',
|
|
2998
|
+
enum: ['coupon'],
|
|
2999
|
+
},
|
|
3000
|
+
{
|
|
3001
|
+
name: 'externalKey',
|
|
3002
|
+
description: 'The external key of the live content',
|
|
3003
|
+
type: 'string',
|
|
3004
|
+
},
|
|
2202
3005
|
],
|
|
2203
3006
|
returnType: 'string',
|
|
2204
|
-
|
|
3007
|
+
returnDescription: 'A URL to the referenced live content microsite.',
|
|
3008
|
+
syntax: 'LiveContentMicrositeURL(contentType, externalKey)',
|
|
3009
|
+
example: '%%=LiveContentMicrositeURL("coupon", "50percent")=%%',
|
|
2205
3010
|
},
|
|
2206
3011
|
{
|
|
2207
3012
|
name: 'LocalDateToSystemDate',
|
|
@@ -2213,9 +3018,17 @@ export const FUNCTIONS = [
|
|
|
2213
3018
|
maxArgs: 1,
|
|
2214
3019
|
category: 'Date and Time',
|
|
2215
3020
|
description: 'Converts a local date to the Marketing Cloud system date (Central Time).',
|
|
2216
|
-
params: [
|
|
2217
|
-
|
|
2218
|
-
|
|
3021
|
+
params: [
|
|
3022
|
+
{
|
|
3023
|
+
name: 'timeToConvert',
|
|
3024
|
+
description: 'The time string that you want to convert',
|
|
3025
|
+
type: 'string',
|
|
3026
|
+
},
|
|
3027
|
+
],
|
|
3028
|
+
returnType: 'string',
|
|
3029
|
+
returnDescription: 'The supplied local time converted to system (account) time.',
|
|
3030
|
+
syntax: 'LocalDateToSystemDate(timeToConvert)',
|
|
3031
|
+
example: '%%=LocalDateToSystemDate(Now())=%%',
|
|
2219
3032
|
},
|
|
2220
3033
|
{
|
|
2221
3034
|
name: 'LongSFID',
|
|
@@ -2230,13 +3043,15 @@ export const FUNCTIONS = [
|
|
|
2230
3043
|
'Converts a 15-character case-sensitive Salesforce ID to the 18-character case-insensitive version.',
|
|
2231
3044
|
params: [{ name: 'sfid15', description: '15-character Salesforce ID', type: 'string' }],
|
|
2232
3045
|
returnType: 'string',
|
|
3046
|
+
returnDescription: 'The 18-character Salesforce ID derived from the 15-character ID.',
|
|
2233
3047
|
syntax: 'LongSFID(sfid15)',
|
|
3048
|
+
example: "%%=LongSFID('001A000000ABCDE')=%%",
|
|
2234
3049
|
},
|
|
2235
3050
|
{
|
|
2236
3051
|
name: 'Lookup',
|
|
2237
3052
|
mcnSince: 67,
|
|
2238
3053
|
mcnNotes:
|
|
2239
|
-
'In MCN, search arguments must be provided in column/value pairs
|
|
3054
|
+
'In MCN, search arguments must be provided in column/value pairs - an odd count causes an error. All filter keys must fully specify the composite primary key.',
|
|
2240
3055
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-data-extension/mc-ampscript-reference-data-extension-lookup.html',
|
|
2241
3056
|
guideUrl: 'https://ampscript.guide/lookup/',
|
|
2242
3057
|
minArgs: 4,
|
|
@@ -2245,22 +3060,37 @@ export const FUNCTIONS = [
|
|
|
2245
3060
|
description:
|
|
2246
3061
|
'Returns a single field value from the first matching row in a data extension.',
|
|
2247
3062
|
params: [
|
|
2248
|
-
{ name: 'dataExtensionName', description: 'Data extension to query', type: 'string' },
|
|
2249
|
-
{ name: 'returnColumn', description: 'Column whose value to return', type: 'string' },
|
|
2250
|
-
{ name: 'lookupColumn', description: 'Filter column name', type: 'string' },
|
|
2251
|
-
{ name: 'lookupValue', description: 'Filter column value' },
|
|
2252
3063
|
{
|
|
2253
|
-
name: '
|
|
3064
|
+
name: 'dataObject',
|
|
3065
|
+
description:
|
|
3066
|
+
'The data object (data extension or marketing object) that contains the data to look up',
|
|
3067
|
+
type: 'string',
|
|
3068
|
+
},
|
|
3069
|
+
{
|
|
3070
|
+
name: 'returnColumn',
|
|
3071
|
+
description: 'The name of the column to return data from',
|
|
3072
|
+
type: 'string',
|
|
3073
|
+
},
|
|
3074
|
+
{
|
|
3075
|
+
name: 'searchColumn1',
|
|
3076
|
+
description: 'The name of the column to search',
|
|
3077
|
+
type: 'string',
|
|
3078
|
+
},
|
|
3079
|
+
{ name: 'searchValue1', description: 'The value that identifies the rows to retrieve' },
|
|
3080
|
+
{
|
|
3081
|
+
name: 'searchColumnN',
|
|
2254
3082
|
mcnSince: null,
|
|
2255
3083
|
mcnNotes: null,
|
|
2256
3084
|
description: 'Additional filter column',
|
|
2257
3085
|
type: 'string',
|
|
2258
3086
|
optional: true,
|
|
2259
3087
|
},
|
|
2260
|
-
{ name: '
|
|
3088
|
+
{ name: 'searchValueN', description: 'Additional filter value', optional: true },
|
|
2261
3089
|
],
|
|
2262
3090
|
returnType: 'string',
|
|
2263
|
-
|
|
3091
|
+
returnDescription: 'The value from the requested column of the first matching row.',
|
|
3092
|
+
repeat: [{ startIndex: 2, groupSize: 2, minGroups: 1 }],
|
|
3093
|
+
syntax: 'Lookup(dataObject, returnColumn, searchColumn1, searchValue1[, searchColumnN, searchValueN, ...])',
|
|
2264
3094
|
example: "%%=Lookup('MyDE', 'Email', 'ID', '123')=%%",
|
|
2265
3095
|
},
|
|
2266
3096
|
{
|
|
@@ -2274,29 +3104,47 @@ export const FUNCTIONS = [
|
|
|
2274
3104
|
category: 'Data Extension',
|
|
2275
3105
|
description: 'Returns a sorted rowset of matching rows from a data extension.',
|
|
2276
3106
|
params: [
|
|
2277
|
-
{
|
|
2278
|
-
|
|
3107
|
+
{
|
|
3108
|
+
name: 'dataExt',
|
|
3109
|
+
description: 'The name of the data extension that contains the data to retrieve',
|
|
3110
|
+
type: 'string',
|
|
3111
|
+
},
|
|
3112
|
+
{
|
|
3113
|
+
name: 'numRows',
|
|
3114
|
+
description:
|
|
3115
|
+
'The number of rows to return. A value less than 1 returns all rows (max 2,000)',
|
|
3116
|
+
type: 'number',
|
|
3117
|
+
},
|
|
2279
3118
|
{
|
|
2280
3119
|
name: 'sortColumn',
|
|
2281
3120
|
mcnSince: null,
|
|
2282
3121
|
mcnNotes: null,
|
|
2283
|
-
description:
|
|
3122
|
+
description:
|
|
3123
|
+
'The column to sort data by, followed by ASC or DESC (case-insensitive)',
|
|
2284
3124
|
type: 'string',
|
|
2285
3125
|
},
|
|
2286
|
-
{ name: 'lookupColumn', description: 'Filter column name', type: 'string' },
|
|
2287
|
-
{ name: 'lookupValue', description: 'Filter column value' },
|
|
2288
3126
|
{
|
|
2289
|
-
name: '
|
|
3127
|
+
name: 'searchColumn1',
|
|
3128
|
+
description: 'The name of the column to search',
|
|
3129
|
+
type: 'string',
|
|
3130
|
+
},
|
|
3131
|
+
{ name: 'searchValue1', description: 'The value that identifies the rows to retrieve' },
|
|
3132
|
+
{
|
|
3133
|
+
name: 'searchColumnN',
|
|
2290
3134
|
mcnSince: null,
|
|
2291
3135
|
mcnNotes: null,
|
|
2292
3136
|
description: 'Additional filter column',
|
|
2293
3137
|
type: 'string',
|
|
2294
3138
|
optional: true,
|
|
2295
3139
|
},
|
|
2296
|
-
{ name: '
|
|
3140
|
+
{ name: 'searchValueN', description: 'Additional filter value', optional: true },
|
|
2297
3141
|
],
|
|
2298
3142
|
returnType: 'rowset',
|
|
2299
|
-
|
|
3143
|
+
returnDescription: 'A sorted, row-limited rowset of matching rows.',
|
|
3144
|
+
repeat: [{ startIndex: 3, groupSize: 2, minGroups: 1 }],
|
|
3145
|
+
syntax: 'LookupOrderedRows(dataExt, numRows, sortColumn, searchColumn1, searchValue1[, searchColumnN, searchValueN, ...])',
|
|
3146
|
+
example:
|
|
3147
|
+
"%%[ SET @rows = LookupOrderedRows('Orders', 5, 'OrderDate DESC', 'SubKey', _subscriberkey) ]%%",
|
|
2300
3148
|
},
|
|
2301
3149
|
{
|
|
2302
3150
|
name: 'LookupOrderedRowsCS',
|
|
@@ -2310,23 +3158,45 @@ export const FUNCTIONS = [
|
|
|
2310
3158
|
description:
|
|
2311
3159
|
'Case-sensitive version of LookupOrderedRows. Returns a sorted rowset of matching rows.',
|
|
2312
3160
|
params: [
|
|
2313
|
-
{ name: 'dataExtensionName', description: 'Data extension to query', type: 'string' },
|
|
2314
|
-
{ name: 'maxRows', description: 'Maximum rows to return', type: 'number' },
|
|
2315
|
-
{ name: 'sortColumn', description: 'Sort column and direction', type: 'string' },
|
|
2316
|
-
{ name: 'lookupColumn', description: 'Filter column name', type: 'string' },
|
|
2317
|
-
{ name: 'lookupValue', description: 'Filter column value' },
|
|
2318
3161
|
{
|
|
2319
|
-
name: '
|
|
3162
|
+
name: 'dataExt',
|
|
3163
|
+
description: 'The name of the data extension that contains the data to retrieve',
|
|
3164
|
+
type: 'string',
|
|
3165
|
+
},
|
|
3166
|
+
{
|
|
3167
|
+
name: 'numRows',
|
|
3168
|
+
description:
|
|
3169
|
+
'The number of rows to return. A value less than 1 returns all rows (max 2,000)',
|
|
3170
|
+
type: 'number',
|
|
3171
|
+
},
|
|
3172
|
+
{
|
|
3173
|
+
name: 'sortColumn',
|
|
3174
|
+
description:
|
|
3175
|
+
'The column to sort data by, followed by ASC or DESC (case-insensitive)',
|
|
3176
|
+
type: 'string',
|
|
3177
|
+
},
|
|
3178
|
+
{
|
|
3179
|
+
name: 'searchColumn1',
|
|
3180
|
+
description: 'The name of the column to search',
|
|
3181
|
+
type: 'string',
|
|
3182
|
+
},
|
|
3183
|
+
{ name: 'searchValue1', description: 'The value that identifies the rows to retrieve' },
|
|
3184
|
+
{
|
|
3185
|
+
name: 'searchColumnN',
|
|
2320
3186
|
mcnSince: null,
|
|
2321
3187
|
mcnNotes: null,
|
|
2322
3188
|
description: 'Additional filter column',
|
|
2323
3189
|
type: 'string',
|
|
2324
3190
|
optional: true,
|
|
2325
3191
|
},
|
|
2326
|
-
{ name: '
|
|
3192
|
+
{ name: 'searchValueN', description: 'Additional filter value', optional: true },
|
|
2327
3193
|
],
|
|
2328
3194
|
returnType: 'rowset',
|
|
2329
|
-
|
|
3195
|
+
returnDescription: 'A case-sensitive, sorted, row-limited rowset of matching rows.',
|
|
3196
|
+
repeat: [{ startIndex: 3, groupSize: 2, minGroups: 1 }],
|
|
3197
|
+
syntax: 'LookupOrderedRowsCS(dataExt, numRows, sortColumn, searchColumn1, searchValue1[, searchColumnN, searchValueN, ...])',
|
|
3198
|
+
example:
|
|
3199
|
+
"%%[ SET @rows = LookupOrderedRowsCS('Orders', 5, 'OrderDate DESC', 'SubKey', _subscriberkey) ]%%",
|
|
2330
3200
|
},
|
|
2331
3201
|
{
|
|
2332
3202
|
name: 'LookupRows',
|
|
@@ -2339,21 +3209,31 @@ export const FUNCTIONS = [
|
|
|
2339
3209
|
category: 'Data Extension',
|
|
2340
3210
|
description: 'Returns a rowset of all matching rows from a data extension.',
|
|
2341
3211
|
params: [
|
|
2342
|
-
{ name: 'dataExtensionName', description: 'Data extension to query', type: 'string' },
|
|
2343
|
-
{ name: 'lookupColumn', description: 'Filter column name', type: 'string' },
|
|
2344
|
-
{ name: 'lookupValue', description: 'Filter column value' },
|
|
2345
3212
|
{
|
|
2346
|
-
name: '
|
|
3213
|
+
name: 'dataExt',
|
|
3214
|
+
description: 'The name of the data extension that contains the data to retrieve',
|
|
3215
|
+
type: 'string',
|
|
3216
|
+
},
|
|
3217
|
+
{
|
|
3218
|
+
name: 'searchColumn1',
|
|
3219
|
+
description: 'The name of the column to search',
|
|
3220
|
+
type: 'string',
|
|
3221
|
+
},
|
|
3222
|
+
{ name: 'searchValue1', description: 'The value that identifies the rows to retrieve' },
|
|
3223
|
+
{
|
|
3224
|
+
name: 'searchColumnN',
|
|
2347
3225
|
mcnSince: null,
|
|
2348
3226
|
mcnNotes: null,
|
|
2349
3227
|
description: 'Additional filter column',
|
|
2350
3228
|
type: 'string',
|
|
2351
3229
|
optional: true,
|
|
2352
3230
|
},
|
|
2353
|
-
{ name: '
|
|
3231
|
+
{ name: 'searchValueN', description: 'Additional filter value', optional: true },
|
|
2354
3232
|
],
|
|
2355
3233
|
returnType: 'rowset',
|
|
2356
|
-
|
|
3234
|
+
returnDescription: 'A rowset of all rows that match the search criteria.',
|
|
3235
|
+
repeat: [{ startIndex: 1, groupSize: 2, minGroups: 1 }],
|
|
3236
|
+
syntax: 'LookupRows(dataExt, searchColumn1, searchValue1[, searchColumnN, searchValueN, ...])',
|
|
2357
3237
|
example: "%%=LookupRows('MyDE', 'Status', 'Active')=%%",
|
|
2358
3238
|
},
|
|
2359
3239
|
{
|
|
@@ -2367,21 +3247,32 @@ export const FUNCTIONS = [
|
|
|
2367
3247
|
category: 'Data Extension',
|
|
2368
3248
|
description: 'Case-sensitive version of LookupRows. Returns a rowset of matching rows.',
|
|
2369
3249
|
params: [
|
|
2370
|
-
{ name: 'dataExtensionName', description: 'Data extension to query', type: 'string' },
|
|
2371
|
-
{ name: 'lookupColumn', description: 'Filter column name', type: 'string' },
|
|
2372
|
-
{ name: 'lookupValue', description: 'Filter column value' },
|
|
2373
3250
|
{
|
|
2374
|
-
name: '
|
|
3251
|
+
name: 'dataExt',
|
|
3252
|
+
description: 'The name of the data extension that contains the data to retrieve',
|
|
3253
|
+
type: 'string',
|
|
3254
|
+
},
|
|
3255
|
+
{
|
|
3256
|
+
name: 'searchColumn1',
|
|
3257
|
+
description: 'The name of the column to search',
|
|
3258
|
+
type: 'string',
|
|
3259
|
+
},
|
|
3260
|
+
{ name: 'searchValue1', description: 'The value that identifies the rows to retrieve' },
|
|
3261
|
+
{
|
|
3262
|
+
name: 'searchColumnN',
|
|
2375
3263
|
mcnSince: null,
|
|
2376
3264
|
mcnNotes: null,
|
|
2377
3265
|
description: 'Additional filter column',
|
|
2378
3266
|
type: 'string',
|
|
2379
3267
|
optional: true,
|
|
2380
3268
|
},
|
|
2381
|
-
{ name: '
|
|
3269
|
+
{ name: 'searchValueN', description: 'Additional filter value', optional: true },
|
|
2382
3270
|
],
|
|
2383
3271
|
returnType: 'rowset',
|
|
2384
|
-
|
|
3272
|
+
returnDescription: 'A case-sensitive rowset of all rows that match the search criteria.',
|
|
3273
|
+
repeat: [{ startIndex: 1, groupSize: 2, minGroups: 1 }],
|
|
3274
|
+
syntax: 'LookupRowsCS(dataExt, searchColumn1, searchValue1[, searchColumnN, searchValueN, ...])',
|
|
3275
|
+
example: "%%[ SET @rows = LookupRowsCS('Orders', 'SubKey', _subscriberkey) ]%%",
|
|
2385
3276
|
},
|
|
2386
3277
|
{
|
|
2387
3278
|
name: 'Lowercase',
|
|
@@ -2393,9 +3284,10 @@ export const FUNCTIONS = [
|
|
|
2393
3284
|
maxArgs: 1,
|
|
2394
3285
|
category: 'String',
|
|
2395
3286
|
description: 'Converts a string to all lowercase characters.',
|
|
2396
|
-
params: [{ name: '
|
|
3287
|
+
params: [{ name: 'sourceString', description: 'String to convert', type: 'string' }],
|
|
2397
3288
|
returnType: 'string',
|
|
2398
|
-
|
|
3289
|
+
returnDescription: 'The string converted to lower case.',
|
|
3290
|
+
syntax: 'Lowercase(sourceString)',
|
|
2399
3291
|
example: "%%=Lowercase('HELLO')=%%",
|
|
2400
3292
|
},
|
|
2401
3293
|
{
|
|
@@ -2409,18 +3301,46 @@ export const FUNCTIONS = [
|
|
|
2409
3301
|
category: 'Encryption and Encoding',
|
|
2410
3302
|
description: 'Returns the MD5 hash of the input value.',
|
|
2411
3303
|
params: [
|
|
2412
|
-
{ name: '
|
|
3304
|
+
{ name: 'stringToConvert', description: 'The string to encode', type: 'string' },
|
|
2413
3305
|
{
|
|
2414
|
-
name: '
|
|
3306
|
+
name: 'charSet',
|
|
2415
3307
|
mcnSince: null,
|
|
2416
3308
|
mcnNotes: null,
|
|
2417
|
-
description: '
|
|
3309
|
+
description: 'Character set to use for the encoding',
|
|
2418
3310
|
type: 'string',
|
|
3311
|
+
enum: ['UTF-8', 'UTF-16'],
|
|
2419
3312
|
optional: true,
|
|
3313
|
+
default: 'UTF-8',
|
|
3314
|
+
},
|
|
3315
|
+
],
|
|
3316
|
+
returnType: 'string',
|
|
3317
|
+
returnDescription: 'The MD5 hash of the input as a hexadecimal string.',
|
|
3318
|
+
syntax: 'MD5(stringToConvert[, charSet])',
|
|
3319
|
+
example: '%%=MD5("This is a string of text.")=%%',
|
|
3320
|
+
},
|
|
3321
|
+
{
|
|
3322
|
+
name: 'MMS_Content_URL',
|
|
3323
|
+
mcnSince: null,
|
|
3324
|
+
mcnNotes: null,
|
|
3325
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sms/mc-ampscript-reference-sms-mms-content-url.html',
|
|
3326
|
+
guideUrl: 'https://ampscript.guide/mobileconnect-data-strings/',
|
|
3327
|
+
minArgs: 1,
|
|
3328
|
+
maxArgs: 1,
|
|
3329
|
+
category: 'MobileConnect',
|
|
3330
|
+
description:
|
|
3331
|
+
'Returns the URL of MMS content from an inbound mobile-originated (MO) message. Only usable in MobileConnect.',
|
|
3332
|
+
params: [
|
|
3333
|
+
{
|
|
3334
|
+
name: 'position',
|
|
3335
|
+
description:
|
|
3336
|
+
'Zero-based index of the MMS content to return; 0 returns the first attachment',
|
|
3337
|
+
type: 'number',
|
|
2420
3338
|
},
|
|
2421
3339
|
],
|
|
2422
3340
|
returnType: 'string',
|
|
2423
|
-
|
|
3341
|
+
returnDescription: 'The URL of the requested MMS content from the inbound message.',
|
|
3342
|
+
syntax: 'MMS_Content_URL(position)',
|
|
3343
|
+
example: '%%=MMS_Content_URL(0)=%%',
|
|
2424
3344
|
},
|
|
2425
3345
|
{
|
|
2426
3346
|
name: 'MicrositeURL',
|
|
@@ -2435,24 +3355,35 @@ export const FUNCTIONS = [
|
|
|
2435
3355
|
params: [
|
|
2436
3356
|
{ name: 'pageId', description: 'Microsite page ID', type: 'number' },
|
|
2437
3357
|
{
|
|
2438
|
-
name: '
|
|
2439
|
-
mcnSince: null,
|
|
2440
|
-
mcnNotes: null,
|
|
3358
|
+
name: 'paramName1',
|
|
2441
3359
|
description: 'Query parameter name',
|
|
2442
3360
|
type: 'string',
|
|
2443
3361
|
optional: true,
|
|
2444
3362
|
},
|
|
2445
3363
|
{
|
|
2446
|
-
name: '
|
|
2447
|
-
mcnSince: null,
|
|
2448
|
-
mcnNotes: null,
|
|
3364
|
+
name: 'paramValue1',
|
|
2449
3365
|
description: 'Query parameter value',
|
|
2450
3366
|
type: 'string',
|
|
2451
3367
|
optional: true,
|
|
2452
3368
|
},
|
|
3369
|
+
{
|
|
3370
|
+
name: 'paramNameN',
|
|
3371
|
+
description: 'Additional query parameter name',
|
|
3372
|
+
type: 'string',
|
|
3373
|
+
optional: true,
|
|
3374
|
+
},
|
|
3375
|
+
{
|
|
3376
|
+
name: 'paramValueN',
|
|
3377
|
+
description: 'Additional query parameter value',
|
|
3378
|
+
type: 'string',
|
|
3379
|
+
optional: true,
|
|
3380
|
+
},
|
|
2453
3381
|
],
|
|
2454
3382
|
returnType: 'string',
|
|
2455
|
-
|
|
3383
|
+
returnDescription: 'A tracked URL to the referenced microsite page.',
|
|
3384
|
+
repeat: [{ startIndex: 1, groupSize: 2, minGroups: 0 }],
|
|
3385
|
+
syntax: 'MicrositeURL(pageId[, paramName1, paramValue1, paramNameN, paramValueN, ...])',
|
|
3386
|
+
example: '%%=MicrositeURL(12345)=%%',
|
|
2456
3387
|
},
|
|
2457
3388
|
{
|
|
2458
3389
|
name: 'Mod',
|
|
@@ -2470,9 +3401,33 @@ export const FUNCTIONS = [
|
|
|
2470
3401
|
{ name: 'divisor', description: 'Number to divide by', type: 'number' },
|
|
2471
3402
|
],
|
|
2472
3403
|
returnType: 'number',
|
|
3404
|
+
returnDescription: 'The remainder after dividing the first number by the second.',
|
|
2473
3405
|
syntax: 'Mod(dividend, divisor)',
|
|
2474
3406
|
example: '%%=Mod(10, 3)=%%',
|
|
2475
3407
|
},
|
|
3408
|
+
{
|
|
3409
|
+
name: 'Msg',
|
|
3410
|
+
mcnSince: null,
|
|
3411
|
+
mcnNotes: null,
|
|
3412
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sms/mc-ampscript-reference-sms-msg.html',
|
|
3413
|
+
guideUrl: 'https://ampscript.guide/mobileconnect-data-strings/',
|
|
3414
|
+
minArgs: 1,
|
|
3415
|
+
maxArgs: 1,
|
|
3416
|
+
category: 'MobileConnect',
|
|
3417
|
+
description:
|
|
3418
|
+
'Returns the content of an inbound mobile-originated (MO) message. Only usable in MobileConnect. The only accepted argument value is 0.',
|
|
3419
|
+
params: [
|
|
3420
|
+
{
|
|
3421
|
+
name: 'index',
|
|
3422
|
+
description: 'Message index; the only accepted value is 0 (the current message)',
|
|
3423
|
+
type: 'number',
|
|
3424
|
+
},
|
|
3425
|
+
],
|
|
3426
|
+
returnType: 'string',
|
|
3427
|
+
returnDescription: 'The full content of the inbound mobile-originated message.',
|
|
3428
|
+
syntax: 'Msg(0)',
|
|
3429
|
+
example: '%%=Msg(0)=%%',
|
|
3430
|
+
},
|
|
2476
3431
|
{
|
|
2477
3432
|
name: 'Multiply',
|
|
2478
3433
|
mcnSince: 67,
|
|
@@ -2484,13 +3439,55 @@ export const FUNCTIONS = [
|
|
|
2484
3439
|
category: 'Math',
|
|
2485
3440
|
description: 'Computes the product of two numeric values.',
|
|
2486
3441
|
params: [
|
|
2487
|
-
{ name: '
|
|
2488
|
-
{ name: '
|
|
3442
|
+
{ name: 'number1', description: 'First operand', type: 'number' },
|
|
3443
|
+
{ name: 'number2', description: 'Second operand', type: 'number' },
|
|
2489
3444
|
],
|
|
2490
3445
|
returnType: 'number',
|
|
2491
|
-
|
|
3446
|
+
returnDescription: 'The product of the two operands.',
|
|
3447
|
+
syntax: 'Multiply(number1, number2)',
|
|
2492
3448
|
example: '%%=Multiply(5, 3)=%%',
|
|
2493
3449
|
},
|
|
3450
|
+
{
|
|
3451
|
+
name: 'Noun',
|
|
3452
|
+
mcnSince: null,
|
|
3453
|
+
mcnNotes: null,
|
|
3454
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sms/mc-ampscript-reference-sms-noun.html',
|
|
3455
|
+
guideUrl: 'https://ampscript.guide/mobileconnect-data-strings/',
|
|
3456
|
+
minArgs: 1,
|
|
3457
|
+
maxArgs: 1,
|
|
3458
|
+
category: 'MobileConnect',
|
|
3459
|
+
description:
|
|
3460
|
+
'Returns a single word that follows the keyword in an inbound mobile-originated (MO) message, by position. Only usable in MobileConnect, chained off Msg(0).',
|
|
3461
|
+
params: [
|
|
3462
|
+
{
|
|
3463
|
+
name: 'position',
|
|
3464
|
+
description:
|
|
3465
|
+
'Zero-based index of the word after the keyword to return (0 = first word after the keyword)',
|
|
3466
|
+
type: 'number',
|
|
3467
|
+
},
|
|
3468
|
+
],
|
|
3469
|
+
returnType: 'string',
|
|
3470
|
+
returnDescription: 'The requested word that follows the keyword in the inbound message.',
|
|
3471
|
+
syntax: 'Msg(0).Noun(position)',
|
|
3472
|
+
example: '%%=Msg(0).Noun(1)=%%',
|
|
3473
|
+
},
|
|
3474
|
+
{
|
|
3475
|
+
name: 'Nouns',
|
|
3476
|
+
mcnSince: null,
|
|
3477
|
+
mcnNotes: null,
|
|
3478
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sms/mc-ampscript-reference-sms-nouns.html',
|
|
3479
|
+
guideUrl: 'https://ampscript.guide/mobileconnect-data-strings/',
|
|
3480
|
+
minArgs: 0,
|
|
3481
|
+
maxArgs: 0,
|
|
3482
|
+
category: 'MobileConnect',
|
|
3483
|
+
description:
|
|
3484
|
+
'Returns all message content that follows the keyword in an inbound mobile-originated (MO) message. Only usable in MobileConnect, chained off Msg(0). Takes no arguments.',
|
|
3485
|
+
params: [],
|
|
3486
|
+
returnType: 'string',
|
|
3487
|
+
returnDescription: 'All content that follows the keyword in the inbound message.',
|
|
3488
|
+
syntax: 'Msg(0).Nouns',
|
|
3489
|
+
example: '%%=Msg(0).Nouns=%%',
|
|
3490
|
+
},
|
|
2494
3491
|
{
|
|
2495
3492
|
name: 'Now',
|
|
2496
3493
|
mcnSince: 67,
|
|
@@ -2513,6 +3510,7 @@ export const FUNCTIONS = [
|
|
|
2513
3510
|
},
|
|
2514
3511
|
],
|
|
2515
3512
|
returnType: 'date',
|
|
3513
|
+
returnDescription: 'The current date and time.',
|
|
2516
3514
|
syntax: 'Now([persistFormat])',
|
|
2517
3515
|
example: '%%=Now()=%%',
|
|
2518
3516
|
},
|
|
@@ -2529,7 +3527,9 @@ export const FUNCTIONS = [
|
|
|
2529
3527
|
'Writes a value to the rendered output. Used inside script blocks to emit content.',
|
|
2530
3528
|
params: [{ name: 'content', description: 'Content to output' }],
|
|
2531
3529
|
returnType: 'void',
|
|
3530
|
+
returnDescription: 'No value is returned; the content is written to the message.',
|
|
2532
3531
|
syntax: 'Output(content)',
|
|
3532
|
+
example: "%%=Output(Concat('Hello ', @firstName))=%%",
|
|
2533
3533
|
},
|
|
2534
3534
|
{
|
|
2535
3535
|
name: 'OutputLine',
|
|
@@ -2543,7 +3543,9 @@ export const FUNCTIONS = [
|
|
|
2543
3543
|
description: 'Writes a value followed by a line break to the rendered output.',
|
|
2544
3544
|
params: [{ name: 'content', description: 'Content to output' }],
|
|
2545
3545
|
returnType: 'void',
|
|
3546
|
+
returnDescription: 'No value is returned; the content is written followed by a line break.',
|
|
2546
3547
|
syntax: 'OutputLine(content)',
|
|
3548
|
+
example: "%%=OutputLine(Concat('Hello ', @firstName))=%%",
|
|
2547
3549
|
},
|
|
2548
3550
|
{
|
|
2549
3551
|
name: 'ProperCase',
|
|
@@ -2556,9 +3558,10 @@ export const FUNCTIONS = [
|
|
|
2556
3558
|
category: 'String',
|
|
2557
3559
|
description:
|
|
2558
3560
|
'Converts a string to proper (title) case, capitalizing the first letter of each word.',
|
|
2559
|
-
params: [{ name: '
|
|
3561
|
+
params: [{ name: 'sourceString', description: 'String to convert', type: 'string' }],
|
|
2560
3562
|
returnType: 'string',
|
|
2561
|
-
|
|
3563
|
+
returnDescription: 'The string with the first letter of each word capitalized.',
|
|
3564
|
+
syntax: 'ProperCase(sourceString)',
|
|
2562
3565
|
example: "%%=ProperCase('hello world')=%%",
|
|
2563
3566
|
},
|
|
2564
3567
|
{
|
|
@@ -2574,7 +3577,9 @@ export const FUNCTIONS = [
|
|
|
2574
3577
|
'Returns the value of a URL query string parameter from the current page request.',
|
|
2575
3578
|
params: [{ name: 'parameterName', description: 'Query parameter name', type: 'string' }],
|
|
2576
3579
|
returnType: 'string',
|
|
3580
|
+
returnDescription: 'The value of the named query-string parameter.',
|
|
2577
3581
|
syntax: 'QueryParameter(parameterName)',
|
|
3582
|
+
example: "%%=QueryParameter('utm_source')=%%",
|
|
2578
3583
|
},
|
|
2579
3584
|
{
|
|
2580
3585
|
name: 'RaiseError',
|
|
@@ -2593,7 +3598,8 @@ export const FUNCTIONS = [
|
|
|
2593
3598
|
name: 'skipSubscriber',
|
|
2594
3599
|
mcnSince: null,
|
|
2595
3600
|
mcnNotes: null,
|
|
2596
|
-
description:
|
|
3601
|
+
description:
|
|
3602
|
+
'If true, the function skips only the subscriber for which the error was raised, and proceeds with the rest of the email job. If false, the function stops the entire email job when an error is raised. The default value is false.',
|
|
2597
3603
|
type: 'boolean',
|
|
2598
3604
|
optional: true,
|
|
2599
3605
|
},
|
|
@@ -2606,24 +3612,27 @@ export const FUNCTIONS = [
|
|
|
2606
3612
|
optional: true,
|
|
2607
3613
|
},
|
|
2608
3614
|
{
|
|
2609
|
-
name: '
|
|
3615
|
+
name: 'apiErrorNumber',
|
|
2610
3616
|
mcnSince: null,
|
|
2611
3617
|
mcnNotes: null,
|
|
2612
3618
|
description: 'Custom API error message',
|
|
2613
|
-
type: '
|
|
3619
|
+
type: 'number',
|
|
2614
3620
|
optional: true,
|
|
2615
3621
|
},
|
|
2616
3622
|
{
|
|
2617
|
-
name: '
|
|
3623
|
+
name: 'preserveDataExt',
|
|
2618
3624
|
mcnSince: null,
|
|
2619
3625
|
mcnNotes: null,
|
|
2620
|
-
description:
|
|
2621
|
-
|
|
3626
|
+
description:
|
|
3627
|
+
"If true, the function retains information written to data extensions before the error occurs, even if the subscriber is skipped. If false, the function doesn't retain data extension information recorded before the error. This parameter applies to information that is inserted, updated, upserted, or deleted using AMPscript functions",
|
|
3628
|
+
type: 'boolean',
|
|
2622
3629
|
optional: true,
|
|
2623
3630
|
},
|
|
2624
3631
|
],
|
|
2625
3632
|
returnType: 'void',
|
|
2626
|
-
|
|
3633
|
+
returnDescription: 'No value is returned; message processing is halted with an error.',
|
|
3634
|
+
syntax: 'RaiseError(message[, skipSubscriber, apiErrorCode, apiErrorNumber, preserveDataExt])',
|
|
3635
|
+
example: "RaiseError('Missing required field', 0)",
|
|
2627
3636
|
},
|
|
2628
3637
|
{
|
|
2629
3638
|
name: 'Random',
|
|
@@ -2640,6 +3649,7 @@ export const FUNCTIONS = [
|
|
|
2640
3649
|
{ name: 'max', description: 'Upper bound (inclusive)', type: 'number' },
|
|
2641
3650
|
],
|
|
2642
3651
|
returnType: 'number',
|
|
3652
|
+
returnDescription: 'A random whole number within the supplied range.',
|
|
2643
3653
|
syntax: 'Random(min, max)',
|
|
2644
3654
|
example: '%%=Random(1, 100)=%%',
|
|
2645
3655
|
},
|
|
@@ -2658,7 +3668,9 @@ export const FUNCTIONS = [
|
|
|
2658
3668
|
{ name: 'imageUrl', description: 'Base URL for star images', type: 'string' },
|
|
2659
3669
|
],
|
|
2660
3670
|
returnType: 'string',
|
|
3671
|
+
returnDescription: 'An HTML string of star images representing the rating.',
|
|
2661
3672
|
syntax: 'RatingStars(rating, maxRating, imageUrl)',
|
|
3673
|
+
example: "%%=RatingStars(4, 5, 'https://example.com/star.png')=%%",
|
|
2662
3674
|
},
|
|
2663
3675
|
{
|
|
2664
3676
|
name: 'Redirect',
|
|
@@ -2672,7 +3684,9 @@ export const FUNCTIONS = [
|
|
|
2672
3684
|
description: 'Performs an HTTP redirect to the specified URL. Landing pages only.',
|
|
2673
3685
|
params: [{ name: 'url', description: 'Target URL', type: 'string' }],
|
|
2674
3686
|
returnType: 'void',
|
|
3687
|
+
returnDescription: 'No value is returned; the request is redirected to the supplied URL.',
|
|
2675
3688
|
syntax: 'Redirect(url)',
|
|
3689
|
+
example: "Redirect('https://example.com')",
|
|
2676
3690
|
},
|
|
2677
3691
|
{
|
|
2678
3692
|
name: 'RedirectTo',
|
|
@@ -2686,6 +3700,7 @@ export const FUNCTIONS = [
|
|
|
2686
3700
|
description: 'Creates a trackable redirect URL, typically used in email links.',
|
|
2687
3701
|
params: [{ name: 'url', description: 'Target URL', type: 'string' }],
|
|
2688
3702
|
returnType: 'string',
|
|
3703
|
+
returnDescription: 'A tracked URL that redirects to the supplied address.',
|
|
2689
3704
|
syntax: 'RedirectTo(url)',
|
|
2690
3705
|
example: '%%=RedirectTo(@targetUrl)=%%',
|
|
2691
3706
|
},
|
|
@@ -2696,31 +3711,38 @@ export const FUNCTIONS = [
|
|
|
2696
3711
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-string/mc-ampscript-reference-string-regex-match.html',
|
|
2697
3712
|
guideUrl: 'https://ampscript.guide/regexmatch/',
|
|
2698
3713
|
minArgs: 3,
|
|
2699
|
-
maxArgs:
|
|
3714
|
+
maxArgs: 4,
|
|
2700
3715
|
category: 'String',
|
|
2701
3716
|
description:
|
|
2702
|
-
'Tests a string against a regular expression pattern and
|
|
3717
|
+
'Tests a string against a regular expression pattern and returns first occurrence of the matching regular expression pattern.',
|
|
2703
3718
|
params: [
|
|
2704
|
-
{ name: '
|
|
2705
|
-
{ name: 'pattern', description: 'Regular expression pattern', type: 'string' },
|
|
3719
|
+
{ name: 'sourceString', description: 'String to match against', type: 'string' },
|
|
2706
3720
|
{
|
|
2707
|
-
name: '
|
|
2708
|
-
|
|
2709
|
-
mcnNotes: null,
|
|
2710
|
-
description: 'Output variable for first capture group',
|
|
3721
|
+
name: 'regExPattern',
|
|
3722
|
+
description: 'The regular expression to use in the search',
|
|
2711
3723
|
type: 'string',
|
|
2712
3724
|
},
|
|
2713
3725
|
{
|
|
2714
|
-
name: '
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
3726
|
+
name: 'returnValue',
|
|
3727
|
+
description: 'The name or ordinal of the matching group to return',
|
|
3728
|
+
type: 'string',
|
|
3729
|
+
},
|
|
3730
|
+
{
|
|
3731
|
+
name: 'regExOptions',
|
|
3732
|
+
description:
|
|
3733
|
+
'A .NET RegexOptions value to apply to the search, such as IgnoreCase or Multiline',
|
|
2718
3734
|
type: 'string',
|
|
2719
3735
|
optional: true,
|
|
2720
3736
|
},
|
|
2721
3737
|
],
|
|
2722
|
-
returnType: '
|
|
2723
|
-
|
|
3738
|
+
returnType: 'string',
|
|
3739
|
+
returnDescription: 'The matched text, or an empty string when there is no match.',
|
|
3740
|
+
syntax: 'RegExMatch(sourceString, regExPattern, returnValue[, regExOptions])',
|
|
3741
|
+
example:
|
|
3742
|
+
'Var @couponCode, @regEx, @regExMatch\n' +
|
|
3743
|
+
'Set @couponCode = "SAVE23"\n' +
|
|
3744
|
+
'Set @regEx = "^[A-Z0-9]{5,7}$"\n' +
|
|
3745
|
+
'Set @regExMatch = RegExMatch(@couponCode, @regEx, 0, "IgnoreCase")',
|
|
2724
3746
|
},
|
|
2725
3747
|
{
|
|
2726
3748
|
name: 'Replace',
|
|
@@ -2733,12 +3755,13 @@ export const FUNCTIONS = [
|
|
|
2733
3755
|
category: 'String',
|
|
2734
3756
|
description: 'Replaces all occurrences of a substring with a new value.',
|
|
2735
3757
|
params: [
|
|
2736
|
-
{ name: '
|
|
2737
|
-
{ name: '
|
|
2738
|
-
{ name: '
|
|
3758
|
+
{ name: 'sourceString', description: 'Source string', type: 'string' },
|
|
3759
|
+
{ name: 'searchSubstring', description: 'Substring to find', type: 'string' },
|
|
3760
|
+
{ name: 'replacementSubstring', description: 'Replacement string', type: 'string' },
|
|
2739
3761
|
],
|
|
2740
3762
|
returnType: 'string',
|
|
2741
|
-
|
|
3763
|
+
returnDescription: 'The string with all occurrences of the search text replaced.',
|
|
3764
|
+
syntax: 'Replace(sourceString, searchSubstring, replacementSubstring)',
|
|
2742
3765
|
example: "%%=Replace('Hello World', 'World', 'There')=%%",
|
|
2743
3766
|
},
|
|
2744
3767
|
{
|
|
@@ -2752,20 +3775,22 @@ export const FUNCTIONS = [
|
|
|
2752
3775
|
category: 'String',
|
|
2753
3776
|
description: 'Replaces multiple old values in a string with a single new value.',
|
|
2754
3777
|
params: [
|
|
2755
|
-
{ name: '
|
|
2756
|
-
{ name: '
|
|
2757
|
-
{ name: '
|
|
3778
|
+
{ name: 'sourceString', description: 'Source string', type: 'string' },
|
|
3779
|
+
{ name: 'replacementString', description: 'Replacement string', type: 'string' },
|
|
3780
|
+
{ name: 'searchString1', description: 'First value to replace', type: 'string' },
|
|
2758
3781
|
{
|
|
2759
|
-
name: '
|
|
2760
|
-
mcnSince: null,
|
|
2761
|
-
mcnNotes: null,
|
|
3782
|
+
name: 'searchStringN',
|
|
2762
3783
|
description: 'Additional value to replace',
|
|
2763
3784
|
type: 'string',
|
|
2764
3785
|
optional: true,
|
|
2765
3786
|
},
|
|
2766
3787
|
],
|
|
2767
3788
|
returnType: 'string',
|
|
2768
|
-
|
|
3789
|
+
returnDescription:
|
|
3790
|
+
'The string with every supplied search value replaced by the replacement.',
|
|
3791
|
+
repeat: [{ startIndex: 2, groupSize: 1, minGroups: 1 }],
|
|
3792
|
+
syntax: 'ReplaceList(sourceString, replacementString, searchString1[, searchStringN, ...])',
|
|
3793
|
+
example: "%%=ReplaceList('a-b/c', '_', '-', '/')=%%",
|
|
2769
3794
|
},
|
|
2770
3795
|
{
|
|
2771
3796
|
name: 'RequestParameter',
|
|
@@ -2780,7 +3805,9 @@ export const FUNCTIONS = [
|
|
|
2780
3805
|
'Returns the value of a form post or query string parameter from the current request.',
|
|
2781
3806
|
params: [{ name: 'parameterName', description: 'Parameter name', type: 'string' }],
|
|
2782
3807
|
returnType: 'string',
|
|
3808
|
+
returnDescription: 'The value of the named request parameter.',
|
|
2783
3809
|
syntax: 'RequestParameter(parameterName)',
|
|
3810
|
+
example: "%%=RequestParameter('id')=%%",
|
|
2784
3811
|
},
|
|
2785
3812
|
{
|
|
2786
3813
|
name: 'RetrieveMSCRMRecords',
|
|
@@ -2793,20 +3820,36 @@ export const FUNCTIONS = [
|
|
|
2793
3820
|
category: 'Microsoft Dynamics CRM',
|
|
2794
3821
|
description: 'Retrieves records from Dynamics CRM using a simple filter.',
|
|
2795
3822
|
params: [
|
|
2796
|
-
{ name: 'entityType', description: 'CRM entity type name', type: 'string' },
|
|
2797
3823
|
{
|
|
2798
|
-
name: '
|
|
3824
|
+
name: 'entityName',
|
|
3825
|
+
description:
|
|
3826
|
+
'The name of the Microsoft Dynamics CRM entity to retrieve records from',
|
|
3827
|
+
type: 'string',
|
|
3828
|
+
},
|
|
3829
|
+
{
|
|
3830
|
+
name: 'fieldsToRetrieve',
|
|
2799
3831
|
mcnSince: null,
|
|
2800
3832
|
mcnNotes: null,
|
|
2801
|
-
description: '
|
|
3833
|
+
description: 'A comma-separated list of fields to retrieve',
|
|
3834
|
+
type: 'string',
|
|
3835
|
+
},
|
|
3836
|
+
{
|
|
3837
|
+
name: 'queryFieldName',
|
|
3838
|
+
description: 'The name of the field to filter on',
|
|
3839
|
+
type: 'string',
|
|
3840
|
+
},
|
|
3841
|
+
{
|
|
3842
|
+
name: 'queryFieldOperator',
|
|
3843
|
+
description: 'The operator to use for the filter',
|
|
2802
3844
|
type: 'string',
|
|
2803
3845
|
},
|
|
2804
|
-
{ name: '
|
|
2805
|
-
{ name: 'filterOperator', description: 'Comparison operator', type: 'string' },
|
|
2806
|
-
{ name: 'filterValue', description: 'Filter value' },
|
|
3846
|
+
{ name: 'queryFieldValue', description: 'The value to filter on' },
|
|
2807
3847
|
],
|
|
2808
3848
|
returnType: 'rowset',
|
|
2809
|
-
|
|
3849
|
+
returnDescription: 'A rowset of matching Microsoft Dynamics CRM records.',
|
|
3850
|
+
syntax: 'RetrieveMSCRMRecords(entityName, fieldsToRetrieve, queryFieldName, queryFieldOperator, queryFieldValue)',
|
|
3851
|
+
example:
|
|
3852
|
+
"%%[ SET @rows = RetrieveMSCRMRecords('contact', 'fullname,emailaddress1', 'lastname', 'eq', 'Smith') ]%%",
|
|
2810
3853
|
},
|
|
2811
3854
|
{
|
|
2812
3855
|
name: 'RetrieveMSCRMRecordsFetchXML',
|
|
@@ -2820,7 +3863,9 @@ export const FUNCTIONS = [
|
|
|
2820
3863
|
description: 'Retrieves records from Dynamics CRM using a FetchXML query.',
|
|
2821
3864
|
params: [{ name: 'fetchXml', description: 'FetchXML query string', type: 'string' }],
|
|
2822
3865
|
returnType: 'rowset',
|
|
3866
|
+
returnDescription: 'A rowset of CRM records matching the FetchXML query.',
|
|
2823
3867
|
syntax: 'RetrieveMSCRMRecordsFetchXML(fetchXml)',
|
|
3868
|
+
example: '%%[ SET @rows = RetrieveMSCRMRecordsFetchXML(@fetchXml) ]%%',
|
|
2824
3869
|
},
|
|
2825
3870
|
{
|
|
2826
3871
|
name: 'RetrieveSalesforceJobSources',
|
|
@@ -2832,9 +3877,11 @@ export const FUNCTIONS = [
|
|
|
2832
3877
|
maxArgs: 1,
|
|
2833
3878
|
category: 'Sales and Service Cloud',
|
|
2834
3879
|
description: 'Retrieves the data sources associated with a Salesforce-triggered send job.',
|
|
2835
|
-
params: [{ name: 'jobId', description: 'Job identifier', type: '
|
|
3880
|
+
params: [{ name: 'jobId', description: 'Job identifier', type: 'number' }],
|
|
2836
3881
|
returnType: 'rowset',
|
|
3882
|
+
returnDescription: 'A rowset describing the sources of the referenced send job.',
|
|
2837
3883
|
syntax: 'RetrieveSalesforceJobSources(jobId)',
|
|
3884
|
+
example: '%%[ SET @rows = RetrieveSalesforceJobSources(@jobId) ]%%',
|
|
2838
3885
|
},
|
|
2839
3886
|
{
|
|
2840
3887
|
name: 'RetrieveSalesforceObjects',
|
|
@@ -2847,37 +3894,53 @@ export const FUNCTIONS = [
|
|
|
2847
3894
|
category: 'Sales and Service Cloud',
|
|
2848
3895
|
description: 'Retrieves records from a connected Salesforce CRM object.',
|
|
2849
3896
|
params: [
|
|
2850
|
-
{ name: 'objectType', description: 'Salesforce object API name', type: 'string' },
|
|
2851
|
-
{ name: 'fieldList', description: 'Comma-separated field names', type: 'string' },
|
|
2852
|
-
{ name: 'filterField', description: 'Filter field API name', type: 'string' },
|
|
2853
|
-
{ name: 'operator', description: 'Comparison operator (=, !=, >, <)', type: 'string' },
|
|
2854
|
-
{ name: 'filterValue', description: 'Filter value' },
|
|
2855
3897
|
{
|
|
2856
|
-
name: '
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
3898
|
+
name: 'objectName',
|
|
3899
|
+
description: 'The API name of the Salesforce object to retrieve information from',
|
|
3900
|
+
type: 'string',
|
|
3901
|
+
},
|
|
3902
|
+
{
|
|
3903
|
+
name: 'fieldsToRetrieve',
|
|
3904
|
+
description: 'A comma-separated list of fields to retrieve information from',
|
|
3905
|
+
type: 'string',
|
|
3906
|
+
},
|
|
3907
|
+
{
|
|
3908
|
+
name: 'queryFieldName1',
|
|
3909
|
+
description: 'The name of the field to filter on',
|
|
3910
|
+
type: 'string',
|
|
3911
|
+
},
|
|
3912
|
+
{
|
|
3913
|
+
name: 'queryFieldOperator1',
|
|
3914
|
+
description: 'The comparison operator to use for the filter',
|
|
3915
|
+
type: 'string',
|
|
3916
|
+
enum: ['=', '!=', '<', '<=', '>', '>=', 'like'],
|
|
3917
|
+
},
|
|
3918
|
+
{ name: 'queryFieldValue1', description: 'The value to filter on' },
|
|
3919
|
+
{
|
|
3920
|
+
name: 'queryFieldNameN',
|
|
3921
|
+
description: 'Additional filter field name (joined with AND)',
|
|
2860
3922
|
type: 'string',
|
|
2861
3923
|
optional: true,
|
|
2862
3924
|
},
|
|
2863
3925
|
{
|
|
2864
|
-
name: '
|
|
2865
|
-
|
|
2866
|
-
mcnNotes: null,
|
|
2867
|
-
description: 'Additional operator',
|
|
3926
|
+
name: 'queryFieldOperatorN',
|
|
3927
|
+
description: 'Additional comparison operator',
|
|
2868
3928
|
type: 'string',
|
|
3929
|
+
enum: ['=', '!=', '<', '<=', '>', '>=', 'like'],
|
|
2869
3930
|
optional: true,
|
|
2870
3931
|
},
|
|
2871
3932
|
{
|
|
2872
|
-
name: '
|
|
2873
|
-
mcnSince: null,
|
|
2874
|
-
mcnNotes: null,
|
|
3933
|
+
name: 'queryFieldValueN',
|
|
2875
3934
|
description: 'Additional filter value',
|
|
2876
3935
|
optional: true,
|
|
2877
3936
|
},
|
|
2878
3937
|
],
|
|
2879
3938
|
returnType: 'rowset',
|
|
2880
|
-
|
|
3939
|
+
returnDescription: 'A rowset of matching Salesforce object records.',
|
|
3940
|
+
repeat: [{ startIndex: 2, groupSize: 3, minGroups: 1 }],
|
|
3941
|
+
syntax: 'RetrieveSalesforceObjects(objectName, fieldsToRetrieve, queryFieldName1, queryFieldOperator1, queryFieldValue1[, queryFieldNameN, queryFieldOperatorN, queryFieldValueN, ...])',
|
|
3942
|
+
example:
|
|
3943
|
+
"%%[ SET @rows = RetrieveSalesforceObjects('Contact', 'Id,Email', 'LastName', '=', 'Smith') ]%%",
|
|
2881
3944
|
},
|
|
2882
3945
|
{
|
|
2883
3946
|
name: 'Row',
|
|
@@ -2894,6 +3957,7 @@ export const FUNCTIONS = [
|
|
|
2894
3957
|
{ name: 'rowIndex', description: '1-based row index', type: 'number' },
|
|
2895
3958
|
],
|
|
2896
3959
|
returnType: 'row',
|
|
3960
|
+
returnDescription: 'The row at the requested 1-based index within the rowset.',
|
|
2897
3961
|
syntax: 'Row(rowset, rowIndex)',
|
|
2898
3962
|
example: '%%=Row(@rows, 1)=%%',
|
|
2899
3963
|
},
|
|
@@ -2909,6 +3973,7 @@ export const FUNCTIONS = [
|
|
|
2909
3973
|
description: 'Returns the number of rows in a rowset.',
|
|
2910
3974
|
params: [{ name: 'rowset', description: 'Rowset to count' }],
|
|
2911
3975
|
returnType: 'number',
|
|
3976
|
+
returnDescription: 'The number of rows in the rowset.',
|
|
2912
3977
|
syntax: 'RowCount(rowset)',
|
|
2913
3978
|
example: '%%=RowCount(@rows)=%%',
|
|
2914
3979
|
},
|
|
@@ -2924,11 +3989,21 @@ export const FUNCTIONS = [
|
|
|
2924
3989
|
description: 'Sets a property value on a Marketing Cloud API object.',
|
|
2925
3990
|
params: [
|
|
2926
3991
|
{ name: 'apiObject', description: 'API object reference' },
|
|
2927
|
-
{
|
|
2928
|
-
|
|
3992
|
+
{
|
|
3993
|
+
name: 'propertyName',
|
|
3994
|
+
description: 'The name of the property to assign a value to',
|
|
3995
|
+
type: 'string',
|
|
3996
|
+
},
|
|
3997
|
+
{
|
|
3998
|
+
name: 'propertyValue',
|
|
3999
|
+
description: 'The value to assign to the property',
|
|
4000
|
+
type: 'string',
|
|
4001
|
+
},
|
|
2929
4002
|
],
|
|
2930
4003
|
returnType: 'void',
|
|
2931
|
-
|
|
4004
|
+
returnDescription: 'No value is returned; the named property is set on the object.',
|
|
4005
|
+
syntax: 'SetObjectProperty(apiObject, propertyName, propertyValue)',
|
|
4006
|
+
example: "SetObjectProperty(@apiObject, 'LastName', 'Smith')",
|
|
2932
4007
|
},
|
|
2933
4008
|
{
|
|
2934
4009
|
name: 'SetSmsConversationNextKeyword',
|
|
@@ -2945,10 +4020,12 @@ export const FUNCTIONS = [
|
|
|
2945
4020
|
{ name: 'nextKeyword', description: 'Next expected keyword', type: 'string' },
|
|
2946
4021
|
],
|
|
2947
4022
|
returnType: 'void',
|
|
4023
|
+
returnDescription: 'No value is returned; the next expected keyword is set.',
|
|
2948
4024
|
syntax: 'SetSmsConversationNextKeyword(shortCode, keyword, nextKeyword)',
|
|
4025
|
+
example: "SetSmsConversationNextKeyword('12345', 'JOIN', 'CONFIRM')",
|
|
2949
4026
|
},
|
|
2950
4027
|
{
|
|
2951
|
-
name: '
|
|
4028
|
+
name: 'SetStateMscrmRecord',
|
|
2952
4029
|
mcnSince: null,
|
|
2953
4030
|
mcnNotes: null,
|
|
2954
4031
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-mscrm/mc-ampscript-reference-microsoft-dynamics-crm-set-state-record.html',
|
|
@@ -2958,13 +4035,33 @@ export const FUNCTIONS = [
|
|
|
2958
4035
|
category: 'Microsoft Dynamics CRM',
|
|
2959
4036
|
description: 'Sets the state and status of a Dynamics CRM record.',
|
|
2960
4037
|
params: [
|
|
2961
|
-
{
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
4038
|
+
{
|
|
4039
|
+
name: 'recordGuid',
|
|
4040
|
+
description: 'The GUID of the record to set the state and status of',
|
|
4041
|
+
type: 'string',
|
|
4042
|
+
},
|
|
4043
|
+
{
|
|
4044
|
+
name: 'entityName',
|
|
4045
|
+
description: 'The name of the Microsoft Dynamics CRM entity',
|
|
4046
|
+
type: 'string',
|
|
4047
|
+
},
|
|
4048
|
+
{
|
|
4049
|
+
name: 'stateToSet',
|
|
4050
|
+
description: 'The state to set for the record.',
|
|
4051
|
+
type: 'string',
|
|
4052
|
+
enum: ['active', 'inactive'],
|
|
4053
|
+
},
|
|
4054
|
+
{
|
|
4055
|
+
name: 'statusToSet',
|
|
4056
|
+
description: 'The status to set for the record.',
|
|
4057
|
+
type: 'number',
|
|
4058
|
+
enum: [0, 1, -1],
|
|
4059
|
+
},
|
|
2965
4060
|
],
|
|
2966
4061
|
returnType: 'void',
|
|
2967
|
-
|
|
4062
|
+
returnDescription: 'No value is returned; the record state and status are updated.',
|
|
4063
|
+
syntax: 'SetStateMscrmRecord(recordGuid, entityName, stateToSet, statusToSet)',
|
|
4064
|
+
example: "SetStateMscrmRecord(@guid, 'contact', 'active', 1)",
|
|
2968
4065
|
},
|
|
2969
4066
|
{
|
|
2970
4067
|
name: 'SHA1',
|
|
@@ -2977,18 +4074,22 @@ export const FUNCTIONS = [
|
|
|
2977
4074
|
category: 'Encryption and Encoding',
|
|
2978
4075
|
description: 'Returns the SHA-1 hash of the input value.',
|
|
2979
4076
|
params: [
|
|
2980
|
-
{ name: '
|
|
4077
|
+
{ name: 'stringToConvert', description: 'The string to encode', type: 'string' },
|
|
2981
4078
|
{
|
|
2982
|
-
name: '
|
|
4079
|
+
name: 'charSet',
|
|
2983
4080
|
mcnSince: null,
|
|
2984
4081
|
mcnNotes: null,
|
|
2985
|
-
description: '
|
|
4082
|
+
description: 'Character set to use for the encoding',
|
|
2986
4083
|
type: 'string',
|
|
4084
|
+
enum: ['UTF-8', 'UTF-16'],
|
|
2987
4085
|
optional: true,
|
|
4086
|
+
default: 'UTF-8',
|
|
2988
4087
|
},
|
|
2989
4088
|
],
|
|
2990
4089
|
returnType: 'string',
|
|
2991
|
-
|
|
4090
|
+
returnDescription: 'The SHA-1 hash of the input as a hexadecimal string.',
|
|
4091
|
+
syntax: 'SHA1(stringToConvert[, charSet])',
|
|
4092
|
+
example: "%%=SHA1('This is a string of text.')=%%",
|
|
2992
4093
|
},
|
|
2993
4094
|
{
|
|
2994
4095
|
name: 'SHA256',
|
|
@@ -3001,19 +4102,22 @@ export const FUNCTIONS = [
|
|
|
3001
4102
|
category: 'Encryption and Encoding',
|
|
3002
4103
|
description: 'Returns the SHA-256 hash of the input value.',
|
|
3003
4104
|
params: [
|
|
3004
|
-
{ name: '
|
|
4105
|
+
{ name: 'stringToConvert', description: 'The string to encode', type: 'string' },
|
|
3005
4106
|
{
|
|
3006
|
-
name: '
|
|
4107
|
+
name: 'charSet',
|
|
3007
4108
|
mcnSince: null,
|
|
3008
4109
|
mcnNotes: null,
|
|
3009
|
-
description: '
|
|
4110
|
+
description: 'Character set to use for the encoding',
|
|
3010
4111
|
type: 'string',
|
|
4112
|
+
enum: ['UTF-8', 'UTF-16'],
|
|
3011
4113
|
optional: true,
|
|
4114
|
+
default: 'UTF-8',
|
|
3012
4115
|
},
|
|
3013
4116
|
],
|
|
3014
4117
|
returnType: 'string',
|
|
3015
|
-
|
|
3016
|
-
|
|
4118
|
+
returnDescription: 'The SHA-256 hash of the input as a hexadecimal string.',
|
|
4119
|
+
syntax: 'SHA256(stringToConvert[, charSet])',
|
|
4120
|
+
example: '%%=SHA256("This is a string of text.")=%%',
|
|
3017
4121
|
},
|
|
3018
4122
|
{
|
|
3019
4123
|
name: 'SHA512',
|
|
@@ -3026,36 +4130,39 @@ export const FUNCTIONS = [
|
|
|
3026
4130
|
category: 'Encryption and Encoding',
|
|
3027
4131
|
description: 'Returns the SHA-512 hash of the input value.',
|
|
3028
4132
|
params: [
|
|
3029
|
-
{ name: '
|
|
4133
|
+
{ name: 'stringToConvert', description: 'The string to encode', type: 'string' },
|
|
3030
4134
|
{
|
|
3031
|
-
name: '
|
|
4135
|
+
name: 'charSet',
|
|
3032
4136
|
mcnSince: null,
|
|
3033
4137
|
mcnNotes: null,
|
|
3034
|
-
description: '
|
|
4138
|
+
description: 'Character set to use for the encoding',
|
|
3035
4139
|
type: 'string',
|
|
4140
|
+
enum: ['UTF-8', 'UTF-16'],
|
|
3036
4141
|
optional: true,
|
|
4142
|
+
default: 'UTF-8',
|
|
3037
4143
|
},
|
|
3038
4144
|
],
|
|
3039
4145
|
returnType: 'string',
|
|
3040
|
-
|
|
4146
|
+
returnDescription: 'The SHA-512 hash of the input as a hexadecimal string.',
|
|
4147
|
+
syntax: 'SHA512(stringToConvert[, charSet])',
|
|
4148
|
+
example: "%%=SHA512('This is a string of text.')=%%",
|
|
3041
4149
|
},
|
|
3042
4150
|
{
|
|
3043
4151
|
name: 'StringToDate',
|
|
3044
4152
|
mcnSince: 67,
|
|
3045
4153
|
mcnNotes:
|
|
3046
|
-
'In MCN, returns a locale-formatted string (G standard format, e.g. "5/15/2026 1:23:45 PM") instead of a dateTime object. Cannot be reliably passed to FormatDate() or other date functions in MCN
|
|
4154
|
+
'In MCN, returns a locale-formatted string (G standard format, e.g. "5/15/2026 1:23:45 PM") instead of a dateTime object. Cannot be reliably passed to FormatDate() or other date functions in MCN - use FormatDate() directly instead.',
|
|
3047
4155
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-date-time/mc-ampscript-reference-date-time-string-to-date.html',
|
|
3048
4156
|
guideUrl: 'https://ampscript.guide/stringtodate/',
|
|
3049
4157
|
minArgs: 1,
|
|
3050
|
-
maxArgs:
|
|
4158
|
+
maxArgs: 1,
|
|
3051
4159
|
category: 'Date and Time',
|
|
3052
|
-
description: 'Converts a date string to a date value
|
|
3053
|
-
params: [
|
|
3054
|
-
{ name: 'dateString', description: 'String to convert', type: 'string' },
|
|
3055
|
-
{ name: 'format', description: 'Date format pattern', type: 'string', optional: true },
|
|
3056
|
-
],
|
|
4160
|
+
description: 'Converts a date string to a date value.',
|
|
4161
|
+
params: [{ name: 'dateString', description: 'String to convert', type: 'string' }],
|
|
3057
4162
|
returnType: 'date',
|
|
3058
|
-
|
|
4163
|
+
returnDescription: 'The date value parsed from the supplied string.',
|
|
4164
|
+
syntax: 'StringToDate(dateString)',
|
|
4165
|
+
example: "%%=StringToDate('2026-01-15')=%%",
|
|
3059
4166
|
},
|
|
3060
4167
|
{
|
|
3061
4168
|
name: 'StringToHex',
|
|
@@ -3068,11 +4175,24 @@ export const FUNCTIONS = [
|
|
|
3068
4175
|
category: 'Encryption and Encoding',
|
|
3069
4176
|
description: 'Converts a string to its hexadecimal representation.',
|
|
3070
4177
|
params: [
|
|
3071
|
-
{
|
|
3072
|
-
|
|
4178
|
+
{
|
|
4179
|
+
name: 'sourceString',
|
|
4180
|
+
description: 'The string to convert to hexadecimal character codes',
|
|
4181
|
+
type: 'string',
|
|
4182
|
+
},
|
|
4183
|
+
{
|
|
4184
|
+
name: 'charSet',
|
|
4185
|
+
description: 'Character set to use for encoding',
|
|
4186
|
+
type: 'string',
|
|
4187
|
+
enum: ['UTF-8', 'UTF-16'],
|
|
4188
|
+
optional: true,
|
|
4189
|
+
default: 'UTF-8',
|
|
4190
|
+
},
|
|
3073
4191
|
],
|
|
3074
4192
|
returnType: 'string',
|
|
3075
|
-
|
|
4193
|
+
returnDescription: 'The hexadecimal representation of the input string.',
|
|
4194
|
+
syntax: 'StringToHex(sourceString[, charSet])',
|
|
4195
|
+
example: "%%=StringToHex('AB')=%%",
|
|
3076
4196
|
},
|
|
3077
4197
|
{
|
|
3078
4198
|
name: 'Substring',
|
|
@@ -3086,10 +4206,10 @@ export const FUNCTIONS = [
|
|
|
3086
4206
|
description:
|
|
3087
4207
|
'Extracts a portion of a string starting at the given index for the specified length.',
|
|
3088
4208
|
params: [
|
|
3089
|
-
{ name: '
|
|
3090
|
-
{ name: '
|
|
4209
|
+
{ name: 'sourceString', description: 'Source string', type: 'string' },
|
|
4210
|
+
{ name: 'startPosition', description: '1-based start position', type: 'number' },
|
|
3091
4211
|
{
|
|
3092
|
-
name: '
|
|
4212
|
+
name: 'substringLength',
|
|
3093
4213
|
mcnSince: 67,
|
|
3094
4214
|
mcnNotes: null,
|
|
3095
4215
|
description:
|
|
@@ -3099,7 +4219,8 @@ export const FUNCTIONS = [
|
|
|
3099
4219
|
},
|
|
3100
4220
|
],
|
|
3101
4221
|
returnType: 'string',
|
|
3102
|
-
|
|
4222
|
+
returnDescription: 'The requested portion of the string.',
|
|
4223
|
+
syntax: 'Substring(sourceString, startPosition[, substringLength])',
|
|
3103
4224
|
example: "%%=Substring('Hello World', 1, 5)=%%",
|
|
3104
4225
|
},
|
|
3105
4226
|
{
|
|
@@ -3113,11 +4234,12 @@ export const FUNCTIONS = [
|
|
|
3113
4234
|
category: 'Math',
|
|
3114
4235
|
description: 'Computes the difference between two numeric values.',
|
|
3115
4236
|
params: [
|
|
3116
|
-
{ name: '
|
|
3117
|
-
{ name: '
|
|
4237
|
+
{ name: 'minuend', description: 'Value to subtract from', type: 'number' },
|
|
4238
|
+
{ name: 'subtrahend', description: 'Value to subtract', type: 'number' },
|
|
3118
4239
|
],
|
|
3119
4240
|
returnType: 'number',
|
|
3120
|
-
|
|
4241
|
+
returnDescription: 'The difference of the two operands.',
|
|
4242
|
+
syntax: 'Subtract(minuend, subtrahend)',
|
|
3121
4243
|
example: '%%=Subtract(50, 15)=%%',
|
|
3122
4244
|
},
|
|
3123
4245
|
{
|
|
@@ -3131,9 +4253,17 @@ export const FUNCTIONS = [
|
|
|
3131
4253
|
category: 'Date and Time',
|
|
3132
4254
|
description:
|
|
3133
4255
|
"Converts a Marketing Cloud system date (Central Time) to the subscriber's local time.",
|
|
3134
|
-
params: [
|
|
3135
|
-
|
|
3136
|
-
|
|
4256
|
+
params: [
|
|
4257
|
+
{
|
|
4258
|
+
name: 'systemTime',
|
|
4259
|
+
description: 'The system time value that you want to convert to local time',
|
|
4260
|
+
type: 'string',
|
|
4261
|
+
},
|
|
4262
|
+
],
|
|
4263
|
+
returnType: 'string',
|
|
4264
|
+
returnDescription: 'The supplied system (account) time converted to local time.',
|
|
4265
|
+
syntax: 'SystemDateToLocalDate(systemTime)',
|
|
4266
|
+
example: '%%=SystemDateToLocalDate(Now())=%%',
|
|
3137
4267
|
},
|
|
3138
4268
|
{
|
|
3139
4269
|
name: 'TransformXML',
|
|
@@ -3146,11 +4276,13 @@ export const FUNCTIONS = [
|
|
|
3146
4276
|
category: 'Content',
|
|
3147
4277
|
description: 'Transforms an XML document using an XSLT stylesheet.',
|
|
3148
4278
|
params: [
|
|
3149
|
-
{ name: '
|
|
3150
|
-
{ name: '
|
|
4279
|
+
{ name: 'xmlDocument', description: 'XML document string', type: 'string' },
|
|
4280
|
+
{ name: 'xslDocument', description: 'XSLT stylesheet string', type: 'string' },
|
|
3151
4281
|
],
|
|
3152
4282
|
returnType: 'string',
|
|
3153
|
-
|
|
4283
|
+
returnDescription: 'The result of applying the XSL transform to the XML document.',
|
|
4284
|
+
syntax: 'TransformXML(xmlDocument, xslDocument)',
|
|
4285
|
+
example: '%%=TransformXML(@xml, @xsl)=%%',
|
|
3154
4286
|
},
|
|
3155
4287
|
{
|
|
3156
4288
|
name: 'TreatAsContent',
|
|
@@ -3165,7 +4297,7 @@ export const FUNCTIONS = [
|
|
|
3165
4297
|
'Evaluates a string as AMPscript content, rendering any embedded AMPscript expressions.',
|
|
3166
4298
|
params: [
|
|
3167
4299
|
{
|
|
3168
|
-
name: '
|
|
4300
|
+
name: 'stringToReturn',
|
|
3169
4301
|
mcnSince: null,
|
|
3170
4302
|
mcnNotes: null,
|
|
3171
4303
|
description: 'String containing AMPscript to evaluate',
|
|
@@ -3173,7 +4305,9 @@ export const FUNCTIONS = [
|
|
|
3173
4305
|
},
|
|
3174
4306
|
],
|
|
3175
4307
|
returnType: 'string',
|
|
3176
|
-
|
|
4308
|
+
returnDescription: 'The supplied string rendered as AMPscript content.',
|
|
4309
|
+
syntax: 'TreatAsContent(stringToReturn)',
|
|
4310
|
+
example: '%%=TreatAsContent(@dynamicContent)=%%',
|
|
3177
4311
|
},
|
|
3178
4312
|
{
|
|
3179
4313
|
name: 'TreatAsContentArea',
|
|
@@ -3187,8 +4321,8 @@ export const FUNCTIONS = [
|
|
|
3187
4321
|
description:
|
|
3188
4322
|
'Treats a string as a content area, optionally assigning it to an impression region.',
|
|
3189
4323
|
params: [
|
|
3190
|
-
{ name: '
|
|
3191
|
-
{ name: '
|
|
4324
|
+
{ name: 'contentKey', description: 'Content area key identifier', type: 'string' },
|
|
4325
|
+
{ name: 'contentValue', description: 'HTML/AMPscript content', type: 'string' },
|
|
3192
4326
|
{
|
|
3193
4327
|
name: 'impressionRegion',
|
|
3194
4328
|
mcnSince: null,
|
|
@@ -3199,7 +4333,9 @@ export const FUNCTIONS = [
|
|
|
3199
4333
|
},
|
|
3200
4334
|
],
|
|
3201
4335
|
returnType: 'string',
|
|
3202
|
-
|
|
4336
|
+
returnDescription: 'The supplied value rendered as a content area.',
|
|
4337
|
+
syntax: 'TreatAsContentArea(contentKey, contentValue[, impressionRegion])',
|
|
4338
|
+
example: "%%=TreatAsContentArea('region-key', @content)=%%",
|
|
3203
4339
|
},
|
|
3204
4340
|
{
|
|
3205
4341
|
name: 'Trim',
|
|
@@ -3211,9 +4347,10 @@ export const FUNCTIONS = [
|
|
|
3211
4347
|
maxArgs: 1,
|
|
3212
4348
|
category: 'String',
|
|
3213
4349
|
description: 'Removes leading and trailing whitespace from a string.',
|
|
3214
|
-
params: [{ name: '
|
|
4350
|
+
params: [{ name: 'sourceString', description: 'String to trim', type: 'string' }],
|
|
3215
4351
|
returnType: 'string',
|
|
3216
|
-
|
|
4352
|
+
returnDescription: 'The string with leading and trailing whitespace removed.',
|
|
4353
|
+
syntax: 'Trim(sourceString)',
|
|
3217
4354
|
example: "%%=Trim(' hello ')=%%",
|
|
3218
4355
|
},
|
|
3219
4356
|
{
|
|
@@ -3226,39 +4363,124 @@ export const FUNCTIONS = [
|
|
|
3226
4363
|
maxArgs: INF,
|
|
3227
4364
|
category: 'Data Extension',
|
|
3228
4365
|
description:
|
|
3229
|
-
'Updates existing rows in a data extension that match the specified
|
|
4366
|
+
'Updates existing rows in a data extension that match the specified search columns. Returns the number of rows updated.',
|
|
3230
4367
|
params: [
|
|
3231
|
-
{
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
{
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
{
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
4368
|
+
{
|
|
4369
|
+
name: 'dataExt',
|
|
4370
|
+
description: 'The name of the data extension that contains the data to update',
|
|
4371
|
+
type: 'string',
|
|
4372
|
+
},
|
|
4373
|
+
{
|
|
4374
|
+
name: 'columnValuePairs',
|
|
4375
|
+
description:
|
|
4376
|
+
'The number of column and value pairs for the function to match against',
|
|
4377
|
+
type: 'number',
|
|
4378
|
+
},
|
|
4379
|
+
{
|
|
4380
|
+
name: 'searchColumnName1',
|
|
4381
|
+
description: 'The name of a column to search for the data to update',
|
|
4382
|
+
type: 'string',
|
|
4383
|
+
},
|
|
4384
|
+
{ name: 'searchValue1', description: 'The value that identifies the row to update' },
|
|
4385
|
+
{
|
|
4386
|
+
name: 'searchColumnNameN',
|
|
4387
|
+
description: 'Additional search column name (count given by columnValuePairs)',
|
|
4388
|
+
type: 'string',
|
|
4389
|
+
optional: true,
|
|
4390
|
+
},
|
|
4391
|
+
{
|
|
4392
|
+
name: 'searchValueN',
|
|
4393
|
+
description: 'Additional search value (count given by columnValuePairs)',
|
|
4394
|
+
optional: true,
|
|
4395
|
+
},
|
|
4396
|
+
{
|
|
4397
|
+
name: 'columnToUpdate1',
|
|
4398
|
+
description: 'The column that contains the data to update',
|
|
4399
|
+
type: 'string',
|
|
4400
|
+
},
|
|
4401
|
+
{ name: 'updatedValue1', description: 'The data to update in the specified column' },
|
|
4402
|
+
{
|
|
4403
|
+
name: 'columnToUpdateN',
|
|
4404
|
+
description: 'Additional column to update',
|
|
4405
|
+
type: 'string',
|
|
4406
|
+
optional: true,
|
|
4407
|
+
},
|
|
4408
|
+
{ name: 'updatedValueN', description: 'Additional value to update', optional: true },
|
|
4409
|
+
],
|
|
4410
|
+
returnType: 'number',
|
|
4411
|
+
returnDescription: 'The number of rows updated.',
|
|
4412
|
+
repeat: [
|
|
4413
|
+
{ startIndex: 2, groupSize: 2, minGroups: 1, countParam: 'columnValuePairs' },
|
|
4414
|
+
{ startIndex: 4, groupSize: 2, minGroups: 1 },
|
|
4415
|
+
],
|
|
4416
|
+
syntax: 'UpdateData(dataExt, columnValuePairs, searchColumnName1, searchValue1[, searchColumnNameN, searchValueN, ...], columnToUpdate1, updatedValue1[, columnToUpdateN, updatedValueN, ...])',
|
|
4417
|
+
example:
|
|
4418
|
+
"%%=UpdateData('Subscribers', 1, 'SubscriberKey', _subscriberkey, 'Status', 'Active')=%%",
|
|
4419
|
+
},
|
|
4420
|
+
{
|
|
4421
|
+
name: 'UpdateDE',
|
|
4422
|
+
mcnSince: null,
|
|
4423
|
+
mcnNotes: null,
|
|
4424
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-data-extension/mc-ampscript-reference-data-extension-update-de.html',
|
|
4425
|
+
guideUrl: 'https://ampscript.guide/updatede/',
|
|
4426
|
+
minArgs: 6,
|
|
4427
|
+
maxArgs: INF,
|
|
4428
|
+
category: 'Data Extension',
|
|
4429
|
+
description:
|
|
4430
|
+
'Updates existing rows in a data extension. Email-context variant of UpdateData. Returns the number of rows updated.',
|
|
4431
|
+
params: [
|
|
4432
|
+
{
|
|
4433
|
+
name: 'dataExt',
|
|
4434
|
+
description: 'The name of the data extension that contains the data to update',
|
|
4435
|
+
type: 'string',
|
|
4436
|
+
},
|
|
4437
|
+
{
|
|
4438
|
+
name: 'columnValuePairs',
|
|
4439
|
+
description:
|
|
4440
|
+
'The number of column and value pairs for the function to match against',
|
|
4441
|
+
type: 'number',
|
|
4442
|
+
},
|
|
4443
|
+
{
|
|
4444
|
+
name: 'searchColumnName1',
|
|
4445
|
+
description: 'The name of a column to search for the data to update',
|
|
4446
|
+
type: 'string',
|
|
4447
|
+
},
|
|
4448
|
+
{ name: 'searchValue1', description: 'The value that identifies the row to update' },
|
|
4449
|
+
{
|
|
4450
|
+
name: 'searchColumnNameN',
|
|
4451
|
+
description: 'Additional search column name (count given by columnValuePairs)',
|
|
4452
|
+
type: 'string',
|
|
4453
|
+
optional: true,
|
|
4454
|
+
},
|
|
4455
|
+
{
|
|
4456
|
+
name: 'searchValueN',
|
|
4457
|
+
description: 'Additional search value (count given by columnValuePairs)',
|
|
4458
|
+
optional: true,
|
|
4459
|
+
},
|
|
4460
|
+
{
|
|
4461
|
+
name: 'columnToUpdate1',
|
|
4462
|
+
description: 'The column that contains the data to update',
|
|
4463
|
+
type: 'string',
|
|
4464
|
+
},
|
|
4465
|
+
{ name: 'updatedValue1', description: 'The data to update in the specified column' },
|
|
4466
|
+
{
|
|
4467
|
+
name: 'columnToUpdateN',
|
|
4468
|
+
description: 'Additional column to update',
|
|
4469
|
+
type: 'string',
|
|
4470
|
+
optional: true,
|
|
4471
|
+
},
|
|
4472
|
+
{ name: 'updatedValueN', description: 'Additional value to update', optional: true },
|
|
4473
|
+
],
|
|
4474
|
+
returnType: 'number',
|
|
4475
|
+
returnDescription: 'The number of rows updated.',
|
|
4476
|
+
repeat: [
|
|
4477
|
+
{ startIndex: 2, groupSize: 2, minGroups: 1, countParam: 'columnValuePairs' },
|
|
4478
|
+
{ startIndex: 4, groupSize: 2, minGroups: 1 },
|
|
4479
|
+
],
|
|
4480
|
+
syntax: 'UpdateDE(dataExt, columnValuePairs, searchColumnName1, searchValue1[, searchColumnNameN, searchValueN, ...], columnToUpdate1, updatedValue1[, columnToUpdateN, updatedValueN, ...])',
|
|
4481
|
+
example:
|
|
4482
|
+
"%%=UpdateDE('Subscribers', 1, 'SubscriberKey', _subscriberkey, 'Status', 'Active')=%%",
|
|
4483
|
+
},
|
|
3262
4484
|
{
|
|
3263
4485
|
name: 'UpdateMSCRMRecords',
|
|
3264
4486
|
mcnSince: null,
|
|
@@ -3266,17 +4488,46 @@ export const FUNCTIONS = [
|
|
|
3266
4488
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-mscrm/mc-ampscript-reference-microsoft-dynamics-crm-update-records.html',
|
|
3267
4489
|
guideUrl: 'https://ampscript.guide/updatemscrmrecords/',
|
|
3268
4490
|
minArgs: 4,
|
|
3269
|
-
maxArgs:
|
|
4491
|
+
maxArgs: INF,
|
|
3270
4492
|
category: 'Microsoft Dynamics CRM',
|
|
3271
|
-
description:
|
|
4493
|
+
description:
|
|
4494
|
+
'Updates one or more records in a Microsoft Dynamics CRM entity, and returns the number of successfully updated records.',
|
|
3272
4495
|
params: [
|
|
3273
|
-
{
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
4496
|
+
{
|
|
4497
|
+
name: 'entityName',
|
|
4498
|
+
description:
|
|
4499
|
+
'The name of the Microsoft Dynamics CRM entity that contains the records to update',
|
|
4500
|
+
type: 'string',
|
|
4501
|
+
},
|
|
4502
|
+
{
|
|
4503
|
+
name: 'guidsToUpdate',
|
|
4504
|
+
description: 'A comma-separated list of GUIDs to update',
|
|
4505
|
+
type: 'string',
|
|
4506
|
+
},
|
|
4507
|
+
{
|
|
4508
|
+
name: 'attributeName1',
|
|
4509
|
+
description: 'The name of the attribute to update on the target records',
|
|
4510
|
+
type: 'string',
|
|
4511
|
+
},
|
|
4512
|
+
{
|
|
4513
|
+
name: 'attributeValue1',
|
|
4514
|
+
description: 'The attribute value to update on the target records',
|
|
4515
|
+
},
|
|
4516
|
+
{
|
|
4517
|
+
name: 'attributeNameN',
|
|
4518
|
+
mcnSince: null,
|
|
4519
|
+
mcnNotes: null,
|
|
4520
|
+
description: 'Additional attribute name',
|
|
4521
|
+
type: 'string',
|
|
4522
|
+
optional: true,
|
|
4523
|
+
},
|
|
4524
|
+
{ name: 'attributeValueN', description: 'Additional attribute value', optional: true },
|
|
3277
4525
|
],
|
|
3278
|
-
returnType: '
|
|
3279
|
-
|
|
4526
|
+
returnType: 'number',
|
|
4527
|
+
returnDescription: 'The number of Microsoft Dynamics CRM records updated.',
|
|
4528
|
+
repeat: [{ startIndex: 2, groupSize: 2, minGroups: 1 }],
|
|
4529
|
+
syntax: 'UpdateMSCRMRecords(entityName, guidsToUpdate, attributeName1, attributeValue1[, attributeNameN, attributeValueN, ...])',
|
|
4530
|
+
example: "%%=UpdateMSCRMRecords('contact', @guids, 'lastname', 'Smith')=%%",
|
|
3280
4531
|
},
|
|
3281
4532
|
{
|
|
3282
4533
|
name: 'UpdateSingleSalesforceObject',
|
|
@@ -3287,24 +4538,35 @@ export const FUNCTIONS = [
|
|
|
3287
4538
|
minArgs: 4,
|
|
3288
4539
|
maxArgs: INF,
|
|
3289
4540
|
category: 'Sales and Service Cloud',
|
|
3290
|
-
description:
|
|
4541
|
+
description:
|
|
4542
|
+
'Updates a single record in a connected Salesforce CRM object. Accepts one or more field name and value pairs. Returns 1 on success, 0 otherwise.',
|
|
3291
4543
|
params: [
|
|
3292
|
-
{ name: 'objectType', description: 'Salesforce object API name', type: 'string' },
|
|
3293
|
-
{ name: 'objectId', description: 'Record ID to update', type: 'string' },
|
|
3294
|
-
{ name: 'field1', description: 'First field API name to update', type: 'string' },
|
|
3295
|
-
{ name: 'value1', description: 'First field value' },
|
|
3296
4544
|
{
|
|
3297
|
-
name: '
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
4545
|
+
name: 'objectName',
|
|
4546
|
+
description: 'The API name of the Salesforce object to update',
|
|
4547
|
+
type: 'string',
|
|
4548
|
+
},
|
|
4549
|
+
{ name: 'idToUpdate', description: 'The ID of the record to update', type: 'string' },
|
|
4550
|
+
{
|
|
4551
|
+
name: 'fieldName1',
|
|
4552
|
+
description: 'The name of the first field to update',
|
|
4553
|
+
type: 'string',
|
|
4554
|
+
},
|
|
4555
|
+
{ name: 'fieldValue1', description: 'The value to assign to the first named field' },
|
|
4556
|
+
{
|
|
4557
|
+
name: 'fieldNameN',
|
|
4558
|
+
description: 'Additional field name',
|
|
3301
4559
|
type: 'string',
|
|
3302
4560
|
optional: true,
|
|
3303
4561
|
},
|
|
3304
|
-
{ name: '
|
|
4562
|
+
{ name: 'fieldValueN', description: 'Additional field value', optional: true },
|
|
3305
4563
|
],
|
|
3306
4564
|
returnType: 'number',
|
|
3307
|
-
|
|
4565
|
+
returnDescription: '1 when the record was updated successfully, otherwise 0.',
|
|
4566
|
+
returnEnum: [0, 1],
|
|
4567
|
+
repeat: [{ startIndex: 2, groupSize: 2, minGroups: 1 }],
|
|
4568
|
+
syntax: 'UpdateSingleSalesforceObject(objectName, idToUpdate, fieldName1, fieldValue1[, fieldNameN, fieldValueN, ...])',
|
|
4569
|
+
example: "%%=UpdateSingleSalesforceObject('Contact', @recordId, 'LastName', 'Smith')=%%",
|
|
3308
4570
|
},
|
|
3309
4571
|
{
|
|
3310
4572
|
name: 'Uppercase',
|
|
@@ -3316,9 +4578,10 @@ export const FUNCTIONS = [
|
|
|
3316
4578
|
maxArgs: 1,
|
|
3317
4579
|
category: 'String',
|
|
3318
4580
|
description: 'Converts a string to all uppercase characters.',
|
|
3319
|
-
params: [{ name: '
|
|
4581
|
+
params: [{ name: 'sourceString', description: 'String to convert', type: 'string' }],
|
|
3320
4582
|
returnType: 'string',
|
|
3321
|
-
|
|
4583
|
+
returnDescription: 'The string converted to upper case.',
|
|
4584
|
+
syntax: 'Uppercase(sourceString)',
|
|
3322
4585
|
example: "%%=Uppercase('hello')=%%",
|
|
3323
4586
|
},
|
|
3324
4587
|
{
|
|
@@ -3330,25 +4593,50 @@ export const FUNCTIONS = [
|
|
|
3330
4593
|
minArgs: 5,
|
|
3331
4594
|
maxArgs: INF,
|
|
3332
4595
|
category: 'MobileConnect',
|
|
3333
|
-
description:
|
|
4596
|
+
description:
|
|
4597
|
+
'Upserts attributes into a contact record. If the contact exists it is updated; otherwise a new contact is created.',
|
|
3334
4598
|
params: [
|
|
3335
|
-
{ name: 'apiKeyName', description: 'Push API key name', type: 'string' },
|
|
3336
|
-
{ name: 'keyField', description: 'Contact key field name', type: 'string' },
|
|
3337
|
-
{ name: 'keyValue', description: 'Contact key value' },
|
|
3338
|
-
{ name: 'field1', description: 'First attribute name', type: 'string' },
|
|
3339
|
-
{ name: 'value1', description: 'First attribute value' },
|
|
3340
4599
|
{
|
|
3341
|
-
name: '
|
|
4600
|
+
name: 'channel',
|
|
4601
|
+
description: "The contact channel. The only supported value is 'mobile'",
|
|
4602
|
+
type: 'string',
|
|
4603
|
+
},
|
|
4604
|
+
{
|
|
4605
|
+
name: 'attribute',
|
|
4606
|
+
description:
|
|
4607
|
+
"The attribute to use to match the contact. The only supported value is 'phone'",
|
|
4608
|
+
type: 'string',
|
|
4609
|
+
},
|
|
4610
|
+
{
|
|
4611
|
+
name: 'phoneNumber',
|
|
4612
|
+
description: 'The phone number of the contact, including the country code',
|
|
4613
|
+
type: 'number',
|
|
4614
|
+
},
|
|
4615
|
+
{
|
|
4616
|
+
name: 'keyToUpsert1',
|
|
4617
|
+
description: 'The name of the attribute to upsert',
|
|
4618
|
+
type: 'string',
|
|
4619
|
+
},
|
|
4620
|
+
{
|
|
4621
|
+
name: 'valueToUpsert1',
|
|
4622
|
+
description: 'The value of the attribute to upsert',
|
|
4623
|
+
type: 'string',
|
|
4624
|
+
},
|
|
4625
|
+
{
|
|
4626
|
+
name: 'keyToUpsertN',
|
|
3342
4627
|
mcnSince: null,
|
|
3343
4628
|
mcnNotes: null,
|
|
3344
4629
|
description: 'Additional attribute name',
|
|
3345
4630
|
type: 'string',
|
|
3346
4631
|
optional: true,
|
|
3347
4632
|
},
|
|
3348
|
-
{ name: '
|
|
4633
|
+
{ name: 'valueToUpsertN', description: 'Additional attribute value', optional: true },
|
|
3349
4634
|
],
|
|
3350
|
-
returnType: '
|
|
3351
|
-
|
|
4635
|
+
returnType: 'number',
|
|
4636
|
+
returnDescription: 'The number of contact records created or updated.',
|
|
4637
|
+
repeat: [{ startIndex: 3, groupSize: 2, minGroups: 1 }],
|
|
4638
|
+
syntax: 'UpsertContact(channel, attribute, phoneNumber, keyToUpsert1, valueToUpsert1[, keyToUpsertN, valueToUpsertN, ...])',
|
|
4639
|
+
example: "%%=UpsertContact('SMS', 'phone', '+17182097651', 'FirstName', 'Curt')=%%",
|
|
3352
4640
|
},
|
|
3353
4641
|
{
|
|
3354
4642
|
name: 'UpsertData',
|
|
@@ -3360,17 +4648,69 @@ export const FUNCTIONS = [
|
|
|
3360
4648
|
maxArgs: INF,
|
|
3361
4649
|
category: 'Data Extension',
|
|
3362
4650
|
description:
|
|
3363
|
-
'
|
|
4651
|
+
'Updates a row in a data extension if matching columns and values are found, or inserts a row if no matches are found. Returns the number of rows affected.',
|
|
3364
4652
|
params: [
|
|
3365
|
-
{
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
{
|
|
4653
|
+
{
|
|
4654
|
+
name: 'dataExt',
|
|
4655
|
+
description: 'The name of the data extension to update or insert data into',
|
|
4656
|
+
type: 'string',
|
|
4657
|
+
},
|
|
4658
|
+
{
|
|
4659
|
+
name: 'columnValuePairs',
|
|
4660
|
+
description:
|
|
4661
|
+
'The number of column and value pairs for the function to match against',
|
|
4662
|
+
type: 'number',
|
|
4663
|
+
},
|
|
4664
|
+
{
|
|
4665
|
+
name: 'searchColumnName1',
|
|
4666
|
+
description: 'The name of the column to search',
|
|
4667
|
+
type: 'string',
|
|
4668
|
+
},
|
|
4669
|
+
{
|
|
4670
|
+
name: 'searchValue1',
|
|
4671
|
+
description: 'The value that identifies the row to update or insert',
|
|
4672
|
+
},
|
|
4673
|
+
{
|
|
4674
|
+
name: 'searchColumnNameN',
|
|
4675
|
+
description: 'Additional search column name (count given by columnValuePairs)',
|
|
4676
|
+
type: 'string',
|
|
4677
|
+
optional: true,
|
|
4678
|
+
},
|
|
4679
|
+
{
|
|
4680
|
+
name: 'searchValueN',
|
|
4681
|
+
description: 'Additional search value (count given by columnValuePairs)',
|
|
4682
|
+
optional: true,
|
|
4683
|
+
},
|
|
4684
|
+
{
|
|
4685
|
+
name: 'columnToUpsert1',
|
|
4686
|
+
description: 'The column to update or insert data into',
|
|
4687
|
+
type: 'string',
|
|
4688
|
+
},
|
|
4689
|
+
{
|
|
4690
|
+
name: 'upsertedValue1',
|
|
4691
|
+
description: 'The value to update or insert into the specified column',
|
|
4692
|
+
},
|
|
4693
|
+
{
|
|
4694
|
+
name: 'columnToUpsertN',
|
|
4695
|
+
description: 'Additional column to update or insert',
|
|
4696
|
+
type: 'string',
|
|
4697
|
+
optional: true,
|
|
4698
|
+
},
|
|
4699
|
+
{
|
|
4700
|
+
name: 'upsertedValueN',
|
|
4701
|
+
description: 'Additional value to update or insert',
|
|
4702
|
+
optional: true,
|
|
4703
|
+
},
|
|
3371
4704
|
],
|
|
3372
4705
|
returnType: 'number',
|
|
3373
|
-
|
|
4706
|
+
returnDescription: 'The number of rows inserted or updated.',
|
|
4707
|
+
repeat: [
|
|
4708
|
+
{ startIndex: 2, groupSize: 2, minGroups: 1, countParam: 'columnValuePairs' },
|
|
4709
|
+
{ startIndex: 4, groupSize: 2, minGroups: 1 },
|
|
4710
|
+
],
|
|
4711
|
+
syntax: 'UpsertData(dataExt, columnValuePairs, searchColumnName1, searchValue1[, searchColumnNameN, searchValueN, ...], columnToUpsert1, upsertedValue1[, columnToUpsertN, upsertedValueN, ...])',
|
|
4712
|
+
example:
|
|
4713
|
+
"%%=UpsertData('Subscribers', 1, 'SubscriberKey', _subscriberkey, 'Status', 'Active')=%%",
|
|
3374
4714
|
},
|
|
3375
4715
|
{
|
|
3376
4716
|
name: 'UpsertDE',
|
|
@@ -3381,17 +4721,70 @@ export const FUNCTIONS = [
|
|
|
3381
4721
|
minArgs: 6,
|
|
3382
4722
|
maxArgs: INF,
|
|
3383
4723
|
category: 'Data Extension',
|
|
3384
|
-
description:
|
|
4724
|
+
description:
|
|
4725
|
+
'Updates or inserts a row in a data extension. Email-context variant of UpsertData. Returns the number of rows affected.',
|
|
3385
4726
|
params: [
|
|
3386
|
-
{
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
{
|
|
4727
|
+
{
|
|
4728
|
+
name: 'dataExt',
|
|
4729
|
+
description: 'The name of the data extension to update or insert data into',
|
|
4730
|
+
type: 'string',
|
|
4731
|
+
},
|
|
4732
|
+
{
|
|
4733
|
+
name: 'columnValuePairs',
|
|
4734
|
+
description:
|
|
4735
|
+
'The number of column and value pairs for the function to match against',
|
|
4736
|
+
type: 'number',
|
|
4737
|
+
},
|
|
4738
|
+
{
|
|
4739
|
+
name: 'searchColumnName1',
|
|
4740
|
+
description: 'The name of the column to search',
|
|
4741
|
+
type: 'string',
|
|
4742
|
+
},
|
|
4743
|
+
{
|
|
4744
|
+
name: 'searchValue1',
|
|
4745
|
+
description: 'The value that identifies the row to update or insert',
|
|
4746
|
+
},
|
|
4747
|
+
{
|
|
4748
|
+
name: 'searchColumnNameN',
|
|
4749
|
+
description: 'Additional search column name (count given by columnValuePairs)',
|
|
4750
|
+
type: 'string',
|
|
4751
|
+
optional: true,
|
|
4752
|
+
},
|
|
4753
|
+
{
|
|
4754
|
+
name: 'searchValueN',
|
|
4755
|
+
description: 'Additional search value (count given by columnValuePairs)',
|
|
4756
|
+
optional: true,
|
|
4757
|
+
},
|
|
4758
|
+
{
|
|
4759
|
+
name: 'columnToUpsert1',
|
|
4760
|
+
description: 'The column to update or insert data into',
|
|
4761
|
+
type: 'string',
|
|
4762
|
+
},
|
|
4763
|
+
{
|
|
4764
|
+
name: 'upsertedValue1',
|
|
4765
|
+
description: 'The value to update or insert into the specified column',
|
|
4766
|
+
},
|
|
4767
|
+
{
|
|
4768
|
+
name: 'columnToUpsertN',
|
|
4769
|
+
description: 'Additional column to update or insert',
|
|
4770
|
+
type: 'string',
|
|
4771
|
+
optional: true,
|
|
4772
|
+
},
|
|
4773
|
+
{
|
|
4774
|
+
name: 'upsertedValueN',
|
|
4775
|
+
description: 'Additional value to update or insert',
|
|
4776
|
+
optional: true,
|
|
4777
|
+
},
|
|
3392
4778
|
],
|
|
3393
4779
|
returnType: 'number',
|
|
3394
|
-
|
|
4780
|
+
returnDescription: 'The number of rows inserted or updated.',
|
|
4781
|
+
repeat: [
|
|
4782
|
+
{ startIndex: 2, groupSize: 2, minGroups: 1, countParam: 'columnValuePairs' },
|
|
4783
|
+
{ startIndex: 4, groupSize: 2, minGroups: 1 },
|
|
4784
|
+
],
|
|
4785
|
+
syntax: 'UpsertDE(dataExt, columnValuePairs, searchColumnName1, searchValue1[, searchColumnNameN, searchValueN, ...], columnToUpsert1, upsertedValue1[, columnToUpsertN, upsertedValueN, ...])',
|
|
4786
|
+
example:
|
|
4787
|
+
"%%=UpsertDE('Subscribers', 1, 'SubscriberKey', _subscriberkey, 'Status', 'Active')=%%",
|
|
3395
4788
|
},
|
|
3396
4789
|
{
|
|
3397
4790
|
name: 'UpsertMSCRMRecord',
|
|
@@ -3402,26 +4795,62 @@ export const FUNCTIONS = [
|
|
|
3402
4795
|
minArgs: 9,
|
|
3403
4796
|
maxArgs: 9,
|
|
3404
4797
|
category: 'Microsoft Dynamics CRM',
|
|
3405
|
-
description:
|
|
4798
|
+
description:
|
|
4799
|
+
'Upserts a Microsoft Dynamics CRM record. Updates the matched record or creates one if no match is found. Returns the GUID of the record.',
|
|
3406
4800
|
params: [
|
|
3407
|
-
{ name: 'entityType', description: 'CRM entity type name', type: 'string' },
|
|
3408
4801
|
{
|
|
3409
|
-
name: '
|
|
4802
|
+
name: 'entityName',
|
|
4803
|
+
description: 'The name of the Microsoft Dynamics CRM entity to upsert',
|
|
4804
|
+
type: 'string',
|
|
4805
|
+
},
|
|
4806
|
+
{
|
|
4807
|
+
name: 'sortField',
|
|
3410
4808
|
mcnSince: null,
|
|
3411
4809
|
mcnNotes: null,
|
|
3412
|
-
description: '
|
|
4810
|
+
description: 'The field to sort the retrieve results on',
|
|
4811
|
+
type: 'string',
|
|
4812
|
+
},
|
|
4813
|
+
{
|
|
4814
|
+
name: 'sortType',
|
|
4815
|
+
description: 'The order to sort retrieve results. Accepted values: ASC or DESC',
|
|
4816
|
+
type: 'string',
|
|
4817
|
+
},
|
|
4818
|
+
{
|
|
4819
|
+
name: 'numPairsForRetrieve',
|
|
4820
|
+
description: 'The number of name-value pairs used to retrieve results',
|
|
4821
|
+
type: 'number',
|
|
4822
|
+
},
|
|
4823
|
+
{
|
|
4824
|
+
name: 'filterAttributeName',
|
|
4825
|
+
description: 'The name of the attribute to filter the target entity by',
|
|
4826
|
+
type: 'string',
|
|
4827
|
+
},
|
|
4828
|
+
{
|
|
4829
|
+
name: 'filterAttributeValue',
|
|
4830
|
+
description: 'The value of the attribute to filter the target entity by',
|
|
4831
|
+
type: 'string',
|
|
4832
|
+
},
|
|
4833
|
+
{
|
|
4834
|
+
name: 'numPairsForUpdate',
|
|
4835
|
+
description: 'The number of name-value pairs used to update records',
|
|
4836
|
+
type: 'number',
|
|
4837
|
+
},
|
|
4838
|
+
{
|
|
4839
|
+
name: 'updateAttributeName',
|
|
4840
|
+
description: 'The name of the attribute to update in the target entity',
|
|
4841
|
+
type: 'string',
|
|
4842
|
+
},
|
|
4843
|
+
{
|
|
4844
|
+
name: 'updateAttributeValue',
|
|
4845
|
+
description: 'The value of the attribute to update in the target entity',
|
|
3413
4846
|
type: 'string',
|
|
3414
4847
|
},
|
|
3415
|
-
{ name: 'matchValue', description: 'Value to match on', type: 'string' },
|
|
3416
|
-
{ name: 'returnField1', description: 'First return field name', type: 'string' },
|
|
3417
|
-
{ name: 'returnField2', description: 'Second return field name', type: 'string' },
|
|
3418
|
-
{ name: 'field1', description: 'First field name to set', type: 'string' },
|
|
3419
|
-
{ name: 'value1', description: 'First field value' },
|
|
3420
|
-
{ name: 'field2', description: 'Second field name to set', type: 'string' },
|
|
3421
|
-
{ name: 'value2', description: 'Second field value' },
|
|
3422
4848
|
],
|
|
3423
4849
|
returnType: 'string',
|
|
3424
|
-
|
|
4850
|
+
returnDescription: 'The GUID of the created or updated Microsoft Dynamics CRM record.',
|
|
4851
|
+
syntax: 'UpsertMSCRMRecord(entityName, sortField, sortType, numPairsForRetrieve, filterAttributeName, filterAttributeValue, numPairsForUpdate, updateAttributeName, updateAttributeValue)',
|
|
4852
|
+
example:
|
|
4853
|
+
"%%=UpsertMSCRMRecord('contact', 'createdon', 'DESC', 1, 'emailaddress1', @email, 1, 'lastname', 'Smith')=%%",
|
|
3425
4854
|
},
|
|
3426
4855
|
{
|
|
3427
4856
|
name: 'URLEncode',
|
|
@@ -3434,21 +4863,51 @@ export const FUNCTIONS = [
|
|
|
3434
4863
|
category: 'Encryption and Encoding',
|
|
3435
4864
|
description: 'URL-encodes a string for safe inclusion in a URL.',
|
|
3436
4865
|
params: [
|
|
3437
|
-
{ name: 'url', description: 'String to encode', type: 'string' },
|
|
3438
4866
|
{
|
|
3439
|
-
name: '
|
|
4867
|
+
name: 'urlToEncode',
|
|
4868
|
+
description: 'The string to convert to a format that is safe to include in URLs',
|
|
4869
|
+
type: 'string',
|
|
4870
|
+
},
|
|
4871
|
+
{
|
|
4872
|
+
name: 'encodeAllChars',
|
|
3440
4873
|
mcnSince: null,
|
|
3441
4874
|
mcnNotes: null,
|
|
3442
|
-
description:
|
|
4875
|
+
description:
|
|
4876
|
+
'If true, the function converts all spaces and non-ASCII characters in a URL parameter string to their hexadecimal character codes. If false, the function only converts spaces in a URL parameter string to the hexadecimal character code %20, and leaves other characters unchanged. The default value is false',
|
|
4877
|
+
type: 'boolean',
|
|
4878
|
+
optional: true,
|
|
4879
|
+
default: false,
|
|
4880
|
+
},
|
|
4881
|
+
{
|
|
4882
|
+
name: 'encodeAllStrings',
|
|
4883
|
+
description:
|
|
4884
|
+
'If true, the function converts any text string that you pass as the first parameter into a version that is safe to use in URLs. If false, the function only converts a string into a URL-safe version if the unsafe characters are part of a URL parameter string.',
|
|
3443
4885
|
type: 'boolean',
|
|
3444
4886
|
optional: true,
|
|
3445
4887
|
},
|
|
3446
|
-
{ name: 'encoding', description: 'Character encoding', type: 'string', optional: true },
|
|
3447
4888
|
],
|
|
3448
4889
|
returnType: 'string',
|
|
3449
|
-
|
|
4890
|
+
returnDescription: 'The URL-encoded representation of the input.',
|
|
4891
|
+
syntax: 'URLEncode(urlToEncode[, encodeAllChars, encodeAllStrings])',
|
|
3450
4892
|
example: "%%=URLEncode('hello world')=%%",
|
|
3451
4893
|
},
|
|
4894
|
+
{
|
|
4895
|
+
name: 'Verb',
|
|
4896
|
+
mcnSince: null,
|
|
4897
|
+
mcnNotes: null,
|
|
4898
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sms/mc-ampscript-reference-sms-verb.html',
|
|
4899
|
+
guideUrl: 'https://ampscript.guide/mobileconnect-data-strings/',
|
|
4900
|
+
minArgs: 0,
|
|
4901
|
+
maxArgs: 0,
|
|
4902
|
+
category: 'MobileConnect',
|
|
4903
|
+
description:
|
|
4904
|
+
'Returns the keyword (verb) from an inbound mobile-originated (MO) message. Only usable in MobileConnect, chained off Msg(0). Takes no arguments.',
|
|
4905
|
+
params: [],
|
|
4906
|
+
returnType: 'string',
|
|
4907
|
+
returnDescription: 'The keyword (first word) of the inbound mobile-originated message.',
|
|
4908
|
+
syntax: 'Msg(0).Verb',
|
|
4909
|
+
example: '%%=Msg(0).Verb=%%',
|
|
4910
|
+
},
|
|
3452
4911
|
{
|
|
3453
4912
|
name: 'v',
|
|
3454
4913
|
mcnSince: 67,
|
|
@@ -3462,6 +4921,7 @@ export const FUNCTIONS = [
|
|
|
3462
4921
|
'Short alias for retrieving a variable value inline. Equivalent to %%=v(@var)=%%.',
|
|
3463
4922
|
params: [{ name: 'variableName', description: 'Variable reference' }],
|
|
3464
4923
|
returnType: 'string',
|
|
4924
|
+
returnDescription: 'The value of the referenced variable as a string.',
|
|
3465
4925
|
syntax: 'v(variableName)',
|
|
3466
4926
|
example: '%%=v(@myVar)=%%',
|
|
3467
4927
|
},
|
|
@@ -3471,16 +4931,35 @@ export const FUNCTIONS = [
|
|
|
3471
4931
|
mcnNotes: null,
|
|
3472
4932
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-content/mc-ampscript-reference-content-wat.html',
|
|
3473
4933
|
guideUrl: 'https://ampscript.guide/wat/',
|
|
3474
|
-
minArgs:
|
|
4934
|
+
minArgs: 2,
|
|
3475
4935
|
maxArgs: INF,
|
|
3476
4936
|
category: 'Utility',
|
|
3477
|
-
description:
|
|
4937
|
+
description:
|
|
4938
|
+
'Returns the values of the Web Analytics Tracking (WAT) parameter set with the specified external key, substituting the supplied values for the matching WATP references in the Sender Profile tracking parameter.',
|
|
3478
4939
|
params: [
|
|
3479
|
-
{
|
|
3480
|
-
|
|
4940
|
+
{
|
|
4941
|
+
name: 'parameterSetKey',
|
|
4942
|
+
description: 'The external key of the WAT parameter set',
|
|
4943
|
+
type: 'string',
|
|
4944
|
+
},
|
|
4945
|
+
{
|
|
4946
|
+
name: 'parameterValue1',
|
|
4947
|
+
description: 'Value used to replace the WATP(1) tracking parameter reference',
|
|
4948
|
+
type: 'string',
|
|
4949
|
+
},
|
|
4950
|
+
{
|
|
4951
|
+
name: 'parameterValueN',
|
|
4952
|
+
description: 'Additional value used to replace the WATP(N) reference',
|
|
4953
|
+
type: 'string',
|
|
4954
|
+
optional: true,
|
|
4955
|
+
},
|
|
3481
4956
|
],
|
|
3482
4957
|
returnType: 'string',
|
|
3483
|
-
|
|
4958
|
+
returnDescription:
|
|
4959
|
+
'The resolved Web Analytics tracking parameter value with the supplied substitutions applied.',
|
|
4960
|
+
repeat: [{ startIndex: 1, groupSize: 1, minGroups: 1 }],
|
|
4961
|
+
syntax: 'WAT(parameterSetKey, parameterValue1[, parameterValueN, ...])',
|
|
4962
|
+
example: "%%=WAT('Omniture', '1234', '5678')=%%",
|
|
3484
4963
|
},
|
|
3485
4964
|
{
|
|
3486
4965
|
name: 'WATP',
|
|
@@ -3491,10 +4970,20 @@ export const FUNCTIONS = [
|
|
|
3491
4970
|
minArgs: 1,
|
|
3492
4971
|
maxArgs: 1,
|
|
3493
4972
|
category: 'Utility',
|
|
3494
|
-
description:
|
|
3495
|
-
|
|
4973
|
+
description:
|
|
4974
|
+
'Ordinal placeholder for a parameter value configured in a WAT parameter set. The ordinal maps to the position of the value passed to the WAT function. Configured by Marketing Cloud Support as part of the WAT string.',
|
|
4975
|
+
params: [
|
|
4976
|
+
{
|
|
4977
|
+
name: 'ordinal',
|
|
4978
|
+
description: 'The position of the parameter value within the WAT string (1-based)',
|
|
4979
|
+
type: 'number',
|
|
4980
|
+
},
|
|
4981
|
+
],
|
|
3496
4982
|
returnType: 'string',
|
|
3497
|
-
|
|
4983
|
+
returnDescription:
|
|
4984
|
+
'The parameter value supplied to the WAT function at the given ordinal position.',
|
|
4985
|
+
syntax: 'WATP(ordinal)',
|
|
4986
|
+
example: '%%=urlencode(WATP(1))=%%',
|
|
3498
4987
|
},
|
|
3499
4988
|
{
|
|
3500
4989
|
name: 'WrapLongURL',
|
|
@@ -3508,7 +4997,9 @@ export const FUNCTIONS = [
|
|
|
3508
4997
|
description: 'Wraps a long URL to prevent line-break issues in email clients.',
|
|
3509
4998
|
params: [{ name: 'url', description: 'Long URL to wrap', type: 'string' }],
|
|
3510
4999
|
returnType: 'string',
|
|
5000
|
+
returnDescription: 'A shortened, wrapped form of the supplied long URL.',
|
|
3511
5001
|
syntax: 'WrapLongURL(url)',
|
|
5002
|
+
example: "%%=WrapLongURL('https://example.com/a/very/long/path')=%%",
|
|
3512
5003
|
},
|
|
3513
5004
|
];
|
|
3514
5005
|
|
|
@@ -3571,7 +5062,7 @@ export function getMcnApiVersion(name) {
|
|
|
3571
5062
|
* Cloud Next (i.e. mcnSince is a non-null API version number).
|
|
3572
5063
|
*
|
|
3573
5064
|
* @param {string} name - AMPscript function name (case-insensitive).
|
|
3574
|
-
* @returns {boolean}
|
|
5065
|
+
* @returns {boolean} True when the function is supported in Marketing Cloud Next.
|
|
3575
5066
|
*/
|
|
3576
5067
|
export function isMcnSupported(name) {
|
|
3577
5068
|
return getMcnApiVersion(name) !== null;
|
|
@@ -3589,85 +5080,64 @@ export function getMcnNotes(name) {
|
|
|
3589
5080
|
}
|
|
3590
5081
|
|
|
3591
5082
|
// ── Deprecated functions ─────────────────────────────────────────────────────
|
|
3592
|
-
//
|
|
3593
|
-
//
|
|
5083
|
+
// Deprecation metadata lives inline on each FUNCTIONS entry via the
|
|
5084
|
+
// `deprecated`, `deprecatedReplacement`, and `deprecatedReason` fields. The
|
|
5085
|
+
// lookup below is derived from those flags for consumers that need a quick
|
|
5086
|
+
// name -> entry map of deprecated functions.
|
|
3594
5087
|
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
5088
|
+
/** Case-insensitive lookup of deprecated functions: lowercase name -> function entry */
|
|
5089
|
+
export const deprecatedFunctionLookup = new Map(
|
|
5090
|
+
FUNCTIONS.filter((f) => f.deprecated).map((f) => [f.name.toLowerCase(), f]),
|
|
5091
|
+
);
|
|
5092
|
+
|
|
5093
|
+
// ── Keywords ─────────────────────────────────────────────────────────────────
|
|
5094
|
+
|
|
5095
|
+
/**
|
|
5096
|
+
* AMPscript language keyword with completion metadata.
|
|
5097
|
+
* - `name` the keyword as written in source
|
|
5098
|
+
* - `description` short human-readable explanation
|
|
5099
|
+
* - `snippet` completion body with `${n:placeholder}` tab stops
|
|
5100
|
+
*
|
|
5101
|
+
* @type {{name: string, description: string, snippet: string}[]}
|
|
5102
|
+
*/
|
|
5103
|
+
export const AMPSCRIPT_KEYWORDS = [
|
|
3610
5104
|
{
|
|
3611
|
-
name: '
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
replacement: 'UpdateData',
|
|
3615
|
-
reason: 'UpdateDE is a legacy alias for UpdateData.',
|
|
5105
|
+
name: 'var',
|
|
5106
|
+
description: 'Declares one or more variables',
|
|
5107
|
+
snippet: 'var @${1:variableName}',
|
|
3616
5108
|
},
|
|
3617
5109
|
{
|
|
3618
|
-
name: '
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
replacement: 'UpsertData',
|
|
3622
|
-
reason: 'UpsertDE is a legacy alias for UpsertData.',
|
|
5110
|
+
name: 'set',
|
|
5111
|
+
description: 'Assigns a value to a variable',
|
|
5112
|
+
snippet: 'set @${1:variableName} = ${2:value}',
|
|
3623
5113
|
},
|
|
3624
5114
|
{
|
|
3625
|
-
name: '
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
replacement: 'DeleteData',
|
|
3629
|
-
reason: 'DeleteDE is a legacy alias for DeleteData.',
|
|
5115
|
+
name: 'if',
|
|
5116
|
+
description: 'Begins a conditional block',
|
|
5117
|
+
snippet: 'if ${1:condition} then\n\t${2}\nendif',
|
|
3630
5118
|
},
|
|
5119
|
+
{ name: 'then', description: 'Follows an if/elseif condition', snippet: 'then' },
|
|
3631
5120
|
{
|
|
3632
|
-
name: '
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
replacement: 'ContentBlockByKey or ContentBlockByName',
|
|
3636
|
-
reason: 'ContentArea references classic content areas which are being phased out in favor of Content Builder.',
|
|
5121
|
+
name: 'elseif',
|
|
5122
|
+
description: 'Additional condition in an if block',
|
|
5123
|
+
snippet: 'elseif ${1:condition} then',
|
|
3637
5124
|
},
|
|
5125
|
+
{ name: 'else', description: 'Fallback branch in an if block', snippet: 'else' },
|
|
5126
|
+
{ name: 'endif', description: 'Closes an if block', snippet: 'endif' },
|
|
3638
5127
|
{
|
|
3639
|
-
name: '
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
replacement: 'ContentBlockByName',
|
|
3643
|
-
reason: 'ContentAreaByName references classic content areas which are being phased out.',
|
|
5128
|
+
name: 'for',
|
|
5129
|
+
description: 'Begins a counting loop',
|
|
5130
|
+
snippet: 'for @${1:i} = ${2:1} to ${3:rowCount} do\n\t${4}\nnext @${1:i}',
|
|
3644
5131
|
},
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
'var',
|
|
3655
|
-
'set',
|
|
3656
|
-
'if',
|
|
3657
|
-
'then',
|
|
3658
|
-
'elseif',
|
|
3659
|
-
'else',
|
|
3660
|
-
'endif',
|
|
3661
|
-
'for',
|
|
3662
|
-
'to',
|
|
3663
|
-
'downto',
|
|
3664
|
-
'do',
|
|
3665
|
-
'next',
|
|
3666
|
-
'and',
|
|
3667
|
-
'or',
|
|
3668
|
-
'not',
|
|
3669
|
-
'true',
|
|
3670
|
-
'false',
|
|
5132
|
+
{ name: 'to', description: 'Ascending direction in a for loop', snippet: 'to' },
|
|
5133
|
+
{ name: 'downto', description: 'Descending direction in a for loop', snippet: 'downto' },
|
|
5134
|
+
{ name: 'do', description: 'Marks the start of a loop body', snippet: 'do' },
|
|
5135
|
+
{ name: 'next', description: 'Ends a for loop iteration', snippet: 'next' },
|
|
5136
|
+
{ name: 'and', description: 'Logical AND operator', snippet: 'and' },
|
|
5137
|
+
{ name: 'or', description: 'Logical OR operator', snippet: 'or' },
|
|
5138
|
+
{ name: 'not', description: 'Logical NOT operator', snippet: 'not' },
|
|
5139
|
+
{ name: 'true', description: 'Boolean true constant', snippet: 'true' },
|
|
5140
|
+
{ name: 'false', description: 'Boolean false constant', snippet: 'false' },
|
|
3671
5141
|
];
|
|
3672
5142
|
|
|
3673
5143
|
// ── Personalization strings ──────────────────────────────────────────────────
|