ampscript-data 3.7.0 → 4.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.
@@ -0,0 +1,378 @@
1
+ // AUTO-SPLIT from the original single-file src/index.js. Data moved verbatim.
2
+ // AMPscript FUNCTIONS — category: Marketing Cloud API (9 entries).
3
+
4
+ export const MARKETING_CLOUD_API_FUNCTIONS = [
5
+ {
6
+ name: 'AddObjectArrayItem',
7
+ supportedInCloudPage: true,
8
+ supportedInEmail: false,
9
+ mcnSince: null,
10
+ handlebarsEquivalent: null,
11
+ mcnNotes: null,
12
+ docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-api/mc-ampscript-reference-api-add-object-array.html',
13
+ guideUrl: 'https://ampscript.guide/addobjectarrayitem/',
14
+ sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/addobjectarrayitem/',
15
+ minArgs: 3,
16
+ maxArgs: 3,
17
+ category: 'Marketing Cloud API',
18
+ description: "Appends an item to an API object's array property.",
19
+ params: [
20
+ { name: 'apiObject', description: 'API object reference', type: 'object' },
21
+ { name: 'arrayProperty', description: 'Array property name', type: 'string' },
22
+ { name: 'itemToAdd', description: 'Value to append', type: 'string' },
23
+ ],
24
+ returnType: 'void',
25
+ returnDescription:
26
+ 'No value is returned; the item is appended to the named array property.',
27
+ syntax: 'AddObjectArrayItem(apiObject, arrayProperty, itemToAdd)',
28
+ example: "AddObjectArrayItem(@apiObject, 'Recipients', @recipient)",
29
+ isConfirmed: true,
30
+ differsFromOfficialDocs: true,
31
+ officialDocsNote:
32
+ 'Email/send-context finding: the WSProxy object model is not valid in sendable email content. An isolated CreateObject(...) is rejected with HTTP 400 errorcode 10004 ("CreateObject Function is not valid in content. This function is only allowed in non sendable content."). Because this function is part of that object model (or depends on a CreateObject request object), it is a CloudPage / landing-page (non-sendable content) feature and cannot be used inside a sendable email.',
33
+ },
34
+ {
35
+ name: 'CreateObject',
36
+ supportedInCloudPage: true,
37
+ supportedInEmail: false,
38
+ mcnSince: null,
39
+ handlebarsEquivalent: null,
40
+ mcnNotes: null,
41
+ docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-api/mc-ampscript-reference-api-create-object.html',
42
+ guideUrl: 'https://ampscript.guide/createobject/',
43
+ sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/createobject/',
44
+ minArgs: 1,
45
+ maxArgs: 1,
46
+ category: 'Marketing Cloud API',
47
+ description:
48
+ 'Instantiates a Marketing Cloud SOAP API object for use with Invoke* functions.',
49
+ params: [
50
+ { name: 'objectName', description: 'The name of the new API Object', type: 'string' },
51
+ ],
52
+ returnType: 'object',
53
+ returnDescription: 'A new API object instance for use with the Invoke* functions.',
54
+ syntax: 'CreateObject(objectName)',
55
+ example: "%%=CreateObject('DataExtensionObject')=%%",
56
+ isConfirmed: true,
57
+ differsFromOfficialDocs: true,
58
+ officialDocsNote:
59
+ 'Email/send-context finding: the WSProxy object model is not valid in sendable email content. An isolated CreateObject(...) is rejected with HTTP 400 errorcode 10004 ("CreateObject Function is not valid in content. This function is only allowed in non sendable content."). Because this function is part of that object model (or depends on a CreateObject request object), it is a CloudPage / landing-page (non-sendable content) feature and cannot be used inside a sendable email.',
60
+ },
61
+ {
62
+ name: 'InvokeCreate',
63
+ supportedInCloudPage: true,
64
+ supportedInEmail: false,
65
+ mcnSince: null,
66
+ handlebarsEquivalent: null,
67
+ mcnNotes: null,
68
+ docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-api/mc-ampscript-reference-api-invoke-create.html',
69
+ guideUrl: 'https://ampscript.guide/invokecreate/',
70
+ sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/invokecreate/',
71
+ minArgs: 3,
72
+ maxArgs: 4,
73
+ category: 'Marketing Cloud API',
74
+ description: 'Calls the SOAP API Create method on the given API object.',
75
+ params: [
76
+ { name: 'apiObject', description: 'API object to create', type: 'object' },
77
+ {
78
+ name: 'statusMessage',
79
+ mcnSince: null,
80
+ mcnNotes: null,
81
+ description: 'Output variable for the resulting status message',
82
+ type: 'string',
83
+ },
84
+ {
85
+ name: 'errorCode',
86
+ mcnSince: null,
87
+ mcnNotes: null,
88
+ description: 'Output variable for the resulting error code',
89
+ type: 'string',
90
+ },
91
+ {
92
+ name: 'createOptionsObject',
93
+ mcnSince: null,
94
+ mcnNotes: null,
95
+ description: 'Optional CreateOptions API object',
96
+ type: 'object',
97
+ optional: true,
98
+ },
99
+ ],
100
+ returnType: 'string',
101
+ returnDescription:
102
+ "The SOAP OverallStatus as a string — 'OK' on success, 'Error' on failure. The human-readable message goes to the statusMessage out-variable and the numeric error code to errorCode.",
103
+ returnEnum: ['OK', 'Error'],
104
+ syntax: 'InvokeCreate(apiObject, @statusMessage, @errorCode[, createOptionsObject])',
105
+ example: '%%=InvokeCreate(@apiObject, @statusMessage, @errorCode)=%%',
106
+ isConfirmed: true,
107
+ differsFromOfficialDocs: true,
108
+ officialDocsNote:
109
+ 'Email/send-context finding: the WSProxy object model is not valid in sendable email content. An isolated CreateObject(...) is rejected with HTTP 400 errorcode 10004 ("CreateObject Function is not valid in content. This function is only allowed in non sendable content."). Because this function is part of that object model (or depends on a CreateObject request object), it is a CloudPage / landing-page (non-sendable content) feature and cannot be used inside a sendable email.',
110
+ },
111
+ {
112
+ name: 'InvokeDelete',
113
+ supportedInCloudPage: true,
114
+ supportedInEmail: false,
115
+ mcnSince: null,
116
+ handlebarsEquivalent: null,
117
+ mcnNotes: null,
118
+ docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-api/mc-ampscript-reference-api-invoke-delete.html',
119
+ guideUrl: 'https://ampscript.guide/invokedelete/',
120
+ sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/invokedelete/',
121
+ minArgs: 3,
122
+ maxArgs: 4,
123
+ category: 'Marketing Cloud API',
124
+ description: 'Calls the SOAP API Delete method on the given API object.',
125
+ params: [
126
+ { name: 'apiObject', description: 'API object to delete', type: 'object' },
127
+ {
128
+ name: 'statusMessage',
129
+ mcnSince: null,
130
+ mcnNotes: null,
131
+ description: 'Output variable for the resulting status message',
132
+ type: 'string',
133
+ },
134
+ {
135
+ name: 'errorCode',
136
+ mcnSince: null,
137
+ mcnNotes: null,
138
+ description: 'Output variable for the resulting error code',
139
+ type: 'string',
140
+ },
141
+ {
142
+ name: 'deleteOptionsObject',
143
+ mcnSince: null,
144
+ mcnNotes: null,
145
+ description: 'Optional DeleteOptions API object',
146
+ type: 'object',
147
+ optional: true,
148
+ },
149
+ ],
150
+ returnType: 'string',
151
+ returnDescription:
152
+ "The SOAP OverallStatus as a string — 'OK' on success, 'Error' on failure. The human-readable message goes to the statusMessage out-variable and the numeric error code to errorCode.",
153
+ returnEnum: ['OK', 'Error'],
154
+ syntax: 'InvokeDelete(apiObject, @statusMessage, @errorCode[, deleteOptionsObject])',
155
+ example: '%%=InvokeDelete(@apiObject, @statusMessage, @errorCode)=%%',
156
+ isConfirmed: true,
157
+ differsFromOfficialDocs: true,
158
+ officialDocsNote:
159
+ 'Email/send-context finding: the WSProxy object model is not valid in sendable email content. An isolated CreateObject(...) is rejected with HTTP 400 errorcode 10004 ("CreateObject Function is not valid in content. This function is only allowed in non sendable content."). Because this function is part of that object model (or depends on a CreateObject request object), it is a CloudPage / landing-page (non-sendable content) feature and cannot be used inside a sendable email.',
160
+ },
161
+ {
162
+ name: 'InvokeExecute',
163
+ supportedInCloudPage: true,
164
+ supportedInEmail: false,
165
+ mcnSince: null,
166
+ handlebarsEquivalent: null,
167
+ mcnNotes: null,
168
+ docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-api/mc-ampscript-reference-api-invoke-execute.html',
169
+ guideUrl: 'https://ampscript.guide/invokeexecute/',
170
+ sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/invokeexecute/',
171
+ minArgs: 1,
172
+ maxArgs: 3,
173
+ category: 'Marketing Cloud API',
174
+ description:
175
+ 'Calls the SOAP API Execute method on the given API object and returns the API status code.',
176
+ params: [
177
+ { name: 'apiObject', description: 'The API object to execute', type: 'object' },
178
+ {
179
+ name: 'statusMessage',
180
+ mcnSince: null,
181
+ mcnNotes: null,
182
+ description: 'An AMPscript variable that stores the API status message',
183
+ type: 'string',
184
+ optional: true,
185
+ },
186
+ {
187
+ name: 'requestId',
188
+ description: 'An AMPscript variable that stores the request ID',
189
+ type: 'string',
190
+ optional: true,
191
+ },
192
+ ],
193
+ returnType: 'rowset',
194
+ returnDescription:
195
+ 'A rowset containing the API Results. Use Row() and Field() to read each result — StatusCode, StatusMessage and ErrorCode. The optional @statusMessage out-variable receives the OverallStatus string and @requestId receives the RequestID GUID.',
196
+ syntax: 'InvokeExecute(apiObject[, @statusMessage, @requestId])',
197
+ example: '%%[ SET @rows = InvokeExecute(@apiObject, @statusMessage, @requestId) ]%%',
198
+ isConfirmed: true,
199
+ differsFromOfficialDocs: true,
200
+ officialDocsNote:
201
+ 'Email/send-context finding: the WSProxy object model is not valid in sendable email content. An isolated CreateObject(...) is rejected with HTTP 400 errorcode 10004 ("CreateObject Function is not valid in content. This function is only allowed in non sendable content."). Because this function is part of that object model (or depends on a CreateObject request object), it is a CloudPage / landing-page (non-sendable content) feature and cannot be used inside a sendable email.',
202
+ },
203
+ {
204
+ name: 'InvokePerform',
205
+ supportedInCloudPage: true,
206
+ supportedInEmail: false,
207
+ mcnSince: null,
208
+ handlebarsEquivalent: null,
209
+ mcnNotes: null,
210
+ docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-api/mc-ampscript-reference-api-invoke-perform.html',
211
+ guideUrl: 'https://ampscript.guide/invokeperform/',
212
+ sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/invokeperform/',
213
+ minArgs: 2,
214
+ maxArgs: 3,
215
+ category: 'Marketing Cloud API',
216
+ description: 'Calls the SOAP API Perform method on the given API object.',
217
+ params: [
218
+ { name: 'apiObject', description: 'API object to perform on', type: 'object' },
219
+ {
220
+ name: 'actionToPerform',
221
+ description: 'Action to perform; valid values vary by object type',
222
+ type: 'string',
223
+ },
224
+ {
225
+ name: 'statusMessage',
226
+ mcnSince: null,
227
+ mcnNotes: null,
228
+ description: 'Output variable for the resulting status message',
229
+ type: 'string',
230
+ optional: true,
231
+ },
232
+ ],
233
+ returnType: 'string',
234
+ returnDescription:
235
+ "The SOAP OverallStatus as a string — 'OK' on success, 'Error' on failure. The human-readable message goes to the optional @statusMessage out-variable.",
236
+ returnEnum: ['OK', 'Error'],
237
+ syntax: 'InvokePerform(apiObject, actionToPerform[, @statusMessage])',
238
+ example: "%%=InvokePerform(@apiObject, 'Start', @statusMessage)=%%",
239
+ isConfirmed: true,
240
+ differsFromOfficialDocs: true,
241
+ officialDocsNote:
242
+ 'Email/send-context finding: the WSProxy object model is not valid in sendable email content. An isolated CreateObject(...) is rejected with HTTP 400 errorcode 10004 ("CreateObject Function is not valid in content. This function is only allowed in non sendable content."). Because this function is part of that object model (or depends on a CreateObject request object), it is a CloudPage / landing-page (non-sendable content) feature and cannot be used inside a sendable email.',
243
+ },
244
+ {
245
+ name: 'InvokeRetrieve',
246
+ supportedInCloudPage: true,
247
+ supportedInEmail: false,
248
+ mcnSince: null,
249
+ handlebarsEquivalent: null,
250
+ mcnNotes: null,
251
+ docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-api/mc-ampscript-reference-api-invoke-retrieve.html',
252
+ guideUrl: 'https://ampscript.guide/invokeretrieve/',
253
+ sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/invokeretrieve/',
254
+ minArgs: 1,
255
+ maxArgs: 3,
256
+ category: 'Marketing Cloud API',
257
+ description: 'Calls the SOAP API Retrieve method and returns a rowset of results.',
258
+ params: [
259
+ {
260
+ name: 'apiObject',
261
+ description: 'API object defining the retrieve filter',
262
+ type: 'object',
263
+ },
264
+ {
265
+ name: 'statusMessage',
266
+ mcnSince: null,
267
+ mcnNotes: null,
268
+ description: 'Output variable for the resulting status message',
269
+ type: 'string',
270
+ optional: true,
271
+ },
272
+ {
273
+ name: 'requestId',
274
+ mcnSince: null,
275
+ mcnNotes: null,
276
+ description: 'Output variable for the resulting RequestID',
277
+ type: 'string',
278
+ optional: true,
279
+ },
280
+ ],
281
+ returnType: 'rowset',
282
+ returnDescription: 'A rowset containing the retrieved API records.',
283
+ syntax: 'InvokeRetrieve(apiObject[, @statusMessage, @requestId])',
284
+ example: '%%[ SET @rows = InvokeRetrieve(@apiObject, @statusMessage, @requestId) ]%%',
285
+ isConfirmed: true,
286
+ differsFromOfficialDocs: true,
287
+ officialDocsNote:
288
+ 'Email/send-context finding: the WSProxy object model is not valid in sendable email content. An isolated CreateObject(...) is rejected with HTTP 400 errorcode 10004 ("CreateObject Function is not valid in content. This function is only allowed in non sendable content."). Because this function is part of that object model (or depends on a CreateObject request object), it is a CloudPage / landing-page (non-sendable content) feature and cannot be used inside a sendable email.',
289
+ },
290
+ {
291
+ name: 'InvokeUpdate',
292
+ supportedInCloudPage: true,
293
+ supportedInEmail: false,
294
+ mcnSince: null,
295
+ handlebarsEquivalent: null,
296
+ mcnNotes: null,
297
+ docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-api/mc-ampscript-reference-api-invoke-update.html',
298
+ guideUrl: 'https://ampscript.guide/invokeupdate/',
299
+ sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/invokeupdate/',
300
+ minArgs: 1,
301
+ maxArgs: 4,
302
+ category: 'Marketing Cloud API',
303
+ description: 'Calls the SOAP API Update method on the given API object.',
304
+ params: [
305
+ { name: 'apiObject', description: 'API object to update', type: 'object' },
306
+ {
307
+ name: 'statusMessage',
308
+ mcnSince: null,
309
+ mcnNotes: null,
310
+ description: 'Output variable for the resulting status message',
311
+ type: 'string',
312
+ optional: true,
313
+ },
314
+ {
315
+ name: 'errorCode',
316
+ mcnSince: null,
317
+ mcnNotes: null,
318
+ description: 'Output variable for the resulting error code',
319
+ type: 'string',
320
+ optional: true,
321
+ },
322
+ {
323
+ name: 'updateOptions',
324
+ mcnSince: null,
325
+ mcnNotes: null,
326
+ description: 'Optional UpdateOptions API object',
327
+ type: 'object',
328
+ optional: true,
329
+ },
330
+ ],
331
+ returnType: 'string',
332
+ returnDescription:
333
+ "The SOAP OverallStatus as a string — 'OK' on success, 'Error' on failure. The human-readable message goes to the statusMessage out-variable and the numeric error code to errorCode.",
334
+ returnEnum: ['OK', 'Error'],
335
+ syntax: 'InvokeUpdate(apiObject[, @statusMessage, @errorCode, updateOptions])',
336
+ example: '%%=InvokeUpdate(@apiObject, @statusMessage, @errorCode)=%%',
337
+ isConfirmed: true,
338
+ differsFromOfficialDocs: true,
339
+ officialDocsNote:
340
+ 'Email/send-context finding: the WSProxy object model is not valid in sendable email content. An isolated CreateObject(...) is rejected with HTTP 400 errorcode 10004 ("CreateObject Function is not valid in content. This function is only allowed in non sendable content."). Because this function is part of that object model (or depends on a CreateObject request object), it is a CloudPage / landing-page (non-sendable content) feature and cannot be used inside a sendable email.',
341
+ },
342
+ {
343
+ name: 'SetObjectProperty',
344
+ supportedInCloudPage: true,
345
+ supportedInEmail: false,
346
+ mcnSince: null,
347
+ handlebarsEquivalent: null,
348
+ mcnNotes: null,
349
+ docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-api/mc-ampscript-reference-api-set-object-property.html',
350
+ guideUrl: 'https://ampscript.guide/setobjectproperty/',
351
+ sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/setobjectproperty/',
352
+ minArgs: 3,
353
+ maxArgs: 3,
354
+ category: 'Marketing Cloud API',
355
+ description: 'Sets a property value on a Marketing Cloud API object.',
356
+ params: [
357
+ { name: 'apiObject', description: 'API object reference', type: 'object' },
358
+ {
359
+ name: 'propertyName',
360
+ description: 'The name of the property to assign a value to',
361
+ type: 'string',
362
+ },
363
+ {
364
+ name: 'propertyValue',
365
+ description: 'The value to assign to the property',
366
+ type: 'string',
367
+ },
368
+ ],
369
+ returnType: 'void',
370
+ returnDescription: 'No value is returned; the named property is set on the object.',
371
+ syntax: 'SetObjectProperty(apiObject, propertyName, propertyValue)',
372
+ example: "SetObjectProperty(@apiObject, 'LastName', 'Smith')",
373
+ isConfirmed: true,
374
+ differsFromOfficialDocs: true,
375
+ officialDocsNote:
376
+ 'Email/send-context finding: the WSProxy object model is not valid in sendable email content. An isolated CreateObject(...) is rejected with HTTP 400 errorcode 10004 ("CreateObject Function is not valid in content. This function is only allowed in non sendable content."). Because this function is part of that object model (or depends on a CreateObject request object), it is a CloudPage / landing-page (non-sendable content) feature and cannot be used inside a sendable email.',
377
+ },
378
+ ];
@@ -0,0 +1,167 @@
1
+ // AUTO-SPLIT from the original single-file src/index.js. Data moved verbatim.
2
+ // AMPscript FUNCTIONS — category: Math (6 entries).
3
+
4
+ export const MATH_FUNCTIONS = [
5
+ {
6
+ name: 'Add',
7
+ supportedInCloudPage: true,
8
+ supportedInEmail: true,
9
+ mcnSince: 67,
10
+ handlebarsEquivalent: 'add',
11
+ handlebarsExact: true,
12
+ mcnNotes: null,
13
+ docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-math/mc-ampscript-reference-math-add.html',
14
+ guideUrl: 'https://ampscript.guide/add/',
15
+ sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/add/',
16
+ minArgs: 2,
17
+ maxArgs: 2,
18
+ category: 'Math',
19
+ description: 'Computes the sum of two numeric values.',
20
+ params: [
21
+ { name: 'number1', description: 'First operand', type: 'string|number' },
22
+ { name: 'number2', description: 'Second operand', type: 'string|number' },
23
+ ],
24
+ returnType: 'number',
25
+ returnDescription: 'The numeric sum of the two operands.',
26
+ syntax: 'Add(number1, number2)',
27
+ example: '%%=Add(15, 27)=%%',
28
+ isConfirmed: true,
29
+ differsFromOfficialDocs: false,
30
+ },
31
+ {
32
+ name: 'Divide',
33
+ supportedInCloudPage: true,
34
+ supportedInEmail: true,
35
+ mcnSince: 67,
36
+ handlebarsEquivalent: 'divide',
37
+ handlebarsExact: true,
38
+ mcnNotes: null,
39
+ docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-math/mc-ampscript-reference-math-divide.html',
40
+ guideUrl: 'https://ampscript.guide/divide/',
41
+ sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/divide/',
42
+ minArgs: 2,
43
+ maxArgs: 2,
44
+ category: 'Math',
45
+ description: 'Divides the first number by the second.',
46
+ params: [
47
+ { name: 'dividend', description: 'Number to divide', type: 'string|number' },
48
+ { name: 'divisor', description: 'Number to divide by', type: 'string|number' },
49
+ ],
50
+ returnType: 'number',
51
+ returnDescription:
52
+ 'The quotient of the two operands. A zero divisor does not raise an error: a non-zero dividend yields the infinity symbol and a zero dividend yields NaN, so guard against a zero divisor before rendering the result.',
53
+ syntax: 'Divide(dividend, divisor)',
54
+ example: '%%=Divide(100, 4)=%%',
55
+ isConfirmed: true,
56
+ differsFromOfficialDocs: false,
57
+ },
58
+ {
59
+ name: 'Mod',
60
+ supportedInCloudPage: true,
61
+ supportedInEmail: true,
62
+ mcnSince: 67,
63
+ handlebarsEquivalent: 'modulo',
64
+ handlebarsExact: true,
65
+ mcnNotes: null,
66
+ docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-math/mc-ampscript-reference-math-mod.html',
67
+ guideUrl: 'https://ampscript.guide/mod/',
68
+ sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/mod/',
69
+ minArgs: 2,
70
+ maxArgs: 2,
71
+ category: 'Math',
72
+ description:
73
+ 'Returns the remainder after dividing the first number by the second (modulo).',
74
+ params: [
75
+ { name: 'dividend', description: 'Number to divide', type: 'string|number' },
76
+ { name: 'divisor', description: 'Number to divide by', type: 'string|number' },
77
+ ],
78
+ returnType: 'number',
79
+ returnDescription:
80
+ 'The remainder after dividing the first number by the second. The result takes the sign of the dividend, and a divisor of 0 yields NaN instead of raising an error.',
81
+ syntax: 'Mod(dividend, divisor)',
82
+ example: '%%=Mod(10, 3)=%%',
83
+ isConfirmed: true,
84
+ differsFromOfficialDocs: false,
85
+ },
86
+ {
87
+ name: 'Multiply',
88
+ supportedInCloudPage: true,
89
+ supportedInEmail: true,
90
+ mcnSince: 67,
91
+ handlebarsEquivalent: 'multiply',
92
+ handlebarsExact: true,
93
+ mcnNotes: null,
94
+ docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-math/mc-ampscript-reference-math-multiply.html',
95
+ guideUrl: 'https://ampscript.guide/multiply/',
96
+ sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/multiply/',
97
+ minArgs: 2,
98
+ maxArgs: 2,
99
+ category: 'Math',
100
+ description: 'Computes the product of two numeric values.',
101
+ params: [
102
+ { name: 'number1', description: 'First operand', type: 'string|number' },
103
+ { name: 'number2', description: 'Second operand', type: 'string|number' },
104
+ ],
105
+ returnType: 'number',
106
+ returnDescription: 'The product of the two operands.',
107
+ syntax: 'Multiply(number1, number2)',
108
+ example: '%%=Multiply(5, 3)=%%',
109
+ isConfirmed: true,
110
+ differsFromOfficialDocs: false,
111
+ },
112
+ {
113
+ name: 'Random',
114
+ supportedInCloudPage: true,
115
+ supportedInEmail: true,
116
+ mcnSince: 67,
117
+ handlebarsEquivalent: 'random',
118
+ handlebarsExact: true,
119
+ mcnNotes: null,
120
+ docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-random.html',
121
+ guideUrl: 'https://ampscript.guide/random/',
122
+ sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/random/',
123
+ minArgs: 2,
124
+ maxArgs: 2,
125
+ category: 'Math',
126
+ description:
127
+ 'Returns a random integer between the two specified values (inclusive). Both bounds must be whole numbers; a decimal bound aborts the page. The bounds may be supplied in either order.',
128
+ params: [
129
+ { name: 'min', description: 'Lower bound (inclusive)', type: 'string|number' },
130
+ { name: 'max', description: 'Upper bound (inclusive)', type: 'string|number' },
131
+ ],
132
+ returnType: 'number',
133
+ returnDescription: 'A random whole number within the supplied range.',
134
+ syntax: 'Random(min, max)',
135
+ example: '%%=Random(1, 100)=%%',
136
+ isConfirmed: true,
137
+ differsFromOfficialDocs: true,
138
+ officialDocsNote:
139
+ 'The official reference states the bounds may be decimal numbers. On a CloudPage every decimal bound aborts with HTTP 422 — Random(1.2,1.8), Random(1,2.5), Random(1.0,3.0) and the quoted form Random("1.5","3.5") all fail, while the equivalent whole-number and numeric-string calls return values normally. This is a function limitation, not an environment one. Only whole-number bounds are usable at runtime.',
140
+ },
141
+ {
142
+ name: 'Subtract',
143
+ supportedInCloudPage: true,
144
+ supportedInEmail: true,
145
+ mcnSince: 67,
146
+ handlebarsEquivalent: 'subtract',
147
+ handlebarsExact: true,
148
+ mcnNotes: null,
149
+ docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-math/mc-ampscript-reference-math-subtract.html',
150
+ guideUrl: 'https://ampscript.guide/subtract/',
151
+ sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/subtract/',
152
+ minArgs: 2,
153
+ maxArgs: 2,
154
+ category: 'Math',
155
+ description: 'Computes the difference between two numeric values.',
156
+ params: [
157
+ { name: 'minuend', description: 'Value to subtract from', type: 'string|number' },
158
+ { name: 'subtrahend', description: 'Value to subtract', type: 'string|number' },
159
+ ],
160
+ returnType: 'number',
161
+ returnDescription: 'The difference of the two operands.',
162
+ syntax: 'Subtract(minuend, subtrahend)',
163
+ example: '%%=Subtract(50, 15)=%%',
164
+ isConfirmed: true,
165
+ differsFromOfficialDocs: false,
166
+ },
167
+ ];