ampscript-data 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +2051 -632
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',
|
|
@@ -77,31 +110,66 @@ export const FUNCTIONS = [
|
|
|
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)',
|
|
501
690
|
type: 'string',
|
|
502
691
|
},
|
|
503
|
-
{ name: 'returnColumn', description: 'Column whose value to return', type: 'string' },
|
|
504
692
|
{
|
|
505
|
-
name: '
|
|
693
|
+
name: 'returnValueColumn',
|
|
694
|
+
description: 'The name of the column that contains the data to return',
|
|
695
|
+
type: 'string',
|
|
696
|
+
},
|
|
697
|
+
{
|
|
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: '
|
|
1384
|
+
name: 'dateString',
|
|
1385
|
+
description: 'A string that contains a date or timestamp',
|
|
1386
|
+
type: 'string',
|
|
1387
|
+
},
|
|
1388
|
+
{
|
|
1389
|
+
name: 'useUtc',
|
|
1022
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',
|
|
@@ -1725,9 +2346,25 @@ export const FUNCTIONS = [
|
|
|
1725
2346
|
},
|
|
1726
2347
|
{ name: 'headerName1', description: 'First request header name', type: 'string' },
|
|
1727
2348
|
{ name: 'headerValue1', description: 'First request header value', type: 'string' },
|
|
2349
|
+
{
|
|
2350
|
+
name: 'headerNameN',
|
|
2351
|
+
description: 'Additional request header name',
|
|
2352
|
+
type: 'string',
|
|
2353
|
+
optional: true,
|
|
2354
|
+
},
|
|
2355
|
+
{
|
|
2356
|
+
name: 'headerValueN',
|
|
2357
|
+
description: 'Additional request header value',
|
|
2358
|
+
type: 'string',
|
|
2359
|
+
optional: true,
|
|
2360
|
+
},
|
|
1728
2361
|
],
|
|
1729
2362
|
returnType: 'number',
|
|
1730
|
-
|
|
2363
|
+
returnDescription: 'The HTTP status code of the POST request.',
|
|
2364
|
+
repeat: [{ startIndex: 5, groupSize: 2, minGroups: 1 }],
|
|
2365
|
+
syntax: 'HTTPPost2(url, contentType, payload, @response, @responseHeaders, headerName1, headerValue1[, headerNameN, headerValueN, ...])',
|
|
2366
|
+
example:
|
|
2367
|
+
"%%=HTTPPost2('https://example.com/api', 'application/json', @payload, @response, @responseHeaders)=%%",
|
|
1731
2368
|
},
|
|
1732
2369
|
{
|
|
1733
2370
|
name: 'HTTPPostWithRetry',
|
|
@@ -1735,33 +2372,87 @@ export const FUNCTIONS = [
|
|
|
1735
2372
|
mcnNotes: null,
|
|
1736
2373
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-http/mc-ampscript-reference-http-post-with-retry.html',
|
|
1737
2374
|
guideUrl: 'https://ampscript.guide/httppostwithretry/',
|
|
1738
|
-
minArgs:
|
|
2375
|
+
minArgs: 3,
|
|
1739
2376
|
maxArgs: INF,
|
|
1740
2377
|
category: 'HTTP',
|
|
1741
|
-
description:
|
|
2378
|
+
description:
|
|
2379
|
+
'Posts content to the specified URL with automatic retry logic on failure. Similar to HTTPPost2 but adds configurable retries and rescheduling.',
|
|
1742
2380
|
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' },
|
|
2381
|
+
{ name: 'urlEndpoint', description: 'The URL to send the content to', type: 'string' },
|
|
1747
2382
|
{
|
|
1748
|
-
name: '
|
|
1749
|
-
|
|
1750
|
-
mcnNotes: null,
|
|
1751
|
-
description: 'Output variable for response headers',
|
|
2383
|
+
name: 'contentTypeHeader',
|
|
2384
|
+
description: 'The content-type header to use in the POST request',
|
|
1752
2385
|
type: 'string',
|
|
1753
2386
|
},
|
|
1754
|
-
{ name: 'maxRetries', description: 'Maximum number of retry attempts', type: 'number' },
|
|
1755
2387
|
{
|
|
1756
|
-
name: '
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
2388
|
+
name: 'content',
|
|
2389
|
+
description: 'The content to send to the specified URL in the POST request',
|
|
2390
|
+
type: 'string',
|
|
2391
|
+
},
|
|
2392
|
+
{
|
|
2393
|
+
name: 'numRetries',
|
|
2394
|
+
description: 'The number of times the request can be retried',
|
|
1760
2395
|
type: 'number',
|
|
2396
|
+
optional: true,
|
|
2397
|
+
default: 3,
|
|
2398
|
+
},
|
|
2399
|
+
{
|
|
2400
|
+
name: 'reschedule',
|
|
2401
|
+
description:
|
|
2402
|
+
'Whether the request is rescheduled (retried after 15 minutes) if it still fails after all retries',
|
|
2403
|
+
type: 'boolean',
|
|
2404
|
+
optional: true,
|
|
2405
|
+
default: false,
|
|
2406
|
+
},
|
|
2407
|
+
{
|
|
2408
|
+
name: 'returnExceptionOnError',
|
|
2409
|
+
description:
|
|
2410
|
+
'If true, raise an exception on error; if false, continue after an error',
|
|
2411
|
+
type: 'boolean',
|
|
2412
|
+
optional: true,
|
|
2413
|
+
},
|
|
2414
|
+
{
|
|
2415
|
+
name: 'responseStatus',
|
|
2416
|
+
description: 'An AMPscript variable that stores the status of the POST request',
|
|
2417
|
+
type: 'string',
|
|
2418
|
+
optional: true,
|
|
2419
|
+
},
|
|
2420
|
+
{
|
|
2421
|
+
name: 'responseContentRowset',
|
|
2422
|
+
description: 'An AMPscript variable that stores the response content as a rowset',
|
|
2423
|
+
type: 'rowset',
|
|
2424
|
+
optional: true,
|
|
2425
|
+
},
|
|
2426
|
+
{
|
|
2427
|
+
name: 'headerName1',
|
|
2428
|
+
description: 'The name of an additional header to include in the request',
|
|
2429
|
+
type: 'string',
|
|
2430
|
+
optional: true,
|
|
2431
|
+
},
|
|
2432
|
+
{
|
|
2433
|
+
name: 'headerValue1',
|
|
2434
|
+
description: 'The value of an additional header to include in the request',
|
|
2435
|
+
type: 'string',
|
|
2436
|
+
optional: true,
|
|
2437
|
+
},
|
|
2438
|
+
{
|
|
2439
|
+
name: 'headerNameN',
|
|
2440
|
+
description: 'The name of a further additional header',
|
|
2441
|
+
type: 'string',
|
|
2442
|
+
optional: true,
|
|
2443
|
+
},
|
|
2444
|
+
{
|
|
2445
|
+
name: 'headerValueN',
|
|
2446
|
+
description: 'The value of a further additional header',
|
|
2447
|
+
type: 'string',
|
|
2448
|
+
optional: true,
|
|
1761
2449
|
},
|
|
1762
2450
|
],
|
|
1763
2451
|
returnType: 'number',
|
|
1764
|
-
|
|
2452
|
+
returnDescription: 'The HTTP status code of the POST request.',
|
|
2453
|
+
repeat: [{ startIndex: 8, groupSize: 2, minGroups: 0 }],
|
|
2454
|
+
syntax: 'HTTPPostWithRetry(urlEndpoint, contentTypeHeader, content[, numRetries, reschedule, returnExceptionOnError, @responseStatus, @responseContentRowset, headerName1, headerValue1, headerNameN, headerValueN, ...])',
|
|
2455
|
+
example: "%%=HTTPPostWithRetry('https://example.com/api', 'application/json', @payload)=%%",
|
|
1765
2456
|
},
|
|
1766
2457
|
{
|
|
1767
2458
|
name: 'HTTPRequestHeader',
|
|
@@ -1774,9 +2465,16 @@ export const FUNCTIONS = [
|
|
|
1774
2465
|
category: 'HTTP',
|
|
1775
2466
|
description:
|
|
1776
2467
|
'Returns the value of a specified HTTP request header from the inbound request.',
|
|
1777
|
-
params: [
|
|
2468
|
+
params: [
|
|
2469
|
+
{
|
|
2470
|
+
name: 'headerToRetrieve',
|
|
2471
|
+
description: 'The header that you want to retrieve',
|
|
2472
|
+
type: 'string',
|
|
2473
|
+
},
|
|
2474
|
+
],
|
|
1778
2475
|
returnType: 'string',
|
|
1779
|
-
|
|
2476
|
+
returnDescription: 'The value of the named HTTP request header.',
|
|
2477
|
+
syntax: 'HTTPRequestHeader(headerToRetrieve)',
|
|
1780
2478
|
example: "%%=HTTPRequestHeader('X-Forwarded-For')=%%",
|
|
1781
2479
|
},
|
|
1782
2480
|
{
|
|
@@ -1795,6 +2493,8 @@ export const FUNCTIONS = [
|
|
|
1795
2493
|
{ name: 'falseValue', description: 'Value returned when false' },
|
|
1796
2494
|
],
|
|
1797
2495
|
returnType: 'string',
|
|
2496
|
+
returnDescription:
|
|
2497
|
+
'The second argument when the condition is true, otherwise the third argument.',
|
|
1798
2498
|
syntax: 'IIf(expression, trueValue, falseValue)',
|
|
1799
2499
|
example: "%%=IIf(Empty(@name), 'Friend', @name)=%%",
|
|
1800
2500
|
},
|
|
@@ -1804,30 +2504,32 @@ export const FUNCTIONS = [
|
|
|
1804
2504
|
mcnNotes: null,
|
|
1805
2505
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-content/mc-ampscript-reference-content-image.html',
|
|
1806
2506
|
guideUrl: 'https://ampscript.guide/image/',
|
|
1807
|
-
minArgs:
|
|
2507
|
+
minArgs: 1,
|
|
1808
2508
|
maxArgs: 2,
|
|
1809
2509
|
category: 'Content',
|
|
1810
2510
|
description:
|
|
1811
|
-
'Returns an HTML img tag for the Portfolio image matching the specified
|
|
2511
|
+
'Returns an HTML img tag for the Portfolio image matching the specified external key.',
|
|
1812
2512
|
params: [
|
|
1813
2513
|
{
|
|
1814
|
-
name: '
|
|
2514
|
+
name: 'imageExternalKey',
|
|
1815
2515
|
mcnSince: null,
|
|
1816
2516
|
mcnNotes: null,
|
|
1817
|
-
description: '
|
|
2517
|
+
description: 'External key of an image in your Portfolio',
|
|
1818
2518
|
type: 'string',
|
|
1819
2519
|
},
|
|
1820
2520
|
{
|
|
1821
|
-
name: '
|
|
2521
|
+
name: 'defaultImageExternalKey',
|
|
1822
2522
|
mcnSince: null,
|
|
1823
2523
|
mcnNotes: null,
|
|
1824
|
-
description:
|
|
1825
|
-
'Customer/external key of the fallback image if the primary is not found',
|
|
2524
|
+
description: 'External key of a fallback image used if the primary is not found',
|
|
1826
2525
|
type: 'string',
|
|
2526
|
+
optional: true,
|
|
1827
2527
|
},
|
|
1828
2528
|
],
|
|
1829
2529
|
returnType: 'string',
|
|
1830
|
-
|
|
2530
|
+
returnDescription: 'An HTML img tag for the referenced image.',
|
|
2531
|
+
syntax: 'Image(imageExternalKey[, defaultImageExternalKey])',
|
|
2532
|
+
example: "%%=Image('CorpLogo', 'DefaultImage')=%%",
|
|
1831
2533
|
},
|
|
1832
2534
|
{
|
|
1833
2535
|
name: 'IndexOf',
|
|
@@ -1840,11 +2542,12 @@ export const FUNCTIONS = [
|
|
|
1840
2542
|
category: 'String',
|
|
1841
2543
|
description: 'Returns the 1-based position of the first occurrence of a substring.',
|
|
1842
2544
|
params: [
|
|
1843
|
-
{ name: '
|
|
2545
|
+
{ name: 'sourceString', description: 'String to search in', type: 'string' },
|
|
1844
2546
|
{ name: 'substring', description: 'Substring to find', type: 'string' },
|
|
1845
2547
|
],
|
|
1846
2548
|
returnType: 'number',
|
|
1847
|
-
|
|
2549
|
+
returnDescription: 'The 1-based position of the substring, or 0 when it is not found.',
|
|
2550
|
+
syntax: 'IndexOf(sourceString, substring)',
|
|
1848
2551
|
example: "%%=IndexOf('Hello World', 'World')=%%",
|
|
1849
2552
|
},
|
|
1850
2553
|
{
|
|
@@ -1858,21 +2561,35 @@ export const FUNCTIONS = [
|
|
|
1858
2561
|
category: 'Data Extension',
|
|
1859
2562
|
description: 'Inserts a new row into a data extension.',
|
|
1860
2563
|
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
2564
|
{
|
|
1865
|
-
name: '
|
|
2565
|
+
name: 'dataExt',
|
|
2566
|
+
description: 'The name of the data extension to insert data into',
|
|
2567
|
+
type: 'string',
|
|
2568
|
+
},
|
|
2569
|
+
{
|
|
2570
|
+
name: 'columnName1',
|
|
2571
|
+
description: 'The name of the column to insert into the data extension',
|
|
2572
|
+
type: 'string',
|
|
2573
|
+
},
|
|
2574
|
+
{
|
|
2575
|
+
name: 'valueToInsert1',
|
|
2576
|
+
description: 'The value to insert into the specified column',
|
|
2577
|
+
},
|
|
2578
|
+
{
|
|
2579
|
+
name: 'columnNameN',
|
|
1866
2580
|
mcnSince: null,
|
|
1867
2581
|
mcnNotes: null,
|
|
1868
2582
|
description: 'Additional column name',
|
|
1869
2583
|
type: 'string',
|
|
1870
2584
|
optional: true,
|
|
1871
2585
|
},
|
|
1872
|
-
{ name: '
|
|
2586
|
+
{ name: 'valueToInsertN', description: 'Additional column value', optional: true },
|
|
1873
2587
|
],
|
|
1874
2588
|
returnType: 'number',
|
|
1875
|
-
|
|
2589
|
+
returnDescription: 'The number of rows inserted.',
|
|
2590
|
+
repeat: [{ startIndex: 1, groupSize: 2, minGroups: 1 }],
|
|
2591
|
+
syntax: 'InsertData(dataExt, columnName1, valueToInsert1[, columnNameN, valueToInsertN, ...])',
|
|
2592
|
+
example: "%%=InsertData('Log', 'SubscriberKey', _subscriberkey, 'Status', 'Sent')=%%",
|
|
1876
2593
|
},
|
|
1877
2594
|
{
|
|
1878
2595
|
name: 'InsertDE',
|
|
@@ -1883,23 +2600,38 @@ export const FUNCTIONS = [
|
|
|
1883
2600
|
minArgs: 3,
|
|
1884
2601
|
maxArgs: INF,
|
|
1885
2602
|
category: 'Data Extension',
|
|
1886
|
-
description:
|
|
2603
|
+
description:
|
|
2604
|
+
'Inserts a new row into a data extension. Email-context variant of InsertData.',
|
|
1887
2605
|
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
2606
|
{
|
|
1892
|
-
name: '
|
|
2607
|
+
name: 'dataExt',
|
|
2608
|
+
description: 'The name of the data extension to insert data into',
|
|
2609
|
+
type: 'string',
|
|
2610
|
+
},
|
|
2611
|
+
{
|
|
2612
|
+
name: 'columnName1',
|
|
2613
|
+
description: 'The name of the column to insert into the data extension',
|
|
2614
|
+
type: 'string',
|
|
2615
|
+
},
|
|
2616
|
+
{
|
|
2617
|
+
name: 'valueToInsert1',
|
|
2618
|
+
description: 'The value to insert into the specified column',
|
|
2619
|
+
},
|
|
2620
|
+
{
|
|
2621
|
+
name: 'columnNameN',
|
|
1893
2622
|
mcnSince: null,
|
|
1894
2623
|
mcnNotes: null,
|
|
1895
2624
|
description: 'Additional column name',
|
|
1896
2625
|
type: 'string',
|
|
1897
2626
|
optional: true,
|
|
1898
2627
|
},
|
|
1899
|
-
{ name: '
|
|
2628
|
+
{ name: 'valueToInsertN', description: 'Additional column value', optional: true },
|
|
1900
2629
|
],
|
|
1901
2630
|
returnType: 'number',
|
|
1902
|
-
|
|
2631
|
+
returnDescription: 'The number of rows inserted.',
|
|
2632
|
+
repeat: [{ startIndex: 1, groupSize: 2, minGroups: 1 }],
|
|
2633
|
+
syntax: 'InsertDE(dataExt, columnName1, valueToInsert1[, columnNameN, valueToInsertN, ...])',
|
|
2634
|
+
example: "%%=InsertDE('Log', 'SubscriberKey', _subscriberkey, 'Status', 'Sent')=%%",
|
|
1903
2635
|
},
|
|
1904
2636
|
{
|
|
1905
2637
|
name: 'InvokeCreate',
|
|
@@ -1928,7 +2660,7 @@ export const FUNCTIONS = [
|
|
|
1928
2660
|
type: 'string',
|
|
1929
2661
|
},
|
|
1930
2662
|
{
|
|
1931
|
-
name: '
|
|
2663
|
+
name: 'createOptionsObject',
|
|
1932
2664
|
mcnSince: null,
|
|
1933
2665
|
mcnNotes: null,
|
|
1934
2666
|
description: 'Optional CreateOptions API object',
|
|
@@ -1936,7 +2668,9 @@ export const FUNCTIONS = [
|
|
|
1936
2668
|
},
|
|
1937
2669
|
],
|
|
1938
2670
|
returnType: 'string',
|
|
1939
|
-
|
|
2671
|
+
returnDescription: 'The status of the create operation as returned by the API.',
|
|
2672
|
+
syntax: 'InvokeCreate(apiObject, @statusMessage, @errorCode[, createOptionsObject])',
|
|
2673
|
+
example: '%%=InvokeCreate(@apiObject, @statusMessage, @errorCode)=%%',
|
|
1940
2674
|
},
|
|
1941
2675
|
{
|
|
1942
2676
|
name: 'InvokeDelete',
|
|
@@ -1965,7 +2699,7 @@ export const FUNCTIONS = [
|
|
|
1965
2699
|
type: 'string',
|
|
1966
2700
|
},
|
|
1967
2701
|
{
|
|
1968
|
-
name: '
|
|
2702
|
+
name: 'deleteOptionsObject',
|
|
1969
2703
|
mcnSince: null,
|
|
1970
2704
|
mcnNotes: null,
|
|
1971
2705
|
description: 'Optional DeleteOptions API object',
|
|
@@ -1973,7 +2707,9 @@ export const FUNCTIONS = [
|
|
|
1973
2707
|
},
|
|
1974
2708
|
],
|
|
1975
2709
|
returnType: 'string',
|
|
1976
|
-
|
|
2710
|
+
returnDescription: 'The status of the delete operation as returned by the API.',
|
|
2711
|
+
syntax: 'InvokeDelete(apiObject, @statusMessage, @errorCode[, deleteOptionsObject])',
|
|
2712
|
+
example: '%%=InvokeDelete(@apiObject, @statusMessage, @errorCode)=%%',
|
|
1977
2713
|
},
|
|
1978
2714
|
{
|
|
1979
2715
|
name: 'InvokeExecute',
|
|
@@ -1981,23 +2717,33 @@ export const FUNCTIONS = [
|
|
|
1981
2717
|
mcnNotes: null,
|
|
1982
2718
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-api/mc-ampscript-reference-api-invoke-execute.html',
|
|
1983
2719
|
guideUrl: 'https://ampscript.guide/invokeexecute/',
|
|
1984
|
-
minArgs:
|
|
2720
|
+
minArgs: 1,
|
|
1985
2721
|
maxArgs: 3,
|
|
1986
2722
|
category: 'Marketing Cloud API',
|
|
1987
|
-
description:
|
|
2723
|
+
description:
|
|
2724
|
+
'Calls the SOAP API Execute method on the given API object and returns the API status code.',
|
|
1988
2725
|
params: [
|
|
1989
|
-
{ name: 'apiObject', description: 'API object to execute' },
|
|
2726
|
+
{ name: 'apiObject', description: 'The API object to execute' },
|
|
1990
2727
|
{
|
|
1991
2728
|
name: 'statusMessage',
|
|
1992
2729
|
mcnSince: null,
|
|
1993
2730
|
mcnNotes: null,
|
|
1994
|
-
description: '
|
|
2731
|
+
description: 'An AMPscript variable that stores the API status message',
|
|
2732
|
+
type: 'string',
|
|
2733
|
+
optional: true,
|
|
2734
|
+
},
|
|
2735
|
+
{
|
|
2736
|
+
name: 'requestId',
|
|
2737
|
+
description: 'An AMPscript variable that stores the request ID',
|
|
1995
2738
|
type: 'string',
|
|
2739
|
+
optional: true,
|
|
1996
2740
|
},
|
|
1997
|
-
{ name: 'errorCode', description: 'Output variable for error code', type: 'string' },
|
|
1998
2741
|
],
|
|
1999
|
-
returnType: '
|
|
2000
|
-
|
|
2742
|
+
returnType: 'rowset',
|
|
2743
|
+
returnDescription:
|
|
2744
|
+
'A rowset containing the API response. Use Row() and Field() to read the StatusMessage and ErrorCode.',
|
|
2745
|
+
syntax: 'InvokeExecute(apiObject[, @statusMessage, @requestId])',
|
|
2746
|
+
example: '%%[ SET @rows = InvokeExecute(@apiObject, @statusMessage, @requestId) ]%%',
|
|
2001
2747
|
},
|
|
2002
2748
|
{
|
|
2003
2749
|
name: 'InvokePerform',
|
|
@@ -2011,7 +2757,11 @@ export const FUNCTIONS = [
|
|
|
2011
2757
|
description: 'Calls the SOAP API Perform method on the given API object.',
|
|
2012
2758
|
params: [
|
|
2013
2759
|
{ name: 'apiObject', description: 'API object to perform on' },
|
|
2014
|
-
{
|
|
2760
|
+
{
|
|
2761
|
+
name: 'actionToPerform',
|
|
2762
|
+
description: 'Action to perform; valid values vary by object type',
|
|
2763
|
+
type: 'string',
|
|
2764
|
+
},
|
|
2015
2765
|
{
|
|
2016
2766
|
name: 'statusMessage',
|
|
2017
2767
|
mcnSince: null,
|
|
@@ -2022,7 +2772,9 @@ export const FUNCTIONS = [
|
|
|
2022
2772
|
},
|
|
2023
2773
|
],
|
|
2024
2774
|
returnType: 'string',
|
|
2025
|
-
|
|
2775
|
+
returnDescription: 'The status of the perform operation as returned by the API.',
|
|
2776
|
+
syntax: 'InvokePerform(apiObject, actionToPerform[, @statusMessage])',
|
|
2777
|
+
example: "%%=InvokePerform(@apiObject, 'Start', @statusMessage)=%%",
|
|
2026
2778
|
},
|
|
2027
2779
|
{
|
|
2028
2780
|
name: 'InvokeRetrieve',
|
|
@@ -2054,7 +2806,9 @@ export const FUNCTIONS = [
|
|
|
2054
2806
|
},
|
|
2055
2807
|
],
|
|
2056
2808
|
returnType: 'rowset',
|
|
2809
|
+
returnDescription: 'A rowset containing the retrieved API records.',
|
|
2057
2810
|
syntax: 'InvokeRetrieve(apiObject[, @statusMessage, @requestId])',
|
|
2811
|
+
example: '%%[ SET @rows = InvokeRetrieve(@apiObject, @statusMessage, @requestId) ]%%',
|
|
2058
2812
|
},
|
|
2059
2813
|
{
|
|
2060
2814
|
name: 'InvokeUpdate',
|
|
@@ -2093,7 +2847,9 @@ export const FUNCTIONS = [
|
|
|
2093
2847
|
},
|
|
2094
2848
|
],
|
|
2095
2849
|
returnType: 'string',
|
|
2850
|
+
returnDescription: 'The status of the update operation as returned by the API.',
|
|
2096
2851
|
syntax: 'InvokeUpdate(apiObject[, @statusMessage, @errorCode, updateOptions])',
|
|
2852
|
+
example: '%%=InvokeUpdate(@apiObject, @statusMessage, @errorCode)=%%',
|
|
2097
2853
|
},
|
|
2098
2854
|
{
|
|
2099
2855
|
name: 'IsCHTMLBrowser',
|
|
@@ -2108,7 +2864,10 @@ export const FUNCTIONS = [
|
|
|
2108
2864
|
"Returns true if the subscriber's browser is identified as a compact HTML (cHTML) device.",
|
|
2109
2865
|
params: [{ name: 'userAgent', description: 'User agent string to test', type: 'string' }],
|
|
2110
2866
|
returnType: 'boolean',
|
|
2867
|
+
returnDescription: 'True when the user agent indicates a cHTML browser, otherwise false.',
|
|
2868
|
+
returnEnum: [true, false],
|
|
2111
2869
|
syntax: 'IsCHTMLBrowser(userAgent)',
|
|
2870
|
+
example: '%%=IsCHTMLBrowser(@userAgent)=%%',
|
|
2112
2871
|
},
|
|
2113
2872
|
{
|
|
2114
2873
|
name: 'IsEmailAddress',
|
|
@@ -2122,6 +2881,9 @@ export const FUNCTIONS = [
|
|
|
2122
2881
|
description: 'Returns true if the value is a syntactically valid email address.',
|
|
2123
2882
|
params: [{ name: 'value', description: 'Value to validate', type: 'string' }],
|
|
2124
2883
|
returnType: 'boolean',
|
|
2884
|
+
returnDescription:
|
|
2885
|
+
'True when the value is a syntactically valid email address, otherwise false.',
|
|
2886
|
+
returnEnum: [true, false],
|
|
2125
2887
|
syntax: 'IsEmailAddress(value)',
|
|
2126
2888
|
example: "%%=IsEmailAddress('test@example.com')=%%",
|
|
2127
2889
|
},
|
|
@@ -2137,7 +2899,10 @@ export const FUNCTIONS = [
|
|
|
2137
2899
|
description: 'Returns true if the value is null.',
|
|
2138
2900
|
params: [{ name: 'value', description: 'Value to test' }],
|
|
2139
2901
|
returnType: 'boolean',
|
|
2902
|
+
returnDescription: 'True when the value is null, otherwise false.',
|
|
2903
|
+
returnEnum: [true, false],
|
|
2140
2904
|
syntax: 'IsNull(value)',
|
|
2905
|
+
example: '%%=IsNull(@value)=%%',
|
|
2141
2906
|
},
|
|
2142
2907
|
{
|
|
2143
2908
|
name: 'IsNullDefault',
|
|
@@ -2154,6 +2919,7 @@ export const FUNCTIONS = [
|
|
|
2154
2919
|
{ name: 'defaultValue', description: 'Default to return when null' },
|
|
2155
2920
|
],
|
|
2156
2921
|
returnType: 'string',
|
|
2922
|
+
returnDescription: 'The original value, or the default value when the original is null.',
|
|
2157
2923
|
syntax: 'IsNullDefault(value, defaultValue)',
|
|
2158
2924
|
example: "%%=IsNullDefault(@name, 'Friend')=%%",
|
|
2159
2925
|
},
|
|
@@ -2169,7 +2935,10 @@ export const FUNCTIONS = [
|
|
|
2169
2935
|
description: 'Returns true if the value is a valid phone number.',
|
|
2170
2936
|
params: [{ name: 'value', description: 'Value to validate', type: 'string' }],
|
|
2171
2937
|
returnType: 'boolean',
|
|
2938
|
+
returnDescription: 'True when the value is a valid phone number, otherwise false.',
|
|
2939
|
+
returnEnum: [true, false],
|
|
2172
2940
|
syntax: 'IsPhoneNumber(value)',
|
|
2941
|
+
example: "%%=IsPhoneNumber('+1 718 209 7651')=%%",
|
|
2173
2942
|
},
|
|
2174
2943
|
{
|
|
2175
2944
|
name: 'Length',
|
|
@@ -2181,9 +2950,10 @@ export const FUNCTIONS = [
|
|
|
2181
2950
|
maxArgs: 1,
|
|
2182
2951
|
category: 'String',
|
|
2183
2952
|
description: 'Returns the number of characters in a string.',
|
|
2184
|
-
params: [{ name: '
|
|
2953
|
+
params: [{ name: 'sourceString', description: 'String to measure', type: 'string' }],
|
|
2185
2954
|
returnType: 'number',
|
|
2186
|
-
|
|
2955
|
+
returnDescription: 'The number of characters in the string.',
|
|
2956
|
+
syntax: 'Length(sourceString)',
|
|
2187
2957
|
example: "%%=Length('Hello')=%%",
|
|
2188
2958
|
},
|
|
2189
2959
|
{
|
|
@@ -2197,11 +2967,23 @@ export const FUNCTIONS = [
|
|
|
2197
2967
|
category: 'Content',
|
|
2198
2968
|
description: 'Generates a URL to a microsite page that serves live, dynamic content.',
|
|
2199
2969
|
params: [
|
|
2200
|
-
{
|
|
2201
|
-
|
|
2970
|
+
{
|
|
2971
|
+
name: 'contentType',
|
|
2972
|
+
description:
|
|
2973
|
+
'The type of content to generate a URL for. Accepted values: microsite, landingpage',
|
|
2974
|
+
type: 'string',
|
|
2975
|
+
enum: ['coupon'],
|
|
2976
|
+
},
|
|
2977
|
+
{
|
|
2978
|
+
name: 'externalKey',
|
|
2979
|
+
description: 'The external key of the live content',
|
|
2980
|
+
type: 'string',
|
|
2981
|
+
},
|
|
2202
2982
|
],
|
|
2203
2983
|
returnType: 'string',
|
|
2204
|
-
|
|
2984
|
+
returnDescription: 'A URL to the referenced live content microsite.',
|
|
2985
|
+
syntax: 'LiveContentMicrositeURL(contentType, externalKey)',
|
|
2986
|
+
example: '%%=LiveContentMicrositeURL("coupon", "50percent")=%%',
|
|
2205
2987
|
},
|
|
2206
2988
|
{
|
|
2207
2989
|
name: 'LocalDateToSystemDate',
|
|
@@ -2213,9 +2995,17 @@ export const FUNCTIONS = [
|
|
|
2213
2995
|
maxArgs: 1,
|
|
2214
2996
|
category: 'Date and Time',
|
|
2215
2997
|
description: 'Converts a local date to the Marketing Cloud system date (Central Time).',
|
|
2216
|
-
params: [
|
|
2217
|
-
|
|
2218
|
-
|
|
2998
|
+
params: [
|
|
2999
|
+
{
|
|
3000
|
+
name: 'timeToConvert',
|
|
3001
|
+
description: 'The time string that you want to convert',
|
|
3002
|
+
type: 'string',
|
|
3003
|
+
},
|
|
3004
|
+
],
|
|
3005
|
+
returnType: 'string',
|
|
3006
|
+
returnDescription: 'The supplied local time converted to system (account) time.',
|
|
3007
|
+
syntax: 'LocalDateToSystemDate(timeToConvert)',
|
|
3008
|
+
example: '%%=LocalDateToSystemDate(Now())=%%',
|
|
2219
3009
|
},
|
|
2220
3010
|
{
|
|
2221
3011
|
name: 'LongSFID',
|
|
@@ -2230,13 +3020,15 @@ export const FUNCTIONS = [
|
|
|
2230
3020
|
'Converts a 15-character case-sensitive Salesforce ID to the 18-character case-insensitive version.',
|
|
2231
3021
|
params: [{ name: 'sfid15', description: '15-character Salesforce ID', type: 'string' }],
|
|
2232
3022
|
returnType: 'string',
|
|
3023
|
+
returnDescription: 'The 18-character Salesforce ID derived from the 15-character ID.',
|
|
2233
3024
|
syntax: 'LongSFID(sfid15)',
|
|
3025
|
+
example: "%%=LongSFID('001A000000ABCDE')=%%",
|
|
2234
3026
|
},
|
|
2235
3027
|
{
|
|
2236
3028
|
name: 'Lookup',
|
|
2237
3029
|
mcnSince: 67,
|
|
2238
3030
|
mcnNotes:
|
|
2239
|
-
'In MCN, search arguments must be provided in column/value pairs
|
|
3031
|
+
'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
3032
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-data-extension/mc-ampscript-reference-data-extension-lookup.html',
|
|
2241
3033
|
guideUrl: 'https://ampscript.guide/lookup/',
|
|
2242
3034
|
minArgs: 4,
|
|
@@ -2245,22 +3037,37 @@ export const FUNCTIONS = [
|
|
|
2245
3037
|
description:
|
|
2246
3038
|
'Returns a single field value from the first matching row in a data extension.',
|
|
2247
3039
|
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
3040
|
{
|
|
2253
|
-
name: '
|
|
3041
|
+
name: 'dataObject',
|
|
3042
|
+
description:
|
|
3043
|
+
'The data object (data extension or marketing object) that contains the data to look up',
|
|
3044
|
+
type: 'string',
|
|
3045
|
+
},
|
|
3046
|
+
{
|
|
3047
|
+
name: 'returnColumn',
|
|
3048
|
+
description: 'The name of the column to return data from',
|
|
3049
|
+
type: 'string',
|
|
3050
|
+
},
|
|
3051
|
+
{
|
|
3052
|
+
name: 'searchColumn1',
|
|
3053
|
+
description: 'The name of the column to search',
|
|
3054
|
+
type: 'string',
|
|
3055
|
+
},
|
|
3056
|
+
{ name: 'searchValue1', description: 'The value that identifies the rows to retrieve' },
|
|
3057
|
+
{
|
|
3058
|
+
name: 'searchColumnN',
|
|
2254
3059
|
mcnSince: null,
|
|
2255
3060
|
mcnNotes: null,
|
|
2256
3061
|
description: 'Additional filter column',
|
|
2257
3062
|
type: 'string',
|
|
2258
3063
|
optional: true,
|
|
2259
3064
|
},
|
|
2260
|
-
{ name: '
|
|
3065
|
+
{ name: 'searchValueN', description: 'Additional filter value', optional: true },
|
|
2261
3066
|
],
|
|
2262
3067
|
returnType: 'string',
|
|
2263
|
-
|
|
3068
|
+
returnDescription: 'The value from the requested column of the first matching row.',
|
|
3069
|
+
repeat: [{ startIndex: 2, groupSize: 2, minGroups: 1 }],
|
|
3070
|
+
syntax: 'Lookup(dataObject, returnColumn, searchColumn1, searchValue1[, searchColumnN, searchValueN, ...])',
|
|
2264
3071
|
example: "%%=Lookup('MyDE', 'Email', 'ID', '123')=%%",
|
|
2265
3072
|
},
|
|
2266
3073
|
{
|
|
@@ -2274,29 +3081,47 @@ export const FUNCTIONS = [
|
|
|
2274
3081
|
category: 'Data Extension',
|
|
2275
3082
|
description: 'Returns a sorted rowset of matching rows from a data extension.',
|
|
2276
3083
|
params: [
|
|
2277
|
-
{
|
|
2278
|
-
|
|
3084
|
+
{
|
|
3085
|
+
name: 'dataExt',
|
|
3086
|
+
description: 'The name of the data extension that contains the data to retrieve',
|
|
3087
|
+
type: 'string',
|
|
3088
|
+
},
|
|
3089
|
+
{
|
|
3090
|
+
name: 'numRows',
|
|
3091
|
+
description:
|
|
3092
|
+
'The number of rows to return. A value less than 1 returns all rows (max 2,000)',
|
|
3093
|
+
type: 'number',
|
|
3094
|
+
},
|
|
2279
3095
|
{
|
|
2280
3096
|
name: 'sortColumn',
|
|
2281
3097
|
mcnSince: null,
|
|
2282
3098
|
mcnNotes: null,
|
|
2283
|
-
description:
|
|
3099
|
+
description:
|
|
3100
|
+
'The column to sort data by, followed by ASC or DESC (case-insensitive)',
|
|
3101
|
+
type: 'string',
|
|
3102
|
+
},
|
|
3103
|
+
{
|
|
3104
|
+
name: 'searchColumn1',
|
|
3105
|
+
description: 'The name of the column to search',
|
|
2284
3106
|
type: 'string',
|
|
2285
3107
|
},
|
|
2286
|
-
{ name: '
|
|
2287
|
-
{ name: 'lookupValue', description: 'Filter column value' },
|
|
3108
|
+
{ name: 'searchValue1', description: 'The value that identifies the rows to retrieve' },
|
|
2288
3109
|
{
|
|
2289
|
-
name: '
|
|
3110
|
+
name: 'searchColumnN',
|
|
2290
3111
|
mcnSince: null,
|
|
2291
3112
|
mcnNotes: null,
|
|
2292
3113
|
description: 'Additional filter column',
|
|
2293
3114
|
type: 'string',
|
|
2294
3115
|
optional: true,
|
|
2295
3116
|
},
|
|
2296
|
-
{ name: '
|
|
3117
|
+
{ name: 'searchValueN', description: 'Additional filter value', optional: true },
|
|
2297
3118
|
],
|
|
2298
3119
|
returnType: 'rowset',
|
|
2299
|
-
|
|
3120
|
+
returnDescription: 'A sorted, row-limited rowset of matching rows.',
|
|
3121
|
+
repeat: [{ startIndex: 3, groupSize: 2, minGroups: 1 }],
|
|
3122
|
+
syntax: 'LookupOrderedRows(dataExt, numRows, sortColumn, searchColumn1, searchValue1[, searchColumnN, searchValueN, ...])',
|
|
3123
|
+
example:
|
|
3124
|
+
"%%[ SET @rows = LookupOrderedRows('Orders', 5, 'OrderDate DESC', 'SubKey', _subscriberkey) ]%%",
|
|
2300
3125
|
},
|
|
2301
3126
|
{
|
|
2302
3127
|
name: 'LookupOrderedRowsCS',
|
|
@@ -2310,23 +3135,45 @@ export const FUNCTIONS = [
|
|
|
2310
3135
|
description:
|
|
2311
3136
|
'Case-sensitive version of LookupOrderedRows. Returns a sorted rowset of matching rows.',
|
|
2312
3137
|
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
3138
|
{
|
|
2319
|
-
name: '
|
|
3139
|
+
name: 'dataExt',
|
|
3140
|
+
description: 'The name of the data extension that contains the data to retrieve',
|
|
3141
|
+
type: 'string',
|
|
3142
|
+
},
|
|
3143
|
+
{
|
|
3144
|
+
name: 'numRows',
|
|
3145
|
+
description:
|
|
3146
|
+
'The number of rows to return. A value less than 1 returns all rows (max 2,000)',
|
|
3147
|
+
type: 'number',
|
|
3148
|
+
},
|
|
3149
|
+
{
|
|
3150
|
+
name: 'sortColumn',
|
|
3151
|
+
description:
|
|
3152
|
+
'The column to sort data by, followed by ASC or DESC (case-insensitive)',
|
|
3153
|
+
type: 'string',
|
|
3154
|
+
},
|
|
3155
|
+
{
|
|
3156
|
+
name: 'searchColumn1',
|
|
3157
|
+
description: 'The name of the column to search',
|
|
3158
|
+
type: 'string',
|
|
3159
|
+
},
|
|
3160
|
+
{ name: 'searchValue1', description: 'The value that identifies the rows to retrieve' },
|
|
3161
|
+
{
|
|
3162
|
+
name: 'searchColumnN',
|
|
2320
3163
|
mcnSince: null,
|
|
2321
3164
|
mcnNotes: null,
|
|
2322
3165
|
description: 'Additional filter column',
|
|
2323
3166
|
type: 'string',
|
|
2324
3167
|
optional: true,
|
|
2325
3168
|
},
|
|
2326
|
-
{ name: '
|
|
3169
|
+
{ name: 'searchValueN', description: 'Additional filter value', optional: true },
|
|
2327
3170
|
],
|
|
2328
3171
|
returnType: 'rowset',
|
|
2329
|
-
|
|
3172
|
+
returnDescription: 'A case-sensitive, sorted, row-limited rowset of matching rows.',
|
|
3173
|
+
repeat: [{ startIndex: 3, groupSize: 2, minGroups: 1 }],
|
|
3174
|
+
syntax: 'LookupOrderedRowsCS(dataExt, numRows, sortColumn, searchColumn1, searchValue1[, searchColumnN, searchValueN, ...])',
|
|
3175
|
+
example:
|
|
3176
|
+
"%%[ SET @rows = LookupOrderedRowsCS('Orders', 5, 'OrderDate DESC', 'SubKey', _subscriberkey) ]%%",
|
|
2330
3177
|
},
|
|
2331
3178
|
{
|
|
2332
3179
|
name: 'LookupRows',
|
|
@@ -2339,21 +3186,31 @@ export const FUNCTIONS = [
|
|
|
2339
3186
|
category: 'Data Extension',
|
|
2340
3187
|
description: 'Returns a rowset of all matching rows from a data extension.',
|
|
2341
3188
|
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
3189
|
{
|
|
2346
|
-
name: '
|
|
3190
|
+
name: 'dataExt',
|
|
3191
|
+
description: 'The name of the data extension that contains the data to retrieve',
|
|
3192
|
+
type: 'string',
|
|
3193
|
+
},
|
|
3194
|
+
{
|
|
3195
|
+
name: 'searchColumn1',
|
|
3196
|
+
description: 'The name of the column to search',
|
|
3197
|
+
type: 'string',
|
|
3198
|
+
},
|
|
3199
|
+
{ name: 'searchValue1', description: 'The value that identifies the rows to retrieve' },
|
|
3200
|
+
{
|
|
3201
|
+
name: 'searchColumnN',
|
|
2347
3202
|
mcnSince: null,
|
|
2348
3203
|
mcnNotes: null,
|
|
2349
3204
|
description: 'Additional filter column',
|
|
2350
3205
|
type: 'string',
|
|
2351
3206
|
optional: true,
|
|
2352
3207
|
},
|
|
2353
|
-
{ name: '
|
|
3208
|
+
{ name: 'searchValueN', description: 'Additional filter value', optional: true },
|
|
2354
3209
|
],
|
|
2355
3210
|
returnType: 'rowset',
|
|
2356
|
-
|
|
3211
|
+
returnDescription: 'A rowset of all rows that match the search criteria.',
|
|
3212
|
+
repeat: [{ startIndex: 1, groupSize: 2, minGroups: 1 }],
|
|
3213
|
+
syntax: 'LookupRows(dataExt, searchColumn1, searchValue1[, searchColumnN, searchValueN, ...])',
|
|
2357
3214
|
example: "%%=LookupRows('MyDE', 'Status', 'Active')=%%",
|
|
2358
3215
|
},
|
|
2359
3216
|
{
|
|
@@ -2367,21 +3224,32 @@ export const FUNCTIONS = [
|
|
|
2367
3224
|
category: 'Data Extension',
|
|
2368
3225
|
description: 'Case-sensitive version of LookupRows. Returns a rowset of matching rows.',
|
|
2369
3226
|
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
3227
|
{
|
|
2374
|
-
name: '
|
|
3228
|
+
name: 'dataExt',
|
|
3229
|
+
description: 'The name of the data extension that contains the data to retrieve',
|
|
3230
|
+
type: 'string',
|
|
3231
|
+
},
|
|
3232
|
+
{
|
|
3233
|
+
name: 'searchColumn1',
|
|
3234
|
+
description: 'The name of the column to search',
|
|
3235
|
+
type: 'string',
|
|
3236
|
+
},
|
|
3237
|
+
{ name: 'searchValue1', description: 'The value that identifies the rows to retrieve' },
|
|
3238
|
+
{
|
|
3239
|
+
name: 'searchColumnN',
|
|
2375
3240
|
mcnSince: null,
|
|
2376
3241
|
mcnNotes: null,
|
|
2377
3242
|
description: 'Additional filter column',
|
|
2378
3243
|
type: 'string',
|
|
2379
3244
|
optional: true,
|
|
2380
3245
|
},
|
|
2381
|
-
{ name: '
|
|
3246
|
+
{ name: 'searchValueN', description: 'Additional filter value', optional: true },
|
|
2382
3247
|
],
|
|
2383
3248
|
returnType: 'rowset',
|
|
2384
|
-
|
|
3249
|
+
returnDescription: 'A case-sensitive rowset of all rows that match the search criteria.',
|
|
3250
|
+
repeat: [{ startIndex: 1, groupSize: 2, minGroups: 1 }],
|
|
3251
|
+
syntax: 'LookupRowsCS(dataExt, searchColumn1, searchValue1[, searchColumnN, searchValueN, ...])',
|
|
3252
|
+
example: "%%[ SET @rows = LookupRowsCS('Orders', 'SubKey', _subscriberkey) ]%%",
|
|
2385
3253
|
},
|
|
2386
3254
|
{
|
|
2387
3255
|
name: 'Lowercase',
|
|
@@ -2393,9 +3261,10 @@ export const FUNCTIONS = [
|
|
|
2393
3261
|
maxArgs: 1,
|
|
2394
3262
|
category: 'String',
|
|
2395
3263
|
description: 'Converts a string to all lowercase characters.',
|
|
2396
|
-
params: [{ name: '
|
|
3264
|
+
params: [{ name: 'sourceString', description: 'String to convert', type: 'string' }],
|
|
2397
3265
|
returnType: 'string',
|
|
2398
|
-
|
|
3266
|
+
returnDescription: 'The string converted to lower case.',
|
|
3267
|
+
syntax: 'Lowercase(sourceString)',
|
|
2399
3268
|
example: "%%=Lowercase('HELLO')=%%",
|
|
2400
3269
|
},
|
|
2401
3270
|
{
|
|
@@ -2409,18 +3278,46 @@ export const FUNCTIONS = [
|
|
|
2409
3278
|
category: 'Encryption and Encoding',
|
|
2410
3279
|
description: 'Returns the MD5 hash of the input value.',
|
|
2411
3280
|
params: [
|
|
2412
|
-
{ name: '
|
|
3281
|
+
{ name: 'stringToConvert', description: 'The string to encode', type: 'string' },
|
|
2413
3282
|
{
|
|
2414
|
-
name: '
|
|
3283
|
+
name: 'charSet',
|
|
2415
3284
|
mcnSince: null,
|
|
2416
3285
|
mcnNotes: null,
|
|
2417
|
-
description: '
|
|
3286
|
+
description: 'Character set to use for the encoding',
|
|
2418
3287
|
type: 'string',
|
|
3288
|
+
enum: ['UTF-8', 'UTF-16'],
|
|
2419
3289
|
optional: true,
|
|
3290
|
+
default: 'UTF-8',
|
|
2420
3291
|
},
|
|
2421
3292
|
],
|
|
2422
3293
|
returnType: 'string',
|
|
2423
|
-
|
|
3294
|
+
returnDescription: 'The MD5 hash of the input as a hexadecimal string.',
|
|
3295
|
+
syntax: 'MD5(stringToConvert[, charSet])',
|
|
3296
|
+
example: '%%=MD5("This is a string of text.")=%%',
|
|
3297
|
+
},
|
|
3298
|
+
{
|
|
3299
|
+
name: 'MMS_Content_URL',
|
|
3300
|
+
mcnSince: null,
|
|
3301
|
+
mcnNotes: null,
|
|
3302
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sms/mc-ampscript-reference-sms-mms-content-url.html',
|
|
3303
|
+
guideUrl: 'https://ampscript.guide/mobileconnect-data-strings/',
|
|
3304
|
+
minArgs: 1,
|
|
3305
|
+
maxArgs: 1,
|
|
3306
|
+
category: 'MobileConnect',
|
|
3307
|
+
description:
|
|
3308
|
+
'Returns the URL of MMS content from an inbound mobile-originated (MO) message. Only usable in MobileConnect.',
|
|
3309
|
+
params: [
|
|
3310
|
+
{
|
|
3311
|
+
name: 'position',
|
|
3312
|
+
description:
|
|
3313
|
+
'Zero-based index of the MMS content to return; 0 returns the first attachment',
|
|
3314
|
+
type: 'number',
|
|
3315
|
+
},
|
|
3316
|
+
],
|
|
3317
|
+
returnType: 'string',
|
|
3318
|
+
returnDescription: 'The URL of the requested MMS content from the inbound message.',
|
|
3319
|
+
syntax: 'MMS_Content_URL(position)',
|
|
3320
|
+
example: '%%=MMS_Content_URL(0)=%%',
|
|
2424
3321
|
},
|
|
2425
3322
|
{
|
|
2426
3323
|
name: 'MicrositeURL',
|
|
@@ -2435,24 +3332,35 @@ export const FUNCTIONS = [
|
|
|
2435
3332
|
params: [
|
|
2436
3333
|
{ name: 'pageId', description: 'Microsite page ID', type: 'number' },
|
|
2437
3334
|
{
|
|
2438
|
-
name: '
|
|
2439
|
-
mcnSince: null,
|
|
2440
|
-
mcnNotes: null,
|
|
3335
|
+
name: 'paramName1',
|
|
2441
3336
|
description: 'Query parameter name',
|
|
2442
3337
|
type: 'string',
|
|
2443
3338
|
optional: true,
|
|
2444
3339
|
},
|
|
2445
3340
|
{
|
|
2446
|
-
name: '
|
|
2447
|
-
mcnSince: null,
|
|
2448
|
-
mcnNotes: null,
|
|
3341
|
+
name: 'paramValue1',
|
|
2449
3342
|
description: 'Query parameter value',
|
|
2450
3343
|
type: 'string',
|
|
2451
3344
|
optional: true,
|
|
2452
3345
|
},
|
|
3346
|
+
{
|
|
3347
|
+
name: 'paramNameN',
|
|
3348
|
+
description: 'Additional query parameter name',
|
|
3349
|
+
type: 'string',
|
|
3350
|
+
optional: true,
|
|
3351
|
+
},
|
|
3352
|
+
{
|
|
3353
|
+
name: 'paramValueN',
|
|
3354
|
+
description: 'Additional query parameter value',
|
|
3355
|
+
type: 'string',
|
|
3356
|
+
optional: true,
|
|
3357
|
+
},
|
|
2453
3358
|
],
|
|
2454
3359
|
returnType: 'string',
|
|
2455
|
-
|
|
3360
|
+
returnDescription: 'A tracked URL to the referenced microsite page.',
|
|
3361
|
+
repeat: [{ startIndex: 1, groupSize: 2, minGroups: 0 }],
|
|
3362
|
+
syntax: 'MicrositeURL(pageId[, paramName1, paramValue1, paramNameN, paramValueN, ...])',
|
|
3363
|
+
example: '%%=MicrositeURL(12345)=%%',
|
|
2456
3364
|
},
|
|
2457
3365
|
{
|
|
2458
3366
|
name: 'Mod',
|
|
@@ -2470,9 +3378,33 @@ export const FUNCTIONS = [
|
|
|
2470
3378
|
{ name: 'divisor', description: 'Number to divide by', type: 'number' },
|
|
2471
3379
|
],
|
|
2472
3380
|
returnType: 'number',
|
|
3381
|
+
returnDescription: 'The remainder after dividing the first number by the second.',
|
|
2473
3382
|
syntax: 'Mod(dividend, divisor)',
|
|
2474
3383
|
example: '%%=Mod(10, 3)=%%',
|
|
2475
3384
|
},
|
|
3385
|
+
{
|
|
3386
|
+
name: 'Msg',
|
|
3387
|
+
mcnSince: null,
|
|
3388
|
+
mcnNotes: null,
|
|
3389
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sms/mc-ampscript-reference-sms-msg.html',
|
|
3390
|
+
guideUrl: 'https://ampscript.guide/mobileconnect-data-strings/',
|
|
3391
|
+
minArgs: 1,
|
|
3392
|
+
maxArgs: 1,
|
|
3393
|
+
category: 'MobileConnect',
|
|
3394
|
+
description:
|
|
3395
|
+
'Returns the content of an inbound mobile-originated (MO) message. Only usable in MobileConnect. The only accepted argument value is 0.',
|
|
3396
|
+
params: [
|
|
3397
|
+
{
|
|
3398
|
+
name: 'index',
|
|
3399
|
+
description: 'Message index; the only accepted value is 0 (the current message)',
|
|
3400
|
+
type: 'number',
|
|
3401
|
+
},
|
|
3402
|
+
],
|
|
3403
|
+
returnType: 'string',
|
|
3404
|
+
returnDescription: 'The full content of the inbound mobile-originated message.',
|
|
3405
|
+
syntax: 'Msg(0)',
|
|
3406
|
+
example: '%%=Msg(0)=%%',
|
|
3407
|
+
},
|
|
2476
3408
|
{
|
|
2477
3409
|
name: 'Multiply',
|
|
2478
3410
|
mcnSince: 67,
|
|
@@ -2484,13 +3416,55 @@ export const FUNCTIONS = [
|
|
|
2484
3416
|
category: 'Math',
|
|
2485
3417
|
description: 'Computes the product of two numeric values.',
|
|
2486
3418
|
params: [
|
|
2487
|
-
{ name: '
|
|
2488
|
-
{ name: '
|
|
3419
|
+
{ name: 'number1', description: 'First operand', type: 'number' },
|
|
3420
|
+
{ name: 'number2', description: 'Second operand', type: 'number' },
|
|
2489
3421
|
],
|
|
2490
3422
|
returnType: 'number',
|
|
2491
|
-
|
|
3423
|
+
returnDescription: 'The product of the two operands.',
|
|
3424
|
+
syntax: 'Multiply(number1, number2)',
|
|
2492
3425
|
example: '%%=Multiply(5, 3)=%%',
|
|
2493
3426
|
},
|
|
3427
|
+
{
|
|
3428
|
+
name: 'Noun',
|
|
3429
|
+
mcnSince: null,
|
|
3430
|
+
mcnNotes: null,
|
|
3431
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sms/mc-ampscript-reference-sms-noun.html',
|
|
3432
|
+
guideUrl: 'https://ampscript.guide/mobileconnect-data-strings/',
|
|
3433
|
+
minArgs: 1,
|
|
3434
|
+
maxArgs: 1,
|
|
3435
|
+
category: 'MobileConnect',
|
|
3436
|
+
description:
|
|
3437
|
+
'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).',
|
|
3438
|
+
params: [
|
|
3439
|
+
{
|
|
3440
|
+
name: 'position',
|
|
3441
|
+
description:
|
|
3442
|
+
'Zero-based index of the word after the keyword to return (0 = first word after the keyword)',
|
|
3443
|
+
type: 'number',
|
|
3444
|
+
},
|
|
3445
|
+
],
|
|
3446
|
+
returnType: 'string',
|
|
3447
|
+
returnDescription: 'The requested word that follows the keyword in the inbound message.',
|
|
3448
|
+
syntax: 'Msg(0).Noun(position)',
|
|
3449
|
+
example: '%%=Msg(0).Noun(1)=%%',
|
|
3450
|
+
},
|
|
3451
|
+
{
|
|
3452
|
+
name: 'Nouns',
|
|
3453
|
+
mcnSince: null,
|
|
3454
|
+
mcnNotes: null,
|
|
3455
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sms/mc-ampscript-reference-sms-nouns.html',
|
|
3456
|
+
guideUrl: 'https://ampscript.guide/mobileconnect-data-strings/',
|
|
3457
|
+
minArgs: 0,
|
|
3458
|
+
maxArgs: 0,
|
|
3459
|
+
category: 'MobileConnect',
|
|
3460
|
+
description:
|
|
3461
|
+
'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.',
|
|
3462
|
+
params: [],
|
|
3463
|
+
returnType: 'string',
|
|
3464
|
+
returnDescription: 'All content that follows the keyword in the inbound message.',
|
|
3465
|
+
syntax: 'Msg(0).Nouns',
|
|
3466
|
+
example: '%%=Msg(0).Nouns=%%',
|
|
3467
|
+
},
|
|
2494
3468
|
{
|
|
2495
3469
|
name: 'Now',
|
|
2496
3470
|
mcnSince: 67,
|
|
@@ -2513,6 +3487,7 @@ export const FUNCTIONS = [
|
|
|
2513
3487
|
},
|
|
2514
3488
|
],
|
|
2515
3489
|
returnType: 'date',
|
|
3490
|
+
returnDescription: 'The current date and time.',
|
|
2516
3491
|
syntax: 'Now([persistFormat])',
|
|
2517
3492
|
example: '%%=Now()=%%',
|
|
2518
3493
|
},
|
|
@@ -2529,7 +3504,9 @@ export const FUNCTIONS = [
|
|
|
2529
3504
|
'Writes a value to the rendered output. Used inside script blocks to emit content.',
|
|
2530
3505
|
params: [{ name: 'content', description: 'Content to output' }],
|
|
2531
3506
|
returnType: 'void',
|
|
3507
|
+
returnDescription: 'No value is returned; the content is written to the message.',
|
|
2532
3508
|
syntax: 'Output(content)',
|
|
3509
|
+
example: "%%=Output(Concat('Hello ', @firstName))=%%",
|
|
2533
3510
|
},
|
|
2534
3511
|
{
|
|
2535
3512
|
name: 'OutputLine',
|
|
@@ -2543,7 +3520,9 @@ export const FUNCTIONS = [
|
|
|
2543
3520
|
description: 'Writes a value followed by a line break to the rendered output.',
|
|
2544
3521
|
params: [{ name: 'content', description: 'Content to output' }],
|
|
2545
3522
|
returnType: 'void',
|
|
3523
|
+
returnDescription: 'No value is returned; the content is written followed by a line break.',
|
|
2546
3524
|
syntax: 'OutputLine(content)',
|
|
3525
|
+
example: "%%=OutputLine(Concat('Hello ', @firstName))=%%",
|
|
2547
3526
|
},
|
|
2548
3527
|
{
|
|
2549
3528
|
name: 'ProperCase',
|
|
@@ -2556,9 +3535,10 @@ export const FUNCTIONS = [
|
|
|
2556
3535
|
category: 'String',
|
|
2557
3536
|
description:
|
|
2558
3537
|
'Converts a string to proper (title) case, capitalizing the first letter of each word.',
|
|
2559
|
-
params: [{ name: '
|
|
3538
|
+
params: [{ name: 'sourceString', description: 'String to convert', type: 'string' }],
|
|
2560
3539
|
returnType: 'string',
|
|
2561
|
-
|
|
3540
|
+
returnDescription: 'The string with the first letter of each word capitalized.',
|
|
3541
|
+
syntax: 'ProperCase(sourceString)',
|
|
2562
3542
|
example: "%%=ProperCase('hello world')=%%",
|
|
2563
3543
|
},
|
|
2564
3544
|
{
|
|
@@ -2574,7 +3554,9 @@ export const FUNCTIONS = [
|
|
|
2574
3554
|
'Returns the value of a URL query string parameter from the current page request.',
|
|
2575
3555
|
params: [{ name: 'parameterName', description: 'Query parameter name', type: 'string' }],
|
|
2576
3556
|
returnType: 'string',
|
|
3557
|
+
returnDescription: 'The value of the named query-string parameter.',
|
|
2577
3558
|
syntax: 'QueryParameter(parameterName)',
|
|
3559
|
+
example: "%%=QueryParameter('utm_source')=%%",
|
|
2578
3560
|
},
|
|
2579
3561
|
{
|
|
2580
3562
|
name: 'RaiseError',
|
|
@@ -2593,7 +3575,8 @@ export const FUNCTIONS = [
|
|
|
2593
3575
|
name: 'skipSubscriber',
|
|
2594
3576
|
mcnSince: null,
|
|
2595
3577
|
mcnNotes: null,
|
|
2596
|
-
description:
|
|
3578
|
+
description:
|
|
3579
|
+
'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
3580
|
type: 'boolean',
|
|
2598
3581
|
optional: true,
|
|
2599
3582
|
},
|
|
@@ -2606,24 +3589,27 @@ export const FUNCTIONS = [
|
|
|
2606
3589
|
optional: true,
|
|
2607
3590
|
},
|
|
2608
3591
|
{
|
|
2609
|
-
name: '
|
|
3592
|
+
name: 'apiErrorNumber',
|
|
2610
3593
|
mcnSince: null,
|
|
2611
3594
|
mcnNotes: null,
|
|
2612
3595
|
description: 'Custom API error message',
|
|
2613
|
-
type: '
|
|
3596
|
+
type: 'number',
|
|
2614
3597
|
optional: true,
|
|
2615
3598
|
},
|
|
2616
3599
|
{
|
|
2617
|
-
name: '
|
|
3600
|
+
name: 'preserveDataExt',
|
|
2618
3601
|
mcnSince: null,
|
|
2619
3602
|
mcnNotes: null,
|
|
2620
|
-
description:
|
|
2621
|
-
|
|
3603
|
+
description:
|
|
3604
|
+
"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",
|
|
3605
|
+
type: 'boolean',
|
|
2622
3606
|
optional: true,
|
|
2623
3607
|
},
|
|
2624
3608
|
],
|
|
2625
3609
|
returnType: 'void',
|
|
2626
|
-
|
|
3610
|
+
returnDescription: 'No value is returned; message processing is halted with an error.',
|
|
3611
|
+
syntax: 'RaiseError(message[, skipSubscriber, apiErrorCode, apiErrorNumber, preserveDataExt])',
|
|
3612
|
+
example: "RaiseError('Missing required field', 0)",
|
|
2627
3613
|
},
|
|
2628
3614
|
{
|
|
2629
3615
|
name: 'Random',
|
|
@@ -2640,6 +3626,7 @@ export const FUNCTIONS = [
|
|
|
2640
3626
|
{ name: 'max', description: 'Upper bound (inclusive)', type: 'number' },
|
|
2641
3627
|
],
|
|
2642
3628
|
returnType: 'number',
|
|
3629
|
+
returnDescription: 'A random whole number within the supplied range.',
|
|
2643
3630
|
syntax: 'Random(min, max)',
|
|
2644
3631
|
example: '%%=Random(1, 100)=%%',
|
|
2645
3632
|
},
|
|
@@ -2658,7 +3645,9 @@ export const FUNCTIONS = [
|
|
|
2658
3645
|
{ name: 'imageUrl', description: 'Base URL for star images', type: 'string' },
|
|
2659
3646
|
],
|
|
2660
3647
|
returnType: 'string',
|
|
3648
|
+
returnDescription: 'An HTML string of star images representing the rating.',
|
|
2661
3649
|
syntax: 'RatingStars(rating, maxRating, imageUrl)',
|
|
3650
|
+
example: "%%=RatingStars(4, 5, 'https://example.com/star.png')=%%",
|
|
2662
3651
|
},
|
|
2663
3652
|
{
|
|
2664
3653
|
name: 'Redirect',
|
|
@@ -2672,7 +3661,9 @@ export const FUNCTIONS = [
|
|
|
2672
3661
|
description: 'Performs an HTTP redirect to the specified URL. Landing pages only.',
|
|
2673
3662
|
params: [{ name: 'url', description: 'Target URL', type: 'string' }],
|
|
2674
3663
|
returnType: 'void',
|
|
3664
|
+
returnDescription: 'No value is returned; the request is redirected to the supplied URL.',
|
|
2675
3665
|
syntax: 'Redirect(url)',
|
|
3666
|
+
example: "Redirect('https://example.com')",
|
|
2676
3667
|
},
|
|
2677
3668
|
{
|
|
2678
3669
|
name: 'RedirectTo',
|
|
@@ -2686,6 +3677,7 @@ export const FUNCTIONS = [
|
|
|
2686
3677
|
description: 'Creates a trackable redirect URL, typically used in email links.',
|
|
2687
3678
|
params: [{ name: 'url', description: 'Target URL', type: 'string' }],
|
|
2688
3679
|
returnType: 'string',
|
|
3680
|
+
returnDescription: 'A tracked URL that redirects to the supplied address.',
|
|
2689
3681
|
syntax: 'RedirectTo(url)',
|
|
2690
3682
|
example: '%%=RedirectTo(@targetUrl)=%%',
|
|
2691
3683
|
},
|
|
@@ -2696,31 +3688,38 @@ export const FUNCTIONS = [
|
|
|
2696
3688
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-string/mc-ampscript-reference-string-regex-match.html',
|
|
2697
3689
|
guideUrl: 'https://ampscript.guide/regexmatch/',
|
|
2698
3690
|
minArgs: 3,
|
|
2699
|
-
maxArgs:
|
|
3691
|
+
maxArgs: 4,
|
|
2700
3692
|
category: 'String',
|
|
2701
3693
|
description:
|
|
2702
|
-
'Tests a string against a regular expression pattern and
|
|
3694
|
+
'Tests a string against a regular expression pattern and returns first occurrence of the matching regular expression pattern.',
|
|
2703
3695
|
params: [
|
|
2704
|
-
{ name: '
|
|
2705
|
-
{ name: 'pattern', description: 'Regular expression pattern', type: 'string' },
|
|
3696
|
+
{ name: 'sourceString', description: 'String to match against', type: 'string' },
|
|
2706
3697
|
{
|
|
2707
|
-
name: '
|
|
2708
|
-
|
|
2709
|
-
mcnNotes: null,
|
|
2710
|
-
description: 'Output variable for first capture group',
|
|
3698
|
+
name: 'regExPattern',
|
|
3699
|
+
description: 'The regular expression to use in the search',
|
|
2711
3700
|
type: 'string',
|
|
2712
3701
|
},
|
|
2713
3702
|
{
|
|
2714
|
-
name: '
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
3703
|
+
name: 'returnValue',
|
|
3704
|
+
description: 'The name or ordinal of the matching group to return',
|
|
3705
|
+
type: 'string',
|
|
3706
|
+
},
|
|
3707
|
+
{
|
|
3708
|
+
name: 'regExOptions',
|
|
3709
|
+
description:
|
|
3710
|
+
'A .NET RegexOptions value to apply to the search, such as IgnoreCase or Multiline',
|
|
2718
3711
|
type: 'string',
|
|
2719
3712
|
optional: true,
|
|
2720
3713
|
},
|
|
2721
3714
|
],
|
|
2722
|
-
returnType: '
|
|
2723
|
-
|
|
3715
|
+
returnType: 'string',
|
|
3716
|
+
returnDescription: 'The matched text, or an empty string when there is no match.',
|
|
3717
|
+
syntax: 'RegExMatch(sourceString, regExPattern, returnValue[, regExOptions])',
|
|
3718
|
+
example:
|
|
3719
|
+
'Var @couponCode, @regEx, @regExMatch\n' +
|
|
3720
|
+
'Set @couponCode = "SAVE23"\n' +
|
|
3721
|
+
'Set @regEx = "^[A-Z0-9]{5,7}$"\n' +
|
|
3722
|
+
'Set @regExMatch = RegExMatch(@couponCode, @regEx, 0, "IgnoreCase")',
|
|
2724
3723
|
},
|
|
2725
3724
|
{
|
|
2726
3725
|
name: 'Replace',
|
|
@@ -2733,12 +3732,13 @@ export const FUNCTIONS = [
|
|
|
2733
3732
|
category: 'String',
|
|
2734
3733
|
description: 'Replaces all occurrences of a substring with a new value.',
|
|
2735
3734
|
params: [
|
|
2736
|
-
{ name: '
|
|
2737
|
-
{ name: '
|
|
2738
|
-
{ name: '
|
|
3735
|
+
{ name: 'sourceString', description: 'Source string', type: 'string' },
|
|
3736
|
+
{ name: 'searchSubstring', description: 'Substring to find', type: 'string' },
|
|
3737
|
+
{ name: 'replacementSubstring', description: 'Replacement string', type: 'string' },
|
|
2739
3738
|
],
|
|
2740
3739
|
returnType: 'string',
|
|
2741
|
-
|
|
3740
|
+
returnDescription: 'The string with all occurrences of the search text replaced.',
|
|
3741
|
+
syntax: 'Replace(sourceString, searchSubstring, replacementSubstring)',
|
|
2742
3742
|
example: "%%=Replace('Hello World', 'World', 'There')=%%",
|
|
2743
3743
|
},
|
|
2744
3744
|
{
|
|
@@ -2752,20 +3752,22 @@ export const FUNCTIONS = [
|
|
|
2752
3752
|
category: 'String',
|
|
2753
3753
|
description: 'Replaces multiple old values in a string with a single new value.',
|
|
2754
3754
|
params: [
|
|
2755
|
-
{ name: '
|
|
2756
|
-
{ name: '
|
|
2757
|
-
{ name: '
|
|
3755
|
+
{ name: 'sourceString', description: 'Source string', type: 'string' },
|
|
3756
|
+
{ name: 'replacementString', description: 'Replacement string', type: 'string' },
|
|
3757
|
+
{ name: 'searchString1', description: 'First value to replace', type: 'string' },
|
|
2758
3758
|
{
|
|
2759
|
-
name: '
|
|
2760
|
-
mcnSince: null,
|
|
2761
|
-
mcnNotes: null,
|
|
3759
|
+
name: 'searchStringN',
|
|
2762
3760
|
description: 'Additional value to replace',
|
|
2763
3761
|
type: 'string',
|
|
2764
3762
|
optional: true,
|
|
2765
3763
|
},
|
|
2766
3764
|
],
|
|
2767
3765
|
returnType: 'string',
|
|
2768
|
-
|
|
3766
|
+
returnDescription:
|
|
3767
|
+
'The string with every supplied search value replaced by the replacement.',
|
|
3768
|
+
repeat: [{ startIndex: 2, groupSize: 1, minGroups: 1 }],
|
|
3769
|
+
syntax: 'ReplaceList(sourceString, replacementString, searchString1[, searchStringN, ...])',
|
|
3770
|
+
example: "%%=ReplaceList('a-b/c', '_', '-', '/')=%%",
|
|
2769
3771
|
},
|
|
2770
3772
|
{
|
|
2771
3773
|
name: 'RequestParameter',
|
|
@@ -2780,7 +3782,9 @@ export const FUNCTIONS = [
|
|
|
2780
3782
|
'Returns the value of a form post or query string parameter from the current request.',
|
|
2781
3783
|
params: [{ name: 'parameterName', description: 'Parameter name', type: 'string' }],
|
|
2782
3784
|
returnType: 'string',
|
|
3785
|
+
returnDescription: 'The value of the named request parameter.',
|
|
2783
3786
|
syntax: 'RequestParameter(parameterName)',
|
|
3787
|
+
example: "%%=RequestParameter('id')=%%",
|
|
2784
3788
|
},
|
|
2785
3789
|
{
|
|
2786
3790
|
name: 'RetrieveMSCRMRecords',
|
|
@@ -2793,20 +3797,36 @@ export const FUNCTIONS = [
|
|
|
2793
3797
|
category: 'Microsoft Dynamics CRM',
|
|
2794
3798
|
description: 'Retrieves records from Dynamics CRM using a simple filter.',
|
|
2795
3799
|
params: [
|
|
2796
|
-
{ name: 'entityType', description: 'CRM entity type name', type: 'string' },
|
|
2797
3800
|
{
|
|
2798
|
-
name: '
|
|
3801
|
+
name: 'entityName',
|
|
3802
|
+
description:
|
|
3803
|
+
'The name of the Microsoft Dynamics CRM entity to retrieve records from',
|
|
3804
|
+
type: 'string',
|
|
3805
|
+
},
|
|
3806
|
+
{
|
|
3807
|
+
name: 'fieldsToRetrieve',
|
|
2799
3808
|
mcnSince: null,
|
|
2800
3809
|
mcnNotes: null,
|
|
2801
|
-
description: '
|
|
3810
|
+
description: 'A comma-separated list of fields to retrieve',
|
|
3811
|
+
type: 'string',
|
|
3812
|
+
},
|
|
3813
|
+
{
|
|
3814
|
+
name: 'queryFieldName',
|
|
3815
|
+
description: 'The name of the field to filter on',
|
|
3816
|
+
type: 'string',
|
|
3817
|
+
},
|
|
3818
|
+
{
|
|
3819
|
+
name: 'queryFieldOperator',
|
|
3820
|
+
description: 'The operator to use for the filter',
|
|
2802
3821
|
type: 'string',
|
|
2803
3822
|
},
|
|
2804
|
-
{ name: '
|
|
2805
|
-
{ name: 'filterOperator', description: 'Comparison operator', type: 'string' },
|
|
2806
|
-
{ name: 'filterValue', description: 'Filter value' },
|
|
3823
|
+
{ name: 'queryFieldValue', description: 'The value to filter on' },
|
|
2807
3824
|
],
|
|
2808
3825
|
returnType: 'rowset',
|
|
2809
|
-
|
|
3826
|
+
returnDescription: 'A rowset of matching Microsoft Dynamics CRM records.',
|
|
3827
|
+
syntax: 'RetrieveMSCRMRecords(entityName, fieldsToRetrieve, queryFieldName, queryFieldOperator, queryFieldValue)',
|
|
3828
|
+
example:
|
|
3829
|
+
"%%[ SET @rows = RetrieveMSCRMRecords('contact', 'fullname,emailaddress1', 'lastname', 'eq', 'Smith') ]%%",
|
|
2810
3830
|
},
|
|
2811
3831
|
{
|
|
2812
3832
|
name: 'RetrieveMSCRMRecordsFetchXML',
|
|
@@ -2820,7 +3840,9 @@ export const FUNCTIONS = [
|
|
|
2820
3840
|
description: 'Retrieves records from Dynamics CRM using a FetchXML query.',
|
|
2821
3841
|
params: [{ name: 'fetchXml', description: 'FetchXML query string', type: 'string' }],
|
|
2822
3842
|
returnType: 'rowset',
|
|
3843
|
+
returnDescription: 'A rowset of CRM records matching the FetchXML query.',
|
|
2823
3844
|
syntax: 'RetrieveMSCRMRecordsFetchXML(fetchXml)',
|
|
3845
|
+
example: '%%[ SET @rows = RetrieveMSCRMRecordsFetchXML(@fetchXml) ]%%',
|
|
2824
3846
|
},
|
|
2825
3847
|
{
|
|
2826
3848
|
name: 'RetrieveSalesforceJobSources',
|
|
@@ -2832,9 +3854,11 @@ export const FUNCTIONS = [
|
|
|
2832
3854
|
maxArgs: 1,
|
|
2833
3855
|
category: 'Sales and Service Cloud',
|
|
2834
3856
|
description: 'Retrieves the data sources associated with a Salesforce-triggered send job.',
|
|
2835
|
-
params: [{ name: 'jobId', description: 'Job identifier', type: '
|
|
3857
|
+
params: [{ name: 'jobId', description: 'Job identifier', type: 'number' }],
|
|
2836
3858
|
returnType: 'rowset',
|
|
3859
|
+
returnDescription: 'A rowset describing the sources of the referenced send job.',
|
|
2837
3860
|
syntax: 'RetrieveSalesforceJobSources(jobId)',
|
|
3861
|
+
example: '%%[ SET @rows = RetrieveSalesforceJobSources(@jobId) ]%%',
|
|
2838
3862
|
},
|
|
2839
3863
|
{
|
|
2840
3864
|
name: 'RetrieveSalesforceObjects',
|
|
@@ -2847,37 +3871,53 @@ export const FUNCTIONS = [
|
|
|
2847
3871
|
category: 'Sales and Service Cloud',
|
|
2848
3872
|
description: 'Retrieves records from a connected Salesforce CRM object.',
|
|
2849
3873
|
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
3874
|
{
|
|
2856
|
-
name: '
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
3875
|
+
name: 'objectName',
|
|
3876
|
+
description: 'The API name of the Salesforce object to retrieve information from',
|
|
3877
|
+
type: 'string',
|
|
3878
|
+
},
|
|
3879
|
+
{
|
|
3880
|
+
name: 'fieldsToRetrieve',
|
|
3881
|
+
description: 'A comma-separated list of fields to retrieve information from',
|
|
3882
|
+
type: 'string',
|
|
3883
|
+
},
|
|
3884
|
+
{
|
|
3885
|
+
name: 'queryFieldName1',
|
|
3886
|
+
description: 'The name of the field to filter on',
|
|
3887
|
+
type: 'string',
|
|
3888
|
+
},
|
|
3889
|
+
{
|
|
3890
|
+
name: 'queryFieldOperator1',
|
|
3891
|
+
description: 'The comparison operator to use for the filter',
|
|
3892
|
+
type: 'string',
|
|
3893
|
+
enum: ['=', '!=', '<', '<=', '>', '>=', 'like'],
|
|
3894
|
+
},
|
|
3895
|
+
{ name: 'queryFieldValue1', description: 'The value to filter on' },
|
|
3896
|
+
{
|
|
3897
|
+
name: 'queryFieldNameN',
|
|
3898
|
+
description: 'Additional filter field name (joined with AND)',
|
|
2860
3899
|
type: 'string',
|
|
2861
3900
|
optional: true,
|
|
2862
3901
|
},
|
|
2863
3902
|
{
|
|
2864
|
-
name: '
|
|
2865
|
-
|
|
2866
|
-
mcnNotes: null,
|
|
2867
|
-
description: 'Additional operator',
|
|
3903
|
+
name: 'queryFieldOperatorN',
|
|
3904
|
+
description: 'Additional comparison operator',
|
|
2868
3905
|
type: 'string',
|
|
3906
|
+
enum: ['=', '!=', '<', '<=', '>', '>=', 'like'],
|
|
2869
3907
|
optional: true,
|
|
2870
3908
|
},
|
|
2871
3909
|
{
|
|
2872
|
-
name: '
|
|
2873
|
-
mcnSince: null,
|
|
2874
|
-
mcnNotes: null,
|
|
3910
|
+
name: 'queryFieldValueN',
|
|
2875
3911
|
description: 'Additional filter value',
|
|
2876
3912
|
optional: true,
|
|
2877
3913
|
},
|
|
2878
3914
|
],
|
|
2879
3915
|
returnType: 'rowset',
|
|
2880
|
-
|
|
3916
|
+
returnDescription: 'A rowset of matching Salesforce object records.',
|
|
3917
|
+
repeat: [{ startIndex: 2, groupSize: 3, minGroups: 1 }],
|
|
3918
|
+
syntax: 'RetrieveSalesforceObjects(objectName, fieldsToRetrieve, queryFieldName1, queryFieldOperator1, queryFieldValue1[, queryFieldNameN, queryFieldOperatorN, queryFieldValueN, ...])',
|
|
3919
|
+
example:
|
|
3920
|
+
"%%[ SET @rows = RetrieveSalesforceObjects('Contact', 'Id,Email', 'LastName', '=', 'Smith') ]%%",
|
|
2881
3921
|
},
|
|
2882
3922
|
{
|
|
2883
3923
|
name: 'Row',
|
|
@@ -2894,6 +3934,7 @@ export const FUNCTIONS = [
|
|
|
2894
3934
|
{ name: 'rowIndex', description: '1-based row index', type: 'number' },
|
|
2895
3935
|
],
|
|
2896
3936
|
returnType: 'row',
|
|
3937
|
+
returnDescription: 'The row at the requested 1-based index within the rowset.',
|
|
2897
3938
|
syntax: 'Row(rowset, rowIndex)',
|
|
2898
3939
|
example: '%%=Row(@rows, 1)=%%',
|
|
2899
3940
|
},
|
|
@@ -2909,6 +3950,7 @@ export const FUNCTIONS = [
|
|
|
2909
3950
|
description: 'Returns the number of rows in a rowset.',
|
|
2910
3951
|
params: [{ name: 'rowset', description: 'Rowset to count' }],
|
|
2911
3952
|
returnType: 'number',
|
|
3953
|
+
returnDescription: 'The number of rows in the rowset.',
|
|
2912
3954
|
syntax: 'RowCount(rowset)',
|
|
2913
3955
|
example: '%%=RowCount(@rows)=%%',
|
|
2914
3956
|
},
|
|
@@ -2924,11 +3966,21 @@ export const FUNCTIONS = [
|
|
|
2924
3966
|
description: 'Sets a property value on a Marketing Cloud API object.',
|
|
2925
3967
|
params: [
|
|
2926
3968
|
{ name: 'apiObject', description: 'API object reference' },
|
|
2927
|
-
{
|
|
2928
|
-
|
|
3969
|
+
{
|
|
3970
|
+
name: 'propertyName',
|
|
3971
|
+
description: 'The name of the property to assign a value to',
|
|
3972
|
+
type: 'string',
|
|
3973
|
+
},
|
|
3974
|
+
{
|
|
3975
|
+
name: 'propertyValue',
|
|
3976
|
+
description: 'The value to assign to the property',
|
|
3977
|
+
type: 'string',
|
|
3978
|
+
},
|
|
2929
3979
|
],
|
|
2930
3980
|
returnType: 'void',
|
|
2931
|
-
|
|
3981
|
+
returnDescription: 'No value is returned; the named property is set on the object.',
|
|
3982
|
+
syntax: 'SetObjectProperty(apiObject, propertyName, propertyValue)',
|
|
3983
|
+
example: "SetObjectProperty(@apiObject, 'LastName', 'Smith')",
|
|
2932
3984
|
},
|
|
2933
3985
|
{
|
|
2934
3986
|
name: 'SetSmsConversationNextKeyword',
|
|
@@ -2945,10 +3997,12 @@ export const FUNCTIONS = [
|
|
|
2945
3997
|
{ name: 'nextKeyword', description: 'Next expected keyword', type: 'string' },
|
|
2946
3998
|
],
|
|
2947
3999
|
returnType: 'void',
|
|
4000
|
+
returnDescription: 'No value is returned; the next expected keyword is set.',
|
|
2948
4001
|
syntax: 'SetSmsConversationNextKeyword(shortCode, keyword, nextKeyword)',
|
|
4002
|
+
example: "SetSmsConversationNextKeyword('12345', 'JOIN', 'CONFIRM')",
|
|
2949
4003
|
},
|
|
2950
4004
|
{
|
|
2951
|
-
name: '
|
|
4005
|
+
name: 'SetStateMscrmRecord',
|
|
2952
4006
|
mcnSince: null,
|
|
2953
4007
|
mcnNotes: null,
|
|
2954
4008
|
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 +4012,33 @@ export const FUNCTIONS = [
|
|
|
2958
4012
|
category: 'Microsoft Dynamics CRM',
|
|
2959
4013
|
description: 'Sets the state and status of a Dynamics CRM record.',
|
|
2960
4014
|
params: [
|
|
2961
|
-
{
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
4015
|
+
{
|
|
4016
|
+
name: 'recordGuid',
|
|
4017
|
+
description: 'The GUID of the record to set the state and status of',
|
|
4018
|
+
type: 'string',
|
|
4019
|
+
},
|
|
4020
|
+
{
|
|
4021
|
+
name: 'entityName',
|
|
4022
|
+
description: 'The name of the Microsoft Dynamics CRM entity',
|
|
4023
|
+
type: 'string',
|
|
4024
|
+
},
|
|
4025
|
+
{
|
|
4026
|
+
name: 'stateToSet',
|
|
4027
|
+
description: 'The state to set for the record.',
|
|
4028
|
+
type: 'string',
|
|
4029
|
+
enum: ['active', 'inactive'],
|
|
4030
|
+
},
|
|
4031
|
+
{
|
|
4032
|
+
name: 'statusToSet',
|
|
4033
|
+
description: 'The status to set for the record.',
|
|
4034
|
+
type: 'number',
|
|
4035
|
+
enum: [0, 1, -1],
|
|
4036
|
+
},
|
|
2965
4037
|
],
|
|
2966
4038
|
returnType: 'void',
|
|
2967
|
-
|
|
4039
|
+
returnDescription: 'No value is returned; the record state and status are updated.',
|
|
4040
|
+
syntax: 'SetStateMscrmRecord(recordGuid, entityName, stateToSet, statusToSet)',
|
|
4041
|
+
example: "SetStateMscrmRecord(@guid, 'contact', 'active', 1)",
|
|
2968
4042
|
},
|
|
2969
4043
|
{
|
|
2970
4044
|
name: 'SHA1',
|
|
@@ -2977,18 +4051,22 @@ export const FUNCTIONS = [
|
|
|
2977
4051
|
category: 'Encryption and Encoding',
|
|
2978
4052
|
description: 'Returns the SHA-1 hash of the input value.',
|
|
2979
4053
|
params: [
|
|
2980
|
-
{ name: '
|
|
4054
|
+
{ name: 'stringToConvert', description: 'The string to encode', type: 'string' },
|
|
2981
4055
|
{
|
|
2982
|
-
name: '
|
|
4056
|
+
name: 'charSet',
|
|
2983
4057
|
mcnSince: null,
|
|
2984
4058
|
mcnNotes: null,
|
|
2985
|
-
description: '
|
|
4059
|
+
description: 'Character set to use for the encoding',
|
|
2986
4060
|
type: 'string',
|
|
4061
|
+
enum: ['UTF-8', 'UTF-16'],
|
|
2987
4062
|
optional: true,
|
|
4063
|
+
default: 'UTF-8',
|
|
2988
4064
|
},
|
|
2989
4065
|
],
|
|
2990
4066
|
returnType: 'string',
|
|
2991
|
-
|
|
4067
|
+
returnDescription: 'The SHA-1 hash of the input as a hexadecimal string.',
|
|
4068
|
+
syntax: 'SHA1(stringToConvert[, charSet])',
|
|
4069
|
+
example: "%%=SHA1('This is a string of text.')=%%",
|
|
2992
4070
|
},
|
|
2993
4071
|
{
|
|
2994
4072
|
name: 'SHA256',
|
|
@@ -3001,19 +4079,22 @@ export const FUNCTIONS = [
|
|
|
3001
4079
|
category: 'Encryption and Encoding',
|
|
3002
4080
|
description: 'Returns the SHA-256 hash of the input value.',
|
|
3003
4081
|
params: [
|
|
3004
|
-
{ name: '
|
|
4082
|
+
{ name: 'stringToConvert', description: 'The string to encode', type: 'string' },
|
|
3005
4083
|
{
|
|
3006
|
-
name: '
|
|
4084
|
+
name: 'charSet',
|
|
3007
4085
|
mcnSince: null,
|
|
3008
4086
|
mcnNotes: null,
|
|
3009
|
-
description: '
|
|
4087
|
+
description: 'Character set to use for the encoding',
|
|
3010
4088
|
type: 'string',
|
|
4089
|
+
enum: ['UTF-8', 'UTF-16'],
|
|
3011
4090
|
optional: true,
|
|
4091
|
+
default: 'UTF-8',
|
|
3012
4092
|
},
|
|
3013
4093
|
],
|
|
3014
4094
|
returnType: 'string',
|
|
3015
|
-
|
|
3016
|
-
|
|
4095
|
+
returnDescription: 'The SHA-256 hash of the input as a hexadecimal string.',
|
|
4096
|
+
syntax: 'SHA256(stringToConvert[, charSet])',
|
|
4097
|
+
example: '%%=SHA256("This is a string of text.")=%%',
|
|
3017
4098
|
},
|
|
3018
4099
|
{
|
|
3019
4100
|
name: 'SHA512',
|
|
@@ -3026,36 +4107,39 @@ export const FUNCTIONS = [
|
|
|
3026
4107
|
category: 'Encryption and Encoding',
|
|
3027
4108
|
description: 'Returns the SHA-512 hash of the input value.',
|
|
3028
4109
|
params: [
|
|
3029
|
-
{ name: '
|
|
4110
|
+
{ name: 'stringToConvert', description: 'The string to encode', type: 'string' },
|
|
3030
4111
|
{
|
|
3031
|
-
name: '
|
|
4112
|
+
name: 'charSet',
|
|
3032
4113
|
mcnSince: null,
|
|
3033
4114
|
mcnNotes: null,
|
|
3034
|
-
description: '
|
|
4115
|
+
description: 'Character set to use for the encoding',
|
|
3035
4116
|
type: 'string',
|
|
4117
|
+
enum: ['UTF-8', 'UTF-16'],
|
|
3036
4118
|
optional: true,
|
|
4119
|
+
default: 'UTF-8',
|
|
3037
4120
|
},
|
|
3038
4121
|
],
|
|
3039
4122
|
returnType: 'string',
|
|
3040
|
-
|
|
4123
|
+
returnDescription: 'The SHA-512 hash of the input as a hexadecimal string.',
|
|
4124
|
+
syntax: 'SHA512(stringToConvert[, charSet])',
|
|
4125
|
+
example: "%%=SHA512('This is a string of text.')=%%",
|
|
3041
4126
|
},
|
|
3042
4127
|
{
|
|
3043
4128
|
name: 'StringToDate',
|
|
3044
4129
|
mcnSince: 67,
|
|
3045
4130
|
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
|
|
4131
|
+
'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
4132
|
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
4133
|
guideUrl: 'https://ampscript.guide/stringtodate/',
|
|
3049
4134
|
minArgs: 1,
|
|
3050
|
-
maxArgs:
|
|
4135
|
+
maxArgs: 1,
|
|
3051
4136
|
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
|
-
],
|
|
4137
|
+
description: 'Converts a date string to a date value.',
|
|
4138
|
+
params: [{ name: 'dateString', description: 'String to convert', type: 'string' }],
|
|
3057
4139
|
returnType: 'date',
|
|
3058
|
-
|
|
4140
|
+
returnDescription: 'The date value parsed from the supplied string.',
|
|
4141
|
+
syntax: 'StringToDate(dateString)',
|
|
4142
|
+
example: "%%=StringToDate('2026-01-15')=%%",
|
|
3059
4143
|
},
|
|
3060
4144
|
{
|
|
3061
4145
|
name: 'StringToHex',
|
|
@@ -3068,11 +4152,24 @@ export const FUNCTIONS = [
|
|
|
3068
4152
|
category: 'Encryption and Encoding',
|
|
3069
4153
|
description: 'Converts a string to its hexadecimal representation.',
|
|
3070
4154
|
params: [
|
|
3071
|
-
{
|
|
3072
|
-
|
|
4155
|
+
{
|
|
4156
|
+
name: 'sourceString',
|
|
4157
|
+
description: 'The string to convert to hexadecimal character codes',
|
|
4158
|
+
type: 'string',
|
|
4159
|
+
},
|
|
4160
|
+
{
|
|
4161
|
+
name: 'charSet',
|
|
4162
|
+
description: 'Character set to use for encoding',
|
|
4163
|
+
type: 'string',
|
|
4164
|
+
enum: ['UTF-8', 'UTF-16'],
|
|
4165
|
+
optional: true,
|
|
4166
|
+
default: 'UTF-8',
|
|
4167
|
+
},
|
|
3073
4168
|
],
|
|
3074
4169
|
returnType: 'string',
|
|
3075
|
-
|
|
4170
|
+
returnDescription: 'The hexadecimal representation of the input string.',
|
|
4171
|
+
syntax: 'StringToHex(sourceString[, charSet])',
|
|
4172
|
+
example: "%%=StringToHex('AB')=%%",
|
|
3076
4173
|
},
|
|
3077
4174
|
{
|
|
3078
4175
|
name: 'Substring',
|
|
@@ -3086,10 +4183,10 @@ export const FUNCTIONS = [
|
|
|
3086
4183
|
description:
|
|
3087
4184
|
'Extracts a portion of a string starting at the given index for the specified length.',
|
|
3088
4185
|
params: [
|
|
3089
|
-
{ name: '
|
|
3090
|
-
{ name: '
|
|
4186
|
+
{ name: 'sourceString', description: 'Source string', type: 'string' },
|
|
4187
|
+
{ name: 'startPosition', description: '1-based start position', type: 'number' },
|
|
3091
4188
|
{
|
|
3092
|
-
name: '
|
|
4189
|
+
name: 'substringLength',
|
|
3093
4190
|
mcnSince: 67,
|
|
3094
4191
|
mcnNotes: null,
|
|
3095
4192
|
description:
|
|
@@ -3099,7 +4196,8 @@ export const FUNCTIONS = [
|
|
|
3099
4196
|
},
|
|
3100
4197
|
],
|
|
3101
4198
|
returnType: 'string',
|
|
3102
|
-
|
|
4199
|
+
returnDescription: 'The requested portion of the string.',
|
|
4200
|
+
syntax: 'Substring(sourceString, startPosition[, substringLength])',
|
|
3103
4201
|
example: "%%=Substring('Hello World', 1, 5)=%%",
|
|
3104
4202
|
},
|
|
3105
4203
|
{
|
|
@@ -3113,11 +4211,12 @@ export const FUNCTIONS = [
|
|
|
3113
4211
|
category: 'Math',
|
|
3114
4212
|
description: 'Computes the difference between two numeric values.',
|
|
3115
4213
|
params: [
|
|
3116
|
-
{ name: '
|
|
3117
|
-
{ name: '
|
|
4214
|
+
{ name: 'minuend', description: 'Value to subtract from', type: 'number' },
|
|
4215
|
+
{ name: 'subtrahend', description: 'Value to subtract', type: 'number' },
|
|
3118
4216
|
],
|
|
3119
4217
|
returnType: 'number',
|
|
3120
|
-
|
|
4218
|
+
returnDescription: 'The difference of the two operands.',
|
|
4219
|
+
syntax: 'Subtract(minuend, subtrahend)',
|
|
3121
4220
|
example: '%%=Subtract(50, 15)=%%',
|
|
3122
4221
|
},
|
|
3123
4222
|
{
|
|
@@ -3131,9 +4230,17 @@ export const FUNCTIONS = [
|
|
|
3131
4230
|
category: 'Date and Time',
|
|
3132
4231
|
description:
|
|
3133
4232
|
"Converts a Marketing Cloud system date (Central Time) to the subscriber's local time.",
|
|
3134
|
-
params: [
|
|
3135
|
-
|
|
3136
|
-
|
|
4233
|
+
params: [
|
|
4234
|
+
{
|
|
4235
|
+
name: 'systemTime',
|
|
4236
|
+
description: 'The system time value that you want to convert to local time',
|
|
4237
|
+
type: 'string',
|
|
4238
|
+
},
|
|
4239
|
+
],
|
|
4240
|
+
returnType: 'string',
|
|
4241
|
+
returnDescription: 'The supplied system (account) time converted to local time.',
|
|
4242
|
+
syntax: 'SystemDateToLocalDate(systemTime)',
|
|
4243
|
+
example: '%%=SystemDateToLocalDate(Now())=%%',
|
|
3137
4244
|
},
|
|
3138
4245
|
{
|
|
3139
4246
|
name: 'TransformXML',
|
|
@@ -3146,11 +4253,13 @@ export const FUNCTIONS = [
|
|
|
3146
4253
|
category: 'Content',
|
|
3147
4254
|
description: 'Transforms an XML document using an XSLT stylesheet.',
|
|
3148
4255
|
params: [
|
|
3149
|
-
{ name: '
|
|
3150
|
-
{ name: '
|
|
4256
|
+
{ name: 'xmlDocument', description: 'XML document string', type: 'string' },
|
|
4257
|
+
{ name: 'xslDocument', description: 'XSLT stylesheet string', type: 'string' },
|
|
3151
4258
|
],
|
|
3152
4259
|
returnType: 'string',
|
|
3153
|
-
|
|
4260
|
+
returnDescription: 'The result of applying the XSL transform to the XML document.',
|
|
4261
|
+
syntax: 'TransformXML(xmlDocument, xslDocument)',
|
|
4262
|
+
example: '%%=TransformXML(@xml, @xsl)=%%',
|
|
3154
4263
|
},
|
|
3155
4264
|
{
|
|
3156
4265
|
name: 'TreatAsContent',
|
|
@@ -3165,7 +4274,7 @@ export const FUNCTIONS = [
|
|
|
3165
4274
|
'Evaluates a string as AMPscript content, rendering any embedded AMPscript expressions.',
|
|
3166
4275
|
params: [
|
|
3167
4276
|
{
|
|
3168
|
-
name: '
|
|
4277
|
+
name: 'stringToReturn',
|
|
3169
4278
|
mcnSince: null,
|
|
3170
4279
|
mcnNotes: null,
|
|
3171
4280
|
description: 'String containing AMPscript to evaluate',
|
|
@@ -3173,7 +4282,9 @@ export const FUNCTIONS = [
|
|
|
3173
4282
|
},
|
|
3174
4283
|
],
|
|
3175
4284
|
returnType: 'string',
|
|
3176
|
-
|
|
4285
|
+
returnDescription: 'The supplied string rendered as AMPscript content.',
|
|
4286
|
+
syntax: 'TreatAsContent(stringToReturn)',
|
|
4287
|
+
example: '%%=TreatAsContent(@dynamicContent)=%%',
|
|
3177
4288
|
},
|
|
3178
4289
|
{
|
|
3179
4290
|
name: 'TreatAsContentArea',
|
|
@@ -3187,8 +4298,8 @@ export const FUNCTIONS = [
|
|
|
3187
4298
|
description:
|
|
3188
4299
|
'Treats a string as a content area, optionally assigning it to an impression region.',
|
|
3189
4300
|
params: [
|
|
3190
|
-
{ name: '
|
|
3191
|
-
{ name: '
|
|
4301
|
+
{ name: 'contentKey', description: 'Content area key identifier', type: 'string' },
|
|
4302
|
+
{ name: 'contentValue', description: 'HTML/AMPscript content', type: 'string' },
|
|
3192
4303
|
{
|
|
3193
4304
|
name: 'impressionRegion',
|
|
3194
4305
|
mcnSince: null,
|
|
@@ -3199,7 +4310,9 @@ export const FUNCTIONS = [
|
|
|
3199
4310
|
},
|
|
3200
4311
|
],
|
|
3201
4312
|
returnType: 'string',
|
|
3202
|
-
|
|
4313
|
+
returnDescription: 'The supplied value rendered as a content area.',
|
|
4314
|
+
syntax: 'TreatAsContentArea(contentKey, contentValue[, impressionRegion])',
|
|
4315
|
+
example: "%%=TreatAsContentArea('region-key', @content)=%%",
|
|
3203
4316
|
},
|
|
3204
4317
|
{
|
|
3205
4318
|
name: 'Trim',
|
|
@@ -3211,9 +4324,10 @@ export const FUNCTIONS = [
|
|
|
3211
4324
|
maxArgs: 1,
|
|
3212
4325
|
category: 'String',
|
|
3213
4326
|
description: 'Removes leading and trailing whitespace from a string.',
|
|
3214
|
-
params: [{ name: '
|
|
4327
|
+
params: [{ name: 'sourceString', description: 'String to trim', type: 'string' }],
|
|
3215
4328
|
returnType: 'string',
|
|
3216
|
-
|
|
4329
|
+
returnDescription: 'The string with leading and trailing whitespace removed.',
|
|
4330
|
+
syntax: 'Trim(sourceString)',
|
|
3217
4331
|
example: "%%=Trim(' hello ')=%%",
|
|
3218
4332
|
},
|
|
3219
4333
|
{
|
|
@@ -3226,17 +4340,59 @@ export const FUNCTIONS = [
|
|
|
3226
4340
|
maxArgs: INF,
|
|
3227
4341
|
category: 'Data Extension',
|
|
3228
4342
|
description:
|
|
3229
|
-
'Updates existing rows in a data extension that match the specified
|
|
4343
|
+
'Updates existing rows in a data extension that match the specified search columns. Returns the number of rows updated.',
|
|
3230
4344
|
params: [
|
|
3231
|
-
{
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
{
|
|
4345
|
+
{
|
|
4346
|
+
name: 'dataExt',
|
|
4347
|
+
description: 'The name of the data extension that contains the data to update',
|
|
4348
|
+
type: 'string',
|
|
4349
|
+
},
|
|
4350
|
+
{
|
|
4351
|
+
name: 'columnValuePairs',
|
|
4352
|
+
description:
|
|
4353
|
+
'The number of column and value pairs for the function to match against',
|
|
4354
|
+
type: 'number',
|
|
4355
|
+
},
|
|
4356
|
+
{
|
|
4357
|
+
name: 'searchColumnName1',
|
|
4358
|
+
description: 'The name of a column to search for the data to update',
|
|
4359
|
+
type: 'string',
|
|
4360
|
+
},
|
|
4361
|
+
{ name: 'searchValue1', description: 'The value that identifies the row to update' },
|
|
4362
|
+
{
|
|
4363
|
+
name: 'searchColumnNameN',
|
|
4364
|
+
description: 'Additional search column name (count given by columnValuePairs)',
|
|
4365
|
+
type: 'string',
|
|
4366
|
+
optional: true,
|
|
4367
|
+
},
|
|
4368
|
+
{
|
|
4369
|
+
name: 'searchValueN',
|
|
4370
|
+
description: 'Additional search value (count given by columnValuePairs)',
|
|
4371
|
+
optional: true,
|
|
4372
|
+
},
|
|
4373
|
+
{
|
|
4374
|
+
name: 'columnToUpdate1',
|
|
4375
|
+
description: 'The column that contains the data to update',
|
|
4376
|
+
type: 'string',
|
|
4377
|
+
},
|
|
4378
|
+
{ name: 'updatedValue1', description: 'The data to update in the specified column' },
|
|
4379
|
+
{
|
|
4380
|
+
name: 'columnToUpdateN',
|
|
4381
|
+
description: 'Additional column to update',
|
|
4382
|
+
type: 'string',
|
|
4383
|
+
optional: true,
|
|
4384
|
+
},
|
|
4385
|
+
{ name: 'updatedValueN', description: 'Additional value to update', optional: true },
|
|
3237
4386
|
],
|
|
3238
4387
|
returnType: 'number',
|
|
3239
|
-
|
|
4388
|
+
returnDescription: 'The number of rows updated.',
|
|
4389
|
+
repeat: [
|
|
4390
|
+
{ startIndex: 2, groupSize: 2, minGroups: 1, countParam: 'columnValuePairs' },
|
|
4391
|
+
{ startIndex: 4, groupSize: 2, minGroups: 1 },
|
|
4392
|
+
],
|
|
4393
|
+
syntax: 'UpdateData(dataExt, columnValuePairs, searchColumnName1, searchValue1[, searchColumnNameN, searchValueN, ...], columnToUpdate1, updatedValue1[, columnToUpdateN, updatedValueN, ...])',
|
|
4394
|
+
example:
|
|
4395
|
+
"%%=UpdateData('Subscribers', 1, 'SubscriberKey', _subscriberkey, 'Status', 'Active')=%%",
|
|
3240
4396
|
},
|
|
3241
4397
|
{
|
|
3242
4398
|
name: 'UpdateDE',
|
|
@@ -3247,17 +4403,60 @@ export const FUNCTIONS = [
|
|
|
3247
4403
|
minArgs: 6,
|
|
3248
4404
|
maxArgs: INF,
|
|
3249
4405
|
category: 'Data Extension',
|
|
3250
|
-
description:
|
|
4406
|
+
description:
|
|
4407
|
+
'Updates existing rows in a data extension. Email-context variant of UpdateData. Returns the number of rows updated.',
|
|
3251
4408
|
params: [
|
|
3252
|
-
{
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
{
|
|
4409
|
+
{
|
|
4410
|
+
name: 'dataExt',
|
|
4411
|
+
description: 'The name of the data extension that contains the data to update',
|
|
4412
|
+
type: 'string',
|
|
4413
|
+
},
|
|
4414
|
+
{
|
|
4415
|
+
name: 'columnValuePairs',
|
|
4416
|
+
description:
|
|
4417
|
+
'The number of column and value pairs for the function to match against',
|
|
4418
|
+
type: 'number',
|
|
4419
|
+
},
|
|
4420
|
+
{
|
|
4421
|
+
name: 'searchColumnName1',
|
|
4422
|
+
description: 'The name of a column to search for the data to update',
|
|
4423
|
+
type: 'string',
|
|
4424
|
+
},
|
|
4425
|
+
{ name: 'searchValue1', description: 'The value that identifies the row to update' },
|
|
4426
|
+
{
|
|
4427
|
+
name: 'searchColumnNameN',
|
|
4428
|
+
description: 'Additional search column name (count given by columnValuePairs)',
|
|
4429
|
+
type: 'string',
|
|
4430
|
+
optional: true,
|
|
4431
|
+
},
|
|
4432
|
+
{
|
|
4433
|
+
name: 'searchValueN',
|
|
4434
|
+
description: 'Additional search value (count given by columnValuePairs)',
|
|
4435
|
+
optional: true,
|
|
4436
|
+
},
|
|
4437
|
+
{
|
|
4438
|
+
name: 'columnToUpdate1',
|
|
4439
|
+
description: 'The column that contains the data to update',
|
|
4440
|
+
type: 'string',
|
|
4441
|
+
},
|
|
4442
|
+
{ name: 'updatedValue1', description: 'The data to update in the specified column' },
|
|
4443
|
+
{
|
|
4444
|
+
name: 'columnToUpdateN',
|
|
4445
|
+
description: 'Additional column to update',
|
|
4446
|
+
type: 'string',
|
|
4447
|
+
optional: true,
|
|
4448
|
+
},
|
|
4449
|
+
{ name: 'updatedValueN', description: 'Additional value to update', optional: true },
|
|
3258
4450
|
],
|
|
3259
4451
|
returnType: 'number',
|
|
3260
|
-
|
|
4452
|
+
returnDescription: 'The number of rows updated.',
|
|
4453
|
+
repeat: [
|
|
4454
|
+
{ startIndex: 2, groupSize: 2, minGroups: 1, countParam: 'columnValuePairs' },
|
|
4455
|
+
{ startIndex: 4, groupSize: 2, minGroups: 1 },
|
|
4456
|
+
],
|
|
4457
|
+
syntax: 'UpdateDE(dataExt, columnValuePairs, searchColumnName1, searchValue1[, searchColumnNameN, searchValueN, ...], columnToUpdate1, updatedValue1[, columnToUpdateN, updatedValueN, ...])',
|
|
4458
|
+
example:
|
|
4459
|
+
"%%=UpdateDE('Subscribers', 1, 'SubscriberKey', _subscriberkey, 'Status', 'Active')=%%",
|
|
3261
4460
|
},
|
|
3262
4461
|
{
|
|
3263
4462
|
name: 'UpdateMSCRMRecords',
|
|
@@ -3266,17 +4465,46 @@ export const FUNCTIONS = [
|
|
|
3266
4465
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-mscrm/mc-ampscript-reference-microsoft-dynamics-crm-update-records.html',
|
|
3267
4466
|
guideUrl: 'https://ampscript.guide/updatemscrmrecords/',
|
|
3268
4467
|
minArgs: 4,
|
|
3269
|
-
maxArgs:
|
|
4468
|
+
maxArgs: INF,
|
|
3270
4469
|
category: 'Microsoft Dynamics CRM',
|
|
3271
|
-
description:
|
|
4470
|
+
description:
|
|
4471
|
+
'Updates one or more records in a Microsoft Dynamics CRM entity, and returns the number of successfully updated records.',
|
|
3272
4472
|
params: [
|
|
3273
|
-
{
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
4473
|
+
{
|
|
4474
|
+
name: 'entityName',
|
|
4475
|
+
description:
|
|
4476
|
+
'The name of the Microsoft Dynamics CRM entity that contains the records to update',
|
|
4477
|
+
type: 'string',
|
|
4478
|
+
},
|
|
4479
|
+
{
|
|
4480
|
+
name: 'guidsToUpdate',
|
|
4481
|
+
description: 'A comma-separated list of GUIDs to update',
|
|
4482
|
+
type: 'string',
|
|
4483
|
+
},
|
|
4484
|
+
{
|
|
4485
|
+
name: 'attributeName1',
|
|
4486
|
+
description: 'The name of the attribute to update on the target records',
|
|
4487
|
+
type: 'string',
|
|
4488
|
+
},
|
|
4489
|
+
{
|
|
4490
|
+
name: 'attributeValue1',
|
|
4491
|
+
description: 'The attribute value to update on the target records',
|
|
4492
|
+
},
|
|
4493
|
+
{
|
|
4494
|
+
name: 'attributeNameN',
|
|
4495
|
+
mcnSince: null,
|
|
4496
|
+
mcnNotes: null,
|
|
4497
|
+
description: 'Additional attribute name',
|
|
4498
|
+
type: 'string',
|
|
4499
|
+
optional: true,
|
|
4500
|
+
},
|
|
4501
|
+
{ name: 'attributeValueN', description: 'Additional attribute value', optional: true },
|
|
3277
4502
|
],
|
|
3278
|
-
returnType: '
|
|
3279
|
-
|
|
4503
|
+
returnType: 'number',
|
|
4504
|
+
returnDescription: 'The number of Microsoft Dynamics CRM records updated.',
|
|
4505
|
+
repeat: [{ startIndex: 2, groupSize: 2, minGroups: 1 }],
|
|
4506
|
+
syntax: 'UpdateMSCRMRecords(entityName, guidsToUpdate, attributeName1, attributeValue1[, attributeNameN, attributeValueN, ...])',
|
|
4507
|
+
example: "%%=UpdateMSCRMRecords('contact', @guids, 'lastname', 'Smith')=%%",
|
|
3280
4508
|
},
|
|
3281
4509
|
{
|
|
3282
4510
|
name: 'UpdateSingleSalesforceObject',
|
|
@@ -3287,24 +4515,35 @@ export const FUNCTIONS = [
|
|
|
3287
4515
|
minArgs: 4,
|
|
3288
4516
|
maxArgs: INF,
|
|
3289
4517
|
category: 'Sales and Service Cloud',
|
|
3290
|
-
description:
|
|
4518
|
+
description:
|
|
4519
|
+
'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
4520
|
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
4521
|
{
|
|
3297
|
-
name: '
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
4522
|
+
name: 'objectName',
|
|
4523
|
+
description: 'The API name of the Salesforce object to update',
|
|
4524
|
+
type: 'string',
|
|
4525
|
+
},
|
|
4526
|
+
{ name: 'idToUpdate', description: 'The ID of the record to update', type: 'string' },
|
|
4527
|
+
{
|
|
4528
|
+
name: 'fieldName1',
|
|
4529
|
+
description: 'The name of the first field to update',
|
|
4530
|
+
type: 'string',
|
|
4531
|
+
},
|
|
4532
|
+
{ name: 'fieldValue1', description: 'The value to assign to the first named field' },
|
|
4533
|
+
{
|
|
4534
|
+
name: 'fieldNameN',
|
|
4535
|
+
description: 'Additional field name',
|
|
3301
4536
|
type: 'string',
|
|
3302
4537
|
optional: true,
|
|
3303
4538
|
},
|
|
3304
|
-
{ name: '
|
|
4539
|
+
{ name: 'fieldValueN', description: 'Additional field value', optional: true },
|
|
3305
4540
|
],
|
|
3306
4541
|
returnType: 'number',
|
|
3307
|
-
|
|
4542
|
+
returnDescription: '1 when the record was updated successfully, otherwise 0.',
|
|
4543
|
+
returnEnum: [0, 1],
|
|
4544
|
+
repeat: [{ startIndex: 2, groupSize: 2, minGroups: 1 }],
|
|
4545
|
+
syntax: 'UpdateSingleSalesforceObject(objectName, idToUpdate, fieldName1, fieldValue1[, fieldNameN, fieldValueN, ...])',
|
|
4546
|
+
example: "%%=UpdateSingleSalesforceObject('Contact', @recordId, 'LastName', 'Smith')=%%",
|
|
3308
4547
|
},
|
|
3309
4548
|
{
|
|
3310
4549
|
name: 'Uppercase',
|
|
@@ -3316,9 +4555,10 @@ export const FUNCTIONS = [
|
|
|
3316
4555
|
maxArgs: 1,
|
|
3317
4556
|
category: 'String',
|
|
3318
4557
|
description: 'Converts a string to all uppercase characters.',
|
|
3319
|
-
params: [{ name: '
|
|
4558
|
+
params: [{ name: 'sourceString', description: 'String to convert', type: 'string' }],
|
|
3320
4559
|
returnType: 'string',
|
|
3321
|
-
|
|
4560
|
+
returnDescription: 'The string converted to upper case.',
|
|
4561
|
+
syntax: 'Uppercase(sourceString)',
|
|
3322
4562
|
example: "%%=Uppercase('hello')=%%",
|
|
3323
4563
|
},
|
|
3324
4564
|
{
|
|
@@ -3330,25 +4570,50 @@ export const FUNCTIONS = [
|
|
|
3330
4570
|
minArgs: 5,
|
|
3331
4571
|
maxArgs: INF,
|
|
3332
4572
|
category: 'MobileConnect',
|
|
3333
|
-
description:
|
|
4573
|
+
description:
|
|
4574
|
+
'Upserts attributes into a contact record. If the contact exists it is updated; otherwise a new contact is created.',
|
|
3334
4575
|
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
4576
|
{
|
|
3341
|
-
name: '
|
|
4577
|
+
name: 'channel',
|
|
4578
|
+
description: "The contact channel. The only supported value is 'mobile'",
|
|
4579
|
+
type: 'string',
|
|
4580
|
+
},
|
|
4581
|
+
{
|
|
4582
|
+
name: 'attribute',
|
|
4583
|
+
description:
|
|
4584
|
+
"The attribute to use to match the contact. The only supported value is 'phone'",
|
|
4585
|
+
type: 'string',
|
|
4586
|
+
},
|
|
4587
|
+
{
|
|
4588
|
+
name: 'phoneNumber',
|
|
4589
|
+
description: 'The phone number of the contact, including the country code',
|
|
4590
|
+
type: 'number',
|
|
4591
|
+
},
|
|
4592
|
+
{
|
|
4593
|
+
name: 'keyToUpsert1',
|
|
4594
|
+
description: 'The name of the attribute to upsert',
|
|
4595
|
+
type: 'string',
|
|
4596
|
+
},
|
|
4597
|
+
{
|
|
4598
|
+
name: 'valueToUpsert1',
|
|
4599
|
+
description: 'The value of the attribute to upsert',
|
|
4600
|
+
type: 'string',
|
|
4601
|
+
},
|
|
4602
|
+
{
|
|
4603
|
+
name: 'keyToUpsertN',
|
|
3342
4604
|
mcnSince: null,
|
|
3343
4605
|
mcnNotes: null,
|
|
3344
4606
|
description: 'Additional attribute name',
|
|
3345
4607
|
type: 'string',
|
|
3346
4608
|
optional: true,
|
|
3347
4609
|
},
|
|
3348
|
-
{ name: '
|
|
4610
|
+
{ name: 'valueToUpsertN', description: 'Additional attribute value', optional: true },
|
|
3349
4611
|
],
|
|
3350
|
-
returnType: '
|
|
3351
|
-
|
|
4612
|
+
returnType: 'number',
|
|
4613
|
+
returnDescription: 'The number of contact records created or updated.',
|
|
4614
|
+
repeat: [{ startIndex: 3, groupSize: 2, minGroups: 1 }],
|
|
4615
|
+
syntax: 'UpsertContact(channel, attribute, phoneNumber, keyToUpsert1, valueToUpsert1[, keyToUpsertN, valueToUpsertN, ...])',
|
|
4616
|
+
example: "%%=UpsertContact('SMS', 'phone', '+17182097651', 'FirstName', 'Curt')=%%",
|
|
3352
4617
|
},
|
|
3353
4618
|
{
|
|
3354
4619
|
name: 'UpsertData',
|
|
@@ -3360,17 +4625,69 @@ export const FUNCTIONS = [
|
|
|
3360
4625
|
maxArgs: INF,
|
|
3361
4626
|
category: 'Data Extension',
|
|
3362
4627
|
description:
|
|
3363
|
-
'
|
|
4628
|
+
'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
4629
|
params: [
|
|
3365
|
-
{
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
{
|
|
4630
|
+
{
|
|
4631
|
+
name: 'dataExt',
|
|
4632
|
+
description: 'The name of the data extension to update or insert data into',
|
|
4633
|
+
type: 'string',
|
|
4634
|
+
},
|
|
4635
|
+
{
|
|
4636
|
+
name: 'columnValuePairs',
|
|
4637
|
+
description:
|
|
4638
|
+
'The number of column and value pairs for the function to match against',
|
|
4639
|
+
type: 'number',
|
|
4640
|
+
},
|
|
4641
|
+
{
|
|
4642
|
+
name: 'searchColumnName1',
|
|
4643
|
+
description: 'The name of the column to search',
|
|
4644
|
+
type: 'string',
|
|
4645
|
+
},
|
|
4646
|
+
{
|
|
4647
|
+
name: 'searchValue1',
|
|
4648
|
+
description: 'The value that identifies the row to update or insert',
|
|
4649
|
+
},
|
|
4650
|
+
{
|
|
4651
|
+
name: 'searchColumnNameN',
|
|
4652
|
+
description: 'Additional search column name (count given by columnValuePairs)',
|
|
4653
|
+
type: 'string',
|
|
4654
|
+
optional: true,
|
|
4655
|
+
},
|
|
4656
|
+
{
|
|
4657
|
+
name: 'searchValueN',
|
|
4658
|
+
description: 'Additional search value (count given by columnValuePairs)',
|
|
4659
|
+
optional: true,
|
|
4660
|
+
},
|
|
4661
|
+
{
|
|
4662
|
+
name: 'columnToUpsert1',
|
|
4663
|
+
description: 'The column to update or insert data into',
|
|
4664
|
+
type: 'string',
|
|
4665
|
+
},
|
|
4666
|
+
{
|
|
4667
|
+
name: 'upsertedValue1',
|
|
4668
|
+
description: 'The value to update or insert into the specified column',
|
|
4669
|
+
},
|
|
4670
|
+
{
|
|
4671
|
+
name: 'columnToUpsertN',
|
|
4672
|
+
description: 'Additional column to update or insert',
|
|
4673
|
+
type: 'string',
|
|
4674
|
+
optional: true,
|
|
4675
|
+
},
|
|
4676
|
+
{
|
|
4677
|
+
name: 'upsertedValueN',
|
|
4678
|
+
description: 'Additional value to update or insert',
|
|
4679
|
+
optional: true,
|
|
4680
|
+
},
|
|
3371
4681
|
],
|
|
3372
4682
|
returnType: 'number',
|
|
3373
|
-
|
|
4683
|
+
returnDescription: 'The number of rows inserted or updated.',
|
|
4684
|
+
repeat: [
|
|
4685
|
+
{ startIndex: 2, groupSize: 2, minGroups: 1, countParam: 'columnValuePairs' },
|
|
4686
|
+
{ startIndex: 4, groupSize: 2, minGroups: 1 },
|
|
4687
|
+
],
|
|
4688
|
+
syntax: 'UpsertData(dataExt, columnValuePairs, searchColumnName1, searchValue1[, searchColumnNameN, searchValueN, ...], columnToUpsert1, upsertedValue1[, columnToUpsertN, upsertedValueN, ...])',
|
|
4689
|
+
example:
|
|
4690
|
+
"%%=UpsertData('Subscribers', 1, 'SubscriberKey', _subscriberkey, 'Status', 'Active')=%%",
|
|
3374
4691
|
},
|
|
3375
4692
|
{
|
|
3376
4693
|
name: 'UpsertDE',
|
|
@@ -3381,17 +4698,70 @@ export const FUNCTIONS = [
|
|
|
3381
4698
|
minArgs: 6,
|
|
3382
4699
|
maxArgs: INF,
|
|
3383
4700
|
category: 'Data Extension',
|
|
3384
|
-
description:
|
|
4701
|
+
description:
|
|
4702
|
+
'Updates or inserts a row in a data extension. Email-context variant of UpsertData. Returns the number of rows affected.',
|
|
3385
4703
|
params: [
|
|
3386
|
-
{
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
{
|
|
4704
|
+
{
|
|
4705
|
+
name: 'dataExt',
|
|
4706
|
+
description: 'The name of the data extension to update or insert data into',
|
|
4707
|
+
type: 'string',
|
|
4708
|
+
},
|
|
4709
|
+
{
|
|
4710
|
+
name: 'columnValuePairs',
|
|
4711
|
+
description:
|
|
4712
|
+
'The number of column and value pairs for the function to match against',
|
|
4713
|
+
type: 'number',
|
|
4714
|
+
},
|
|
4715
|
+
{
|
|
4716
|
+
name: 'searchColumnName1',
|
|
4717
|
+
description: 'The name of the column to search',
|
|
4718
|
+
type: 'string',
|
|
4719
|
+
},
|
|
4720
|
+
{
|
|
4721
|
+
name: 'searchValue1',
|
|
4722
|
+
description: 'The value that identifies the row to update or insert',
|
|
4723
|
+
},
|
|
4724
|
+
{
|
|
4725
|
+
name: 'searchColumnNameN',
|
|
4726
|
+
description: 'Additional search column name (count given by columnValuePairs)',
|
|
4727
|
+
type: 'string',
|
|
4728
|
+
optional: true,
|
|
4729
|
+
},
|
|
4730
|
+
{
|
|
4731
|
+
name: 'searchValueN',
|
|
4732
|
+
description: 'Additional search value (count given by columnValuePairs)',
|
|
4733
|
+
optional: true,
|
|
4734
|
+
},
|
|
4735
|
+
{
|
|
4736
|
+
name: 'columnToUpsert1',
|
|
4737
|
+
description: 'The column to update or insert data into',
|
|
4738
|
+
type: 'string',
|
|
4739
|
+
},
|
|
4740
|
+
{
|
|
4741
|
+
name: 'upsertedValue1',
|
|
4742
|
+
description: 'The value to update or insert into the specified column',
|
|
4743
|
+
},
|
|
4744
|
+
{
|
|
4745
|
+
name: 'columnToUpsertN',
|
|
4746
|
+
description: 'Additional column to update or insert',
|
|
4747
|
+
type: 'string',
|
|
4748
|
+
optional: true,
|
|
4749
|
+
},
|
|
4750
|
+
{
|
|
4751
|
+
name: 'upsertedValueN',
|
|
4752
|
+
description: 'Additional value to update or insert',
|
|
4753
|
+
optional: true,
|
|
4754
|
+
},
|
|
3392
4755
|
],
|
|
3393
4756
|
returnType: 'number',
|
|
3394
|
-
|
|
4757
|
+
returnDescription: 'The number of rows inserted or updated.',
|
|
4758
|
+
repeat: [
|
|
4759
|
+
{ startIndex: 2, groupSize: 2, minGroups: 1, countParam: 'columnValuePairs' },
|
|
4760
|
+
{ startIndex: 4, groupSize: 2, minGroups: 1 },
|
|
4761
|
+
],
|
|
4762
|
+
syntax: 'UpsertDE(dataExt, columnValuePairs, searchColumnName1, searchValue1[, searchColumnNameN, searchValueN, ...], columnToUpsert1, upsertedValue1[, columnToUpsertN, upsertedValueN, ...])',
|
|
4763
|
+
example:
|
|
4764
|
+
"%%=UpsertDE('Subscribers', 1, 'SubscriberKey', _subscriberkey, 'Status', 'Active')=%%",
|
|
3395
4765
|
},
|
|
3396
4766
|
{
|
|
3397
4767
|
name: 'UpsertMSCRMRecord',
|
|
@@ -3402,26 +4772,62 @@ export const FUNCTIONS = [
|
|
|
3402
4772
|
minArgs: 9,
|
|
3403
4773
|
maxArgs: 9,
|
|
3404
4774
|
category: 'Microsoft Dynamics CRM',
|
|
3405
|
-
description:
|
|
4775
|
+
description:
|
|
4776
|
+
'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
4777
|
params: [
|
|
3407
|
-
{ name: 'entityType', description: 'CRM entity type name', type: 'string' },
|
|
3408
4778
|
{
|
|
3409
|
-
name: '
|
|
4779
|
+
name: 'entityName',
|
|
4780
|
+
description: 'The name of the Microsoft Dynamics CRM entity to upsert',
|
|
4781
|
+
type: 'string',
|
|
4782
|
+
},
|
|
4783
|
+
{
|
|
4784
|
+
name: 'sortField',
|
|
3410
4785
|
mcnSince: null,
|
|
3411
4786
|
mcnNotes: null,
|
|
3412
|
-
description: '
|
|
4787
|
+
description: 'The field to sort the retrieve results on',
|
|
4788
|
+
type: 'string',
|
|
4789
|
+
},
|
|
4790
|
+
{
|
|
4791
|
+
name: 'sortType',
|
|
4792
|
+
description: 'The order to sort retrieve results. Accepted values: ASC or DESC',
|
|
4793
|
+
type: 'string',
|
|
4794
|
+
},
|
|
4795
|
+
{
|
|
4796
|
+
name: 'numPairsForRetrieve',
|
|
4797
|
+
description: 'The number of name-value pairs used to retrieve results',
|
|
4798
|
+
type: 'number',
|
|
4799
|
+
},
|
|
4800
|
+
{
|
|
4801
|
+
name: 'filterAttributeName',
|
|
4802
|
+
description: 'The name of the attribute to filter the target entity by',
|
|
4803
|
+
type: 'string',
|
|
4804
|
+
},
|
|
4805
|
+
{
|
|
4806
|
+
name: 'filterAttributeValue',
|
|
4807
|
+
description: 'The value of the attribute to filter the target entity by',
|
|
4808
|
+
type: 'string',
|
|
4809
|
+
},
|
|
4810
|
+
{
|
|
4811
|
+
name: 'numPairsForUpdate',
|
|
4812
|
+
description: 'The number of name-value pairs used to update records',
|
|
4813
|
+
type: 'number',
|
|
4814
|
+
},
|
|
4815
|
+
{
|
|
4816
|
+
name: 'updateAttributeName',
|
|
4817
|
+
description: 'The name of the attribute to update in the target entity',
|
|
4818
|
+
type: 'string',
|
|
4819
|
+
},
|
|
4820
|
+
{
|
|
4821
|
+
name: 'updateAttributeValue',
|
|
4822
|
+
description: 'The value of the attribute to update in the target entity',
|
|
3413
4823
|
type: 'string',
|
|
3414
4824
|
},
|
|
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
4825
|
],
|
|
3423
4826
|
returnType: 'string',
|
|
3424
|
-
|
|
4827
|
+
returnDescription: 'The GUID of the created or updated Microsoft Dynamics CRM record.',
|
|
4828
|
+
syntax: 'UpsertMSCRMRecord(entityName, sortField, sortType, numPairsForRetrieve, filterAttributeName, filterAttributeValue, numPairsForUpdate, updateAttributeName, updateAttributeValue)',
|
|
4829
|
+
example:
|
|
4830
|
+
"%%=UpsertMSCRMRecord('contact', 'createdon', 'DESC', 1, 'emailaddress1', @email, 1, 'lastname', 'Smith')=%%",
|
|
3425
4831
|
},
|
|
3426
4832
|
{
|
|
3427
4833
|
name: 'URLEncode',
|
|
@@ -3434,21 +4840,51 @@ export const FUNCTIONS = [
|
|
|
3434
4840
|
category: 'Encryption and Encoding',
|
|
3435
4841
|
description: 'URL-encodes a string for safe inclusion in a URL.',
|
|
3436
4842
|
params: [
|
|
3437
|
-
{ name: 'url', description: 'String to encode', type: 'string' },
|
|
3438
4843
|
{
|
|
3439
|
-
name: '
|
|
4844
|
+
name: 'urlToEncode',
|
|
4845
|
+
description: 'The string to convert to a format that is safe to include in URLs',
|
|
4846
|
+
type: 'string',
|
|
4847
|
+
},
|
|
4848
|
+
{
|
|
4849
|
+
name: 'encodeAllChars',
|
|
3440
4850
|
mcnSince: null,
|
|
3441
4851
|
mcnNotes: null,
|
|
3442
|
-
description:
|
|
4852
|
+
description:
|
|
4853
|
+
'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',
|
|
4854
|
+
type: 'boolean',
|
|
4855
|
+
optional: true,
|
|
4856
|
+
default: false,
|
|
4857
|
+
},
|
|
4858
|
+
{
|
|
4859
|
+
name: 'encodeAllStrings',
|
|
4860
|
+
description:
|
|
4861
|
+
'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
4862
|
type: 'boolean',
|
|
3444
4863
|
optional: true,
|
|
3445
4864
|
},
|
|
3446
|
-
{ name: 'encoding', description: 'Character encoding', type: 'string', optional: true },
|
|
3447
4865
|
],
|
|
3448
4866
|
returnType: 'string',
|
|
3449
|
-
|
|
4867
|
+
returnDescription: 'The URL-encoded representation of the input.',
|
|
4868
|
+
syntax: 'URLEncode(urlToEncode[, encodeAllChars, encodeAllStrings])',
|
|
3450
4869
|
example: "%%=URLEncode('hello world')=%%",
|
|
3451
4870
|
},
|
|
4871
|
+
{
|
|
4872
|
+
name: 'Verb',
|
|
4873
|
+
mcnSince: null,
|
|
4874
|
+
mcnNotes: null,
|
|
4875
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sms/mc-ampscript-reference-sms-verb.html',
|
|
4876
|
+
guideUrl: 'https://ampscript.guide/mobileconnect-data-strings/',
|
|
4877
|
+
minArgs: 0,
|
|
4878
|
+
maxArgs: 0,
|
|
4879
|
+
category: 'MobileConnect',
|
|
4880
|
+
description:
|
|
4881
|
+
'Returns the keyword (verb) from an inbound mobile-originated (MO) message. Only usable in MobileConnect, chained off Msg(0). Takes no arguments.',
|
|
4882
|
+
params: [],
|
|
4883
|
+
returnType: 'string',
|
|
4884
|
+
returnDescription: 'The keyword (first word) of the inbound mobile-originated message.',
|
|
4885
|
+
syntax: 'Msg(0).Verb',
|
|
4886
|
+
example: '%%=Msg(0).Verb=%%',
|
|
4887
|
+
},
|
|
3452
4888
|
{
|
|
3453
4889
|
name: 'v',
|
|
3454
4890
|
mcnSince: 67,
|
|
@@ -3462,6 +4898,7 @@ export const FUNCTIONS = [
|
|
|
3462
4898
|
'Short alias for retrieving a variable value inline. Equivalent to %%=v(@var)=%%.',
|
|
3463
4899
|
params: [{ name: 'variableName', description: 'Variable reference' }],
|
|
3464
4900
|
returnType: 'string',
|
|
4901
|
+
returnDescription: 'The value of the referenced variable as a string.',
|
|
3465
4902
|
syntax: 'v(variableName)',
|
|
3466
4903
|
example: '%%=v(@myVar)=%%',
|
|
3467
4904
|
},
|
|
@@ -3471,16 +4908,35 @@ export const FUNCTIONS = [
|
|
|
3471
4908
|
mcnNotes: null,
|
|
3472
4909
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-content/mc-ampscript-reference-content-wat.html',
|
|
3473
4910
|
guideUrl: 'https://ampscript.guide/wat/',
|
|
3474
|
-
minArgs:
|
|
4911
|
+
minArgs: 2,
|
|
3475
4912
|
maxArgs: INF,
|
|
3476
4913
|
category: 'Utility',
|
|
3477
|
-
description:
|
|
4914
|
+
description:
|
|
4915
|
+
'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
4916
|
params: [
|
|
3479
|
-
{
|
|
3480
|
-
|
|
4917
|
+
{
|
|
4918
|
+
name: 'parameterSetKey',
|
|
4919
|
+
description: 'The external key of the WAT parameter set',
|
|
4920
|
+
type: 'string',
|
|
4921
|
+
},
|
|
4922
|
+
{
|
|
4923
|
+
name: 'parameterValue1',
|
|
4924
|
+
description: 'Value used to replace the WATP(1) tracking parameter reference',
|
|
4925
|
+
type: 'string',
|
|
4926
|
+
},
|
|
4927
|
+
{
|
|
4928
|
+
name: 'parameterValueN',
|
|
4929
|
+
description: 'Additional value used to replace the WATP(N) reference',
|
|
4930
|
+
type: 'string',
|
|
4931
|
+
optional: true,
|
|
4932
|
+
},
|
|
3481
4933
|
],
|
|
3482
4934
|
returnType: 'string',
|
|
3483
|
-
|
|
4935
|
+
returnDescription:
|
|
4936
|
+
'The resolved Web Analytics tracking parameter value with the supplied substitutions applied.',
|
|
4937
|
+
repeat: [{ startIndex: 1, groupSize: 1, minGroups: 1 }],
|
|
4938
|
+
syntax: 'WAT(parameterSetKey, parameterValue1[, parameterValueN, ...])',
|
|
4939
|
+
example: "%%=WAT('Omniture', '1234', '5678')=%%",
|
|
3484
4940
|
},
|
|
3485
4941
|
{
|
|
3486
4942
|
name: 'WATP',
|
|
@@ -3491,10 +4947,20 @@ export const FUNCTIONS = [
|
|
|
3491
4947
|
minArgs: 1,
|
|
3492
4948
|
maxArgs: 1,
|
|
3493
4949
|
category: 'Utility',
|
|
3494
|
-
description:
|
|
3495
|
-
|
|
4950
|
+
description:
|
|
4951
|
+
'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.',
|
|
4952
|
+
params: [
|
|
4953
|
+
{
|
|
4954
|
+
name: 'ordinal',
|
|
4955
|
+
description: 'The position of the parameter value within the WAT string (1-based)',
|
|
4956
|
+
type: 'number',
|
|
4957
|
+
},
|
|
4958
|
+
],
|
|
3496
4959
|
returnType: 'string',
|
|
3497
|
-
|
|
4960
|
+
returnDescription:
|
|
4961
|
+
'The parameter value supplied to the WAT function at the given ordinal position.',
|
|
4962
|
+
syntax: 'WATP(ordinal)',
|
|
4963
|
+
example: '%%=urlencode(WATP(1))=%%',
|
|
3498
4964
|
},
|
|
3499
4965
|
{
|
|
3500
4966
|
name: 'WrapLongURL',
|
|
@@ -3508,7 +4974,9 @@ export const FUNCTIONS = [
|
|
|
3508
4974
|
description: 'Wraps a long URL to prevent line-break issues in email clients.',
|
|
3509
4975
|
params: [{ name: 'url', description: 'Long URL to wrap', type: 'string' }],
|
|
3510
4976
|
returnType: 'string',
|
|
4977
|
+
returnDescription: 'A shortened, wrapped form of the supplied long URL.',
|
|
3511
4978
|
syntax: 'WrapLongURL(url)',
|
|
4979
|
+
example: "%%=WrapLongURL('https://example.com/a/very/long/path')=%%",
|
|
3512
4980
|
},
|
|
3513
4981
|
];
|
|
3514
4982
|
|
|
@@ -3571,7 +5039,7 @@ export function getMcnApiVersion(name) {
|
|
|
3571
5039
|
* Cloud Next (i.e. mcnSince is a non-null API version number).
|
|
3572
5040
|
*
|
|
3573
5041
|
* @param {string} name - AMPscript function name (case-insensitive).
|
|
3574
|
-
* @returns {boolean}
|
|
5042
|
+
* @returns {boolean} True when the function is supported in Marketing Cloud Next.
|
|
3575
5043
|
*/
|
|
3576
5044
|
export function isMcnSupported(name) {
|
|
3577
5045
|
return getMcnApiVersion(name) !== null;
|
|
@@ -3589,63 +5057,14 @@ export function getMcnNotes(name) {
|
|
|
3589
5057
|
}
|
|
3590
5058
|
|
|
3591
5059
|
// ── Deprecated functions ─────────────────────────────────────────────────────
|
|
3592
|
-
//
|
|
3593
|
-
//
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
{
|
|
3597
|
-
name: 'LookupValue',
|
|
3598
|
-
mcnSince: null,
|
|
3599
|
-
mcnNotes: null,
|
|
3600
|
-
replacement: 'Lookup',
|
|
3601
|
-
reason: 'LookupValue was the original name; Lookup is the current standard.',
|
|
3602
|
-
},
|
|
3603
|
-
{
|
|
3604
|
-
name: 'InsertDE',
|
|
3605
|
-
mcnSince: null,
|
|
3606
|
-
mcnNotes: null,
|
|
3607
|
-
replacement: 'InsertData',
|
|
3608
|
-
reason: 'InsertDE is a legacy alias for InsertData.',
|
|
3609
|
-
},
|
|
3610
|
-
{
|
|
3611
|
-
name: 'UpdateDE',
|
|
3612
|
-
mcnSince: null,
|
|
3613
|
-
mcnNotes: null,
|
|
3614
|
-
replacement: 'UpdateData',
|
|
3615
|
-
reason: 'UpdateDE is a legacy alias for UpdateData.',
|
|
3616
|
-
},
|
|
3617
|
-
{
|
|
3618
|
-
name: 'UpsertDE',
|
|
3619
|
-
mcnSince: null,
|
|
3620
|
-
mcnNotes: null,
|
|
3621
|
-
replacement: 'UpsertData',
|
|
3622
|
-
reason: 'UpsertDE is a legacy alias for UpsertData.',
|
|
3623
|
-
},
|
|
3624
|
-
{
|
|
3625
|
-
name: 'DeleteDE',
|
|
3626
|
-
mcnSince: null,
|
|
3627
|
-
mcnNotes: null,
|
|
3628
|
-
replacement: 'DeleteData',
|
|
3629
|
-
reason: 'DeleteDE is a legacy alias for DeleteData.',
|
|
3630
|
-
},
|
|
3631
|
-
{
|
|
3632
|
-
name: 'ContentArea',
|
|
3633
|
-
mcnSince: null,
|
|
3634
|
-
mcnNotes: null,
|
|
3635
|
-
replacement: 'ContentBlockByKey or ContentBlockByName',
|
|
3636
|
-
reason: 'ContentArea references classic content areas which are being phased out in favor of Content Builder.',
|
|
3637
|
-
},
|
|
3638
|
-
{
|
|
3639
|
-
name: 'ContentAreaByName',
|
|
3640
|
-
mcnSince: null,
|
|
3641
|
-
mcnNotes: null,
|
|
3642
|
-
replacement: 'ContentBlockByName',
|
|
3643
|
-
reason: 'ContentAreaByName references classic content areas which are being phased out.',
|
|
3644
|
-
},
|
|
3645
|
-
];
|
|
5060
|
+
// Deprecation metadata lives inline on each FUNCTIONS entry via the
|
|
5061
|
+
// `deprecated`, `deprecatedReplacement`, and `deprecatedReason` fields. The
|
|
5062
|
+
// lookup below is derived from those flags for consumers that need a quick
|
|
5063
|
+
// name -> entry map of deprecated functions.
|
|
3646
5064
|
|
|
5065
|
+
/** Case-insensitive lookup of deprecated functions: lowercase name -> function entry */
|
|
3647
5066
|
export const deprecatedFunctionLookup = new Map(
|
|
3648
|
-
|
|
5067
|
+
FUNCTIONS.filter((f) => f.deprecated).map((f) => [f.name.toLowerCase(), f]),
|
|
3649
5068
|
);
|
|
3650
5069
|
|
|
3651
5070
|
// ── Keywords ─────────────────────────────────────────────────────────────────
|