ampscript-data 3.7.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/constants.js +47 -0
- package/src/derived.js +100 -0
- package/src/functions/content.js +1028 -0
- package/src/functions/data-extension.js +1117 -0
- package/src/functions/date-time.js +411 -0
- package/src/functions/einstein-email-recs.js +32 -0
- package/src/functions/encryption-encoding.js +545 -0
- package/src/functions/http.js +338 -0
- package/src/functions/index.js +203 -0
- package/src/functions/marketing-cloud-api.js +378 -0
- package/src/functions/math.js +167 -0
- package/src/functions/microsoft-dynamics.js +400 -0
- package/src/functions/mobileconnect.js +339 -0
- package/src/functions/sales-service-cloud.js +230 -0
- package/src/functions/social.js +151 -0
- package/src/functions/string.js +432 -0
- package/src/functions/utility.js +1118 -0
- package/src/globals.js +9 -0
- package/src/index.js +34 -7228
- package/src/keywords.js +121 -0
- package/src/operators.js +66 -0
- package/src/personalization.js +254 -0
|
@@ -0,0 +1,1118 @@
|
|
|
1
|
+
// AUTO-SPLIT from the original single-file src/index.js. Data moved verbatim.
|
|
2
|
+
// AMPscript FUNCTIONS — category: Utility (32 entries).
|
|
3
|
+
|
|
4
|
+
import { INF } from '../constants.js';
|
|
5
|
+
|
|
6
|
+
export const UTILITY_FUNCTIONS = [
|
|
7
|
+
{
|
|
8
|
+
name: 'AttributeValue',
|
|
9
|
+
supportedInCloudPage: true,
|
|
10
|
+
supportedInEmail: true,
|
|
11
|
+
mcnSince: null,
|
|
12
|
+
handlebarsEquivalent: 'personalizationResult',
|
|
13
|
+
handlebarsExact: false,
|
|
14
|
+
mcnNotes: null,
|
|
15
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-attribute-value.html',
|
|
16
|
+
guideUrl: 'https://ampscript.guide/attributevalue/',
|
|
17
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/attributevalue/',
|
|
18
|
+
minArgs: 1,
|
|
19
|
+
maxArgs: 1,
|
|
20
|
+
category: 'Utility',
|
|
21
|
+
description:
|
|
22
|
+
'Reads an attribute of the current message or page context by name, giving an empty value instead of failing when the name is unknown. The name is matched without regard to case, and system attributes such as the message context resolve on a CloudPage even though no subscriber is involved.',
|
|
23
|
+
params: [
|
|
24
|
+
{
|
|
25
|
+
name: 'attributeName',
|
|
26
|
+
description:
|
|
27
|
+
'Attribute name, matched without regard to case; an empty name aborts the page',
|
|
28
|
+
type: 'string',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
returnType: 'string',
|
|
32
|
+
returnDescription:
|
|
33
|
+
'The attribute value as a string, or an empty value when the name resolves to nothing.',
|
|
34
|
+
syntax: 'AttributeValue(attributeName)',
|
|
35
|
+
example: "%%=AttributeValue('firstname')=%%",
|
|
36
|
+
isConfirmed: true,
|
|
37
|
+
differsFromOfficialDocs: false,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'AuthenticatedEmployeeID',
|
|
41
|
+
supportedInCloudPage: true,
|
|
42
|
+
supportedInEmail: true,
|
|
43
|
+
mcnSince: null,
|
|
44
|
+
handlebarsEquivalent: null,
|
|
45
|
+
mcnNotes: null,
|
|
46
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sites/mc-ampscript-reference-sites-authenticated-employee-id.html',
|
|
47
|
+
guideUrl: 'https://ampscript.guide/authenticatedemployeeid/',
|
|
48
|
+
minArgs: 0,
|
|
49
|
+
maxArgs: 0,
|
|
50
|
+
category: 'Utility',
|
|
51
|
+
description:
|
|
52
|
+
'Returns the numeric employee ID of the Marketing Cloud user tied to the current context. On a public CloudPage, where nobody is signed in, it still returns a non-empty ID rather than an empty value, so it cannot be used to tell an authenticated visitor apart from an anonymous one.',
|
|
53
|
+
params: [],
|
|
54
|
+
returnType: 'string',
|
|
55
|
+
returnDescription:
|
|
56
|
+
'The employee ID as a numeric string, usable directly in Concat and in comparisons. It was non-empty even without a signed-in visitor.',
|
|
57
|
+
isConfirmed: true,
|
|
58
|
+
differsFromOfficialDocs: false,
|
|
59
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/authenticatedemployeeid/',
|
|
60
|
+
syntax: 'AuthenticatedEmployeeID()',
|
|
61
|
+
example: '%%=AuthenticatedEmployeeID()=%%',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'AuthenticatedEmployeeNotificationAddress',
|
|
65
|
+
supportedInCloudPage: true,
|
|
66
|
+
supportedInEmail: true,
|
|
67
|
+
mcnSince: null,
|
|
68
|
+
handlebarsEquivalent: null,
|
|
69
|
+
mcnNotes: null,
|
|
70
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sites/mc-ampscript-reference-sites-authenticated-employee-notification-address.html',
|
|
71
|
+
guideUrl: 'https://ampscript.guide/authenticatedemployeenotificationaddress/',
|
|
72
|
+
minArgs: 0,
|
|
73
|
+
maxArgs: 0,
|
|
74
|
+
category: 'Utility',
|
|
75
|
+
description:
|
|
76
|
+
'Returns the notification email address of the Marketing Cloud user tied to the current context. On a public CloudPage, where nobody is signed in, it still returns a non-empty address rather than an empty value, so it cannot be used to tell an authenticated visitor apart from an anonymous one. It is a separate value from AuthenticatedEmployeeUserName() — neither can be derived from the other.',
|
|
77
|
+
params: [],
|
|
78
|
+
returnType: 'string',
|
|
79
|
+
returnDescription:
|
|
80
|
+
'The notification address as a string, usable directly in Concat and in comparisons. On the business unit tested it was a real email address on a registered domain, and it was non-empty even without a signed-in visitor.',
|
|
81
|
+
isConfirmed: true,
|
|
82
|
+
differsFromOfficialDocs: true,
|
|
83
|
+
officialDocsNote:
|
|
84
|
+
'Proven on the child BU; the parent BU was not needed. The official reference scopes the function to microsites that use sender authenticated redirection and explicitly says it is not for use with CloudPages. At runtime the opposite happened: an anonymous GET of a public CloudPage rendered at HTTP 200 and the call returned a well-formed, non-empty notification email address — Empty() answered false, Length() reported 29 characters and IsEmailAddress() accepted it. The value behaved as an ordinary string when used inline, nested inside Concat and compared against the empty string. The literal address is redacted here because it identifies an account user; only its shape is described.',
|
|
85
|
+
sfmcGuideUrl:
|
|
86
|
+
'https://sfmc.guide/engagement/ampscript/functions/authenticatedemployeenotificationaddress/',
|
|
87
|
+
syntax: 'AuthenticatedEmployeeNotificationAddress()',
|
|
88
|
+
example: '%%=AuthenticatedEmployeeNotificationAddress()=%%',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'AuthenticatedEmployeeUserName',
|
|
92
|
+
supportedInCloudPage: true,
|
|
93
|
+
supportedInEmail: true,
|
|
94
|
+
mcnSince: null,
|
|
95
|
+
handlebarsEquivalent: null,
|
|
96
|
+
mcnNotes: null,
|
|
97
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sites/mc-ampscript-reference-sites-authenticated-employee-username.html',
|
|
98
|
+
guideUrl: 'https://ampscript.guide/authenticatedemployeeusername/',
|
|
99
|
+
minArgs: 0,
|
|
100
|
+
maxArgs: 0,
|
|
101
|
+
category: 'Utility',
|
|
102
|
+
description:
|
|
103
|
+
'Returns the login username of the Marketing Cloud user tied to the current context. On a public CloudPage, where nobody is signed in, it still returns a non-empty username rather than an empty value, so it cannot be used to tell an authenticated visitor apart from an anonymous one.',
|
|
104
|
+
params: [],
|
|
105
|
+
returnType: 'string',
|
|
106
|
+
returnDescription:
|
|
107
|
+
'The username as a string, usable directly in Concat and in comparisons. On the business unit tested it was shaped like an email address and was non-empty even without a signed-in visitor.',
|
|
108
|
+
isConfirmed: true,
|
|
109
|
+
differsFromOfficialDocs: false,
|
|
110
|
+
sfmcGuideUrl:
|
|
111
|
+
'https://sfmc.guide/engagement/ampscript/functions/authenticatedemployeeusername/',
|
|
112
|
+
syntax: 'AuthenticatedEmployeeUserName()',
|
|
113
|
+
example: '%%=AuthenticatedEmployeeUserName()=%%',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'AuthenticatedEnterpriseID',
|
|
117
|
+
supportedInCloudPage: true,
|
|
118
|
+
supportedInEmail: true,
|
|
119
|
+
mcnSince: null,
|
|
120
|
+
handlebarsEquivalent: null,
|
|
121
|
+
mcnNotes: null,
|
|
122
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sites/mc-ampscript-reference-sites-authenticated-enterprise-id.html',
|
|
123
|
+
guideUrl: 'https://ampscript.guide/authenticatedenterpriseid/',
|
|
124
|
+
minArgs: 0,
|
|
125
|
+
maxArgs: 0,
|
|
126
|
+
category: 'Utility',
|
|
127
|
+
description:
|
|
128
|
+
'Returns the enterprise ID (EID) of the Marketing Cloud account tied to the current context. On a public CloudPage, where nobody is signed in, it still returns a non-empty ID rather than an empty value, so it cannot be used to tell an authenticated visitor apart from an anonymous one. Called from a child business unit it reports the parent (enterprise) MID, not the child MID, and it is a different value from AuthenticatedEmployeeID().',
|
|
129
|
+
params: [],
|
|
130
|
+
returnType: 'string',
|
|
131
|
+
returnDescription:
|
|
132
|
+
'The enterprise ID as a digits-only numeric string, usable directly in Concat, in comparisons and in arithmetic. It was non-empty even without a signed-in visitor.',
|
|
133
|
+
isConfirmed: true,
|
|
134
|
+
differsFromOfficialDocs: false,
|
|
135
|
+
sfmcGuideUrl:
|
|
136
|
+
'https://sfmc.guide/engagement/ampscript/functions/authenticatedenterpriseid/',
|
|
137
|
+
syntax: 'AuthenticatedEnterpriseID()',
|
|
138
|
+
example: '%%=AuthenticatedEnterpriseID()=%%',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: 'AuthenticatedMemberID',
|
|
142
|
+
supportedInCloudPage: true,
|
|
143
|
+
supportedInEmail: true,
|
|
144
|
+
mcnSince: null,
|
|
145
|
+
handlebarsEquivalent: null,
|
|
146
|
+
mcnNotes: null,
|
|
147
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sites/mc-ampscript-reference-sites-authenticated-member-id.html',
|
|
148
|
+
guideUrl: 'https://ampscript.guide/authenticatedmemberid/',
|
|
149
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/authenticatedmemberid/',
|
|
150
|
+
minArgs: 0,
|
|
151
|
+
maxArgs: 0,
|
|
152
|
+
category: 'Utility',
|
|
153
|
+
description:
|
|
154
|
+
'Returns the member ID (MID) of the business unit the code runs on. On a public CloudPage, where nobody is signed in, it still returns a non-empty MID rather than an empty value, so it cannot be used to tell an authenticated visitor apart from an anonymous one. Called from a child business unit it reports that CHILD MID, unlike AuthenticatedEnterpriseID(), which reports the parent (enterprise) MID in the same render.',
|
|
155
|
+
params: [],
|
|
156
|
+
returnType: 'string',
|
|
157
|
+
returnDescription:
|
|
158
|
+
'The member ID as a digits-only numeric string, usable directly in Concat, in comparisons and in arithmetic. It was non-empty even without a signed-in visitor.',
|
|
159
|
+
isConfirmed: true,
|
|
160
|
+
differsFromOfficialDocs: false,
|
|
161
|
+
syntax: 'AuthenticatedMemberID()',
|
|
162
|
+
example: '%%=AuthenticatedMemberID()=%%',
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: 'AuthenticatedMemberName',
|
|
166
|
+
supportedInCloudPage: true,
|
|
167
|
+
supportedInEmail: true,
|
|
168
|
+
mcnSince: null,
|
|
169
|
+
handlebarsEquivalent: null,
|
|
170
|
+
mcnNotes: null,
|
|
171
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sites/mc-ampscript-reference-sites-authenticated-member-name.html',
|
|
172
|
+
guideUrl: 'https://ampscript.guide/authenticatedmembername/',
|
|
173
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/authenticatedmembername/',
|
|
174
|
+
minArgs: 0,
|
|
175
|
+
maxArgs: 0,
|
|
176
|
+
category: 'Utility',
|
|
177
|
+
description:
|
|
178
|
+
'Returns the display name of the business unit the code runs on. On a public CloudPage, where nobody is signed in, it still returns a non-empty name rather than an empty value, so it cannot be used to tell an authenticated visitor apart from an anonymous one. It is the business unit name as shown in the Marketing Cloud UI — spaces and punctuation included — not a person and not the login username returned by AuthenticatedEmployeeUserName() in the same render.',
|
|
179
|
+
params: [],
|
|
180
|
+
returnType: 'string',
|
|
181
|
+
returnDescription:
|
|
182
|
+
'The business unit display name as a free-text string that can contain spaces and punctuation, usable directly in Concat and in comparisons. It was non-empty even without a signed-in visitor.',
|
|
183
|
+
isConfirmed: true,
|
|
184
|
+
differsFromOfficialDocs: false,
|
|
185
|
+
syntax: 'AuthenticatedMemberName()',
|
|
186
|
+
example: '%%=AuthenticatedMemberName()=%%',
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: 'CloudPagesURL',
|
|
190
|
+
supportedInCloudPage: true,
|
|
191
|
+
supportedInEmail: true,
|
|
192
|
+
mcnSince: null,
|
|
193
|
+
handlebarsEquivalent: null,
|
|
194
|
+
mcnNotes: null,
|
|
195
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sites/mc-ampscript-reference-sites-cloud-pages-url.html',
|
|
196
|
+
guideUrl: 'https://ampscript.guide/cloudpagesurl/',
|
|
197
|
+
minArgs: 1,
|
|
198
|
+
maxArgs: INF,
|
|
199
|
+
category: 'Utility',
|
|
200
|
+
description:
|
|
201
|
+
'Builds the published URL of a CloudPages landing page. Name-value pairs are appended in PAIRS and are folded into a single encrypted query token rather than readable parameters; an odd trailing argument or a page ID that matches no page aborts the page.',
|
|
202
|
+
isConfirmed: true,
|
|
203
|
+
differsFromOfficialDocs: false,
|
|
204
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/cloudpagesurl/',
|
|
205
|
+
params: [
|
|
206
|
+
{
|
|
207
|
+
name: 'pageId',
|
|
208
|
+
description: 'CloudPages page ID (number or string)',
|
|
209
|
+
type: 'string|number',
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: 'paramName1',
|
|
213
|
+
description: 'Query parameter name',
|
|
214
|
+
type: 'string',
|
|
215
|
+
optional: true,
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
name: 'paramValue1',
|
|
219
|
+
description: 'Query parameter value',
|
|
220
|
+
type: 'string',
|
|
221
|
+
optional: true,
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: 'paramNameN',
|
|
225
|
+
description: 'Additional query parameter name',
|
|
226
|
+
type: 'string',
|
|
227
|
+
optional: true,
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: 'paramValueN',
|
|
231
|
+
description: 'Additional query parameter value',
|
|
232
|
+
type: 'string',
|
|
233
|
+
optional: true,
|
|
234
|
+
},
|
|
235
|
+
],
|
|
236
|
+
returnType: 'string',
|
|
237
|
+
returnDescription:
|
|
238
|
+
'The page URL. With no extra pairs it is the bare published URL; with pairs it carries one encrypted query token that changes on every call, so the result must never be compared or cached.',
|
|
239
|
+
repeat: [{ startIndex: 1, groupSize: 2, minGroups: 0 }],
|
|
240
|
+
syntax: 'CloudPagesURL(pageId[, paramName1, paramValue1, paramNameN, paramValueN, ...])',
|
|
241
|
+
example: "%%=CloudPagesURL(123, 'key', 'value')=%%",
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
name: 'Domain',
|
|
245
|
+
supportedInCloudPage: true,
|
|
246
|
+
supportedInEmail: true,
|
|
247
|
+
mcnSince: null,
|
|
248
|
+
handlebarsEquivalent: null,
|
|
249
|
+
mcnNotes: null,
|
|
250
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-domain.html',
|
|
251
|
+
guideUrl: 'https://ampscript.guide/domain/',
|
|
252
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/domain/',
|
|
253
|
+
minArgs: 1,
|
|
254
|
+
maxArgs: 1,
|
|
255
|
+
isConfirmed: true,
|
|
256
|
+
differsFromOfficialDocs: false,
|
|
257
|
+
category: 'Utility',
|
|
258
|
+
description:
|
|
259
|
+
'Returns everything after the first at sign, without validating the address or the domain. A value with no at sign, an empty string and a number all return an empty string.',
|
|
260
|
+
params: [
|
|
261
|
+
{
|
|
262
|
+
name: 'emailAddress',
|
|
263
|
+
description: 'Email address; the text after the first at sign is returned verbatim',
|
|
264
|
+
type: 'string',
|
|
265
|
+
},
|
|
266
|
+
],
|
|
267
|
+
returnType: 'string',
|
|
268
|
+
returnDescription:
|
|
269
|
+
'The text following the first at sign, preserving the original case and any further at signs. Empty when the value contains no at sign or nothing follows it.',
|
|
270
|
+
syntax: 'Domain(emailAddress)',
|
|
271
|
+
example: "%%=Domain('user@example.com')=%%",
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
name: 'Empty',
|
|
275
|
+
supportedInCloudPage: true,
|
|
276
|
+
supportedInEmail: true,
|
|
277
|
+
mcnSince: 67,
|
|
278
|
+
handlebarsEquivalent: 'isEmpty',
|
|
279
|
+
handlebarsExact: true,
|
|
280
|
+
mcnNotes: null,
|
|
281
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-empty.html',
|
|
282
|
+
guideUrl: 'https://ampscript.guide/empty/',
|
|
283
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/empty/',
|
|
284
|
+
minArgs: 1,
|
|
285
|
+
maxArgs: 1,
|
|
286
|
+
category: 'Utility',
|
|
287
|
+
description:
|
|
288
|
+
'Returns true when the value is an empty string, an unset variable, or an undeclared variable. Whitespace, the number 0, the string "0" and the string "false" are all treated as present.',
|
|
289
|
+
params: [
|
|
290
|
+
{
|
|
291
|
+
name: 'value',
|
|
292
|
+
description:
|
|
293
|
+
'Value to test; a variable, literal, attribute or nested function call is accepted',
|
|
294
|
+
type: 'string|number|boolean|date',
|
|
295
|
+
},
|
|
296
|
+
],
|
|
297
|
+
returnType: 'boolean',
|
|
298
|
+
returnDescription: 'True when the value is empty or missing, otherwise false.',
|
|
299
|
+
returnEnum: [true, false],
|
|
300
|
+
isConfirmed: true,
|
|
301
|
+
syntax: 'Empty(value)',
|
|
302
|
+
example: '%%=Empty(@myVar)=%%',
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
name: 'Format',
|
|
306
|
+
supportedInCloudPage: true,
|
|
307
|
+
supportedInEmail: true,
|
|
308
|
+
mcnSince: 67,
|
|
309
|
+
handlebarsEquivalent: 'format',
|
|
310
|
+
handlebarsExact: false,
|
|
311
|
+
mcnNotes: null,
|
|
312
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-string/mc-ampscript-reference-string-format.html',
|
|
313
|
+
guideUrl: 'https://ampscript.guide/format/',
|
|
314
|
+
minArgs: 2,
|
|
315
|
+
maxArgs: 4,
|
|
316
|
+
category: 'Utility',
|
|
317
|
+
isConfirmed: true,
|
|
318
|
+
differsFromOfficialDocs: true,
|
|
319
|
+
officialDocsNote:
|
|
320
|
+
'Proven on the child BU. The official reference names two possible values for the third parameter, Date and Number, but at runtime only Date is usable. Passing the literal Number aborts the page with HTTP 422 and discards all output, whether or not a locale follows it — Format(1234.555, "C2", "Number") and Format(1234.555, "C2", "Number", "de-DE") both aborted, exactly like the invented value Banana. Date works in any capitalisation, and the empty string works and still allows a locale in the fourth parameter, so Format(1234.555, "C2", "", "de-DE") is the way to format a localised number. Number formatting also happens correctly with the third parameter omitted entirely, so the documented value is not merely optional, it is unusable.',
|
|
321
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/format/',
|
|
322
|
+
description:
|
|
323
|
+
'Formats a number, a date or a string with a .NET format pattern. The third parameter only accepts Date or the empty string; the documented value Number aborts the page.',
|
|
324
|
+
params: [
|
|
325
|
+
{
|
|
326
|
+
name: 'value',
|
|
327
|
+
description:
|
|
328
|
+
'The value to format; a number, a numeric string, a date value or a parseable date string',
|
|
329
|
+
type: 'string|number|date',
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
name: 'formatString',
|
|
333
|
+
description:
|
|
334
|
+
'Standard or custom .NET format pattern; an unusable pattern is echoed back instead of failing',
|
|
335
|
+
type: 'string',
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
name: 'dataFormat',
|
|
339
|
+
mcnSince: null,
|
|
340
|
+
mcnNotes: null,
|
|
341
|
+
description:
|
|
342
|
+
'Only Date, in any capitalisation, or the empty string; any other value including the documented Number aborts the page',
|
|
343
|
+
type: 'string',
|
|
344
|
+
optional: true,
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
name: 'cultureCode',
|
|
348
|
+
description:
|
|
349
|
+
'The locale for separators, symbols and month and day names, written with either a hyphen or an underscore',
|
|
350
|
+
type: 'string',
|
|
351
|
+
optional: true,
|
|
352
|
+
},
|
|
353
|
+
],
|
|
354
|
+
returnType: 'string',
|
|
355
|
+
returnDescription:
|
|
356
|
+
'The formatted value, or an unformatted echo of the input or of the pattern when the pattern does not suit the input.',
|
|
357
|
+
syntax: 'Format(value, formatString[, dataFormat, cultureCode])',
|
|
358
|
+
example: '%%=Format("2026-03-04 13:52:07", "yyyy-MM-dd HH:mm:ss", "Date")=%%',
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
name: 'FormatCurrency',
|
|
362
|
+
supportedInCloudPage: true,
|
|
363
|
+
supportedInEmail: true,
|
|
364
|
+
mcnSince: 67,
|
|
365
|
+
handlebarsEquivalent: 'formatCurrency',
|
|
366
|
+
handlebarsExact: false,
|
|
367
|
+
mcnNotes: null,
|
|
368
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-formatCurrency.html',
|
|
369
|
+
guideUrl: 'https://ampscript.guide/formatcurrency/',
|
|
370
|
+
minArgs: 2,
|
|
371
|
+
maxArgs: 4,
|
|
372
|
+
category: 'Utility',
|
|
373
|
+
isConfirmed: true,
|
|
374
|
+
differsFromOfficialDocs: false,
|
|
375
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/formatcurrency/',
|
|
376
|
+
description:
|
|
377
|
+
'Formats a number as a currency amount for a locale, choosing the symbol, the separators and the symbol position from that locale. Rounding is half-up.',
|
|
378
|
+
params: [
|
|
379
|
+
{
|
|
380
|
+
name: 'value',
|
|
381
|
+
description:
|
|
382
|
+
'The amount to format, as a number or as a numeric string; a string may carry thousands separators',
|
|
383
|
+
type: 'string|number',
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
name: 'locale',
|
|
387
|
+
description:
|
|
388
|
+
'The locale that supplies the symbol, the separators and the symbol position, written with either a hyphen or an underscore; a language-only code works and an unknown code falls back to a generic currency sign',
|
|
389
|
+
type: 'string',
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
name: 'decimalPlaces',
|
|
393
|
+
mcnSince: null,
|
|
394
|
+
mcnNotes: null,
|
|
395
|
+
description:
|
|
396
|
+
'Number of decimal places; without it the locale decides, which is zero places for currencies that have no minor unit',
|
|
397
|
+
type: 'string|number',
|
|
398
|
+
optional: true,
|
|
399
|
+
default: 2,
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
name: 'symbol',
|
|
403
|
+
mcnSince: null,
|
|
404
|
+
mcnNotes: null,
|
|
405
|
+
description:
|
|
406
|
+
"Replaces the locale's currency symbol while keeping the locale's separators and symbol position; requires decimalPlaces to be supplied as well",
|
|
407
|
+
type: 'string',
|
|
408
|
+
optional: true,
|
|
409
|
+
},
|
|
410
|
+
],
|
|
411
|
+
returnType: 'string',
|
|
412
|
+
returnDescription: 'The amount formatted as a currency string for the requested locale.',
|
|
413
|
+
syntax: 'FormatCurrency(value, locale[, decimalPlaces, symbol])',
|
|
414
|
+
example: "%%=FormatCurrency(1234.555, 'en-US')=%%",
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
name: 'FormatNumber',
|
|
418
|
+
supportedInCloudPage: true,
|
|
419
|
+
supportedInEmail: true,
|
|
420
|
+
mcnSince: 67,
|
|
421
|
+
handlebarsEquivalent: 'formatNumber',
|
|
422
|
+
handlebarsExact: true,
|
|
423
|
+
mcnNotes: null,
|
|
424
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-formatNumber.html',
|
|
425
|
+
guideUrl: 'https://ampscript.guide/formatnumber/',
|
|
426
|
+
minArgs: 2,
|
|
427
|
+
maxArgs: 3,
|
|
428
|
+
category: 'Utility',
|
|
429
|
+
isConfirmed: true,
|
|
430
|
+
differsFromOfficialDocs: false,
|
|
431
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/formatnumber/',
|
|
432
|
+
description:
|
|
433
|
+
'Formats a number with a standard or custom .NET numeric pattern, optionally for a locale. Rounding is half-up.',
|
|
434
|
+
params: [
|
|
435
|
+
{
|
|
436
|
+
name: 'number',
|
|
437
|
+
description:
|
|
438
|
+
'The value to format, as a number or as a numeric string; a string may carry thousands separators',
|
|
439
|
+
type: 'string|number',
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
name: 'format',
|
|
443
|
+
description:
|
|
444
|
+
'Standard pattern letter with an optional precision digit, such as N2 or C0, or a custom pattern; an unrecognised pattern is echoed back',
|
|
445
|
+
type: 'string',
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
name: 'locale',
|
|
449
|
+
description:
|
|
450
|
+
'The locale that supplies separators and the currency symbol, written with either a hyphen or an underscore; an unknown code falls back rather than failing',
|
|
451
|
+
type: 'string',
|
|
452
|
+
optional: true,
|
|
453
|
+
},
|
|
454
|
+
],
|
|
455
|
+
returnType: 'string',
|
|
456
|
+
returnDescription: 'The number formatted according to the supplied pattern.',
|
|
457
|
+
syntax: 'FormatNumber(number, format[, locale])',
|
|
458
|
+
example: "%%=FormatNumber(1234.555, 'N2', 'de-DE')=%%",
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
name: 'GUID',
|
|
462
|
+
supportedInCloudPage: true,
|
|
463
|
+
supportedInEmail: true,
|
|
464
|
+
mcnSince: null,
|
|
465
|
+
handlebarsEquivalent: null,
|
|
466
|
+
mcnNotes: null,
|
|
467
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-guid.html',
|
|
468
|
+
guideUrl: 'https://ampscript.guide/guid/',
|
|
469
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/guid/',
|
|
470
|
+
minArgs: 0,
|
|
471
|
+
maxArgs: 0,
|
|
472
|
+
category: 'Utility',
|
|
473
|
+
description:
|
|
474
|
+
'Generates a new globally unique identifier. Every call returns a different value, so store the result in a variable when the same identifier is needed twice.',
|
|
475
|
+
params: [],
|
|
476
|
+
returnType: 'string',
|
|
477
|
+
returnDescription:
|
|
478
|
+
'A 36-character lowercase identifier in the eight-four-four-four-twelve hyphenated form, without surrounding braces.',
|
|
479
|
+
syntax: 'GUID()',
|
|
480
|
+
example: '%%=GUID()=%%',
|
|
481
|
+
isConfirmed: true,
|
|
482
|
+
differsFromOfficialDocs: false,
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
name: 'IIf',
|
|
486
|
+
supportedInCloudPage: true,
|
|
487
|
+
supportedInEmail: true,
|
|
488
|
+
mcnSince: 67,
|
|
489
|
+
handlebarsEquivalent: 'iif',
|
|
490
|
+
handlebarsExact: true,
|
|
491
|
+
mcnNotes: null,
|
|
492
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-iif.html',
|
|
493
|
+
guideUrl: 'https://ampscript.guide/iif/',
|
|
494
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/iif/',
|
|
495
|
+
minArgs: 3,
|
|
496
|
+
maxArgs: 3,
|
|
497
|
+
category: 'Utility',
|
|
498
|
+
description:
|
|
499
|
+
'Returns one of two values based on a boolean expression (inline if). Only a real comparison or a boolean-returning function selects the true branch; a plain string or number always selects the false branch. Only the selected branch is evaluated, so a call that would abort the page is safe in the branch that is not taken.',
|
|
500
|
+
params: [
|
|
501
|
+
{
|
|
502
|
+
name: 'expression',
|
|
503
|
+
description:
|
|
504
|
+
'Boolean expression to evaluate; a non-boolean value always selects the false branch',
|
|
505
|
+
type: 'boolean',
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
name: 'trueValue',
|
|
509
|
+
description: 'Value returned when true; evaluated only when true is selected',
|
|
510
|
+
type: 'string|number|boolean|date',
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
name: 'falseValue',
|
|
514
|
+
description: 'Value returned when false; evaluated only when false is selected',
|
|
515
|
+
type: 'string|number|boolean|date',
|
|
516
|
+
},
|
|
517
|
+
],
|
|
518
|
+
returnType: 'string',
|
|
519
|
+
returnDescription:
|
|
520
|
+
'The second argument when the condition is true, otherwise the third argument.',
|
|
521
|
+
isConfirmed: true,
|
|
522
|
+
syntax: 'IIf(expression, trueValue, falseValue)',
|
|
523
|
+
example: "%%=IIf(Empty(@name), 'Friend', @name)=%%",
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
name: 'IsCHTMLBrowser',
|
|
527
|
+
supportedInCloudPage: true,
|
|
528
|
+
supportedInEmail: false,
|
|
529
|
+
mcnSince: null,
|
|
530
|
+
handlebarsEquivalent: null,
|
|
531
|
+
mcnNotes: null,
|
|
532
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-http/mc-ampscript-reference-http-is-chtml-browser.html',
|
|
533
|
+
guideUrl: 'https://ampscript.guide/ischtmlbrowser/',
|
|
534
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/ischtmlbrowser/',
|
|
535
|
+
minArgs: 1,
|
|
536
|
+
maxArgs: 1,
|
|
537
|
+
isConfirmed: true,
|
|
538
|
+
differsFromOfficialDocs: true,
|
|
539
|
+
officialDocsNote:
|
|
540
|
+
'The official reference documents this as an AMPscript function without noting that it is restricted to non-sendable content. Email/send-context finding: rendered through the Email Preview API against a seeded sendable row, an isolated IsCHTMLBrowser("DoCoMo/2.0 N905i") was rejected with HTTP 400 errorcode 10004 ("IsCHTMLBrowser Function is not valid in content. This function is only allowed in non sendable content."). So it works only in non-sendable content (CloudPages / landing pages) and cannot be used inside a sendable email, which fits its purpose since a user-agent is a request-time value absent at send time.',
|
|
541
|
+
category: 'Utility',
|
|
542
|
+
description:
|
|
543
|
+
'Tests a user agent string for a compact HTML (cHTML) feature-phone browser. Feature-phone agents such as i-mode and KDDI handsets are recognised; modern desktop and mobile agents are not. Only valid in non-sendable content (CloudPages / landing pages), not in sendable email.',
|
|
544
|
+
params: [
|
|
545
|
+
{
|
|
546
|
+
name: 'userAgent',
|
|
547
|
+
description:
|
|
548
|
+
'User agent string to test, typically HTTPRequestHeader("user-agent") on a CloudPage',
|
|
549
|
+
type: 'string',
|
|
550
|
+
},
|
|
551
|
+
],
|
|
552
|
+
returnType: 'boolean',
|
|
553
|
+
returnDescription: 'True when the user agent indicates a cHTML browser, otherwise false.',
|
|
554
|
+
returnEnum: [true, false],
|
|
555
|
+
syntax: 'IsCHTMLBrowser(userAgent)',
|
|
556
|
+
example: '%%=IsCHTMLBrowser(@userAgent)=%%',
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
name: 'IsEmailAddress',
|
|
560
|
+
supportedInCloudPage: true,
|
|
561
|
+
supportedInEmail: true,
|
|
562
|
+
mcnSince: null,
|
|
563
|
+
handlebarsEquivalent: null,
|
|
564
|
+
mcnNotes: null,
|
|
565
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-is-email-address.html',
|
|
566
|
+
guideUrl: 'https://ampscript.guide/isemailaddress/',
|
|
567
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/isemailaddress/',
|
|
568
|
+
minArgs: 1,
|
|
569
|
+
maxArgs: 1,
|
|
570
|
+
isConfirmed: true,
|
|
571
|
+
differsFromOfficialDocs: true,
|
|
572
|
+
officialDocsNote:
|
|
573
|
+
'The official reference states that an address whose domain has no top-level domain is accepted, giving a call on a bare single-label domain as an example of a true result. On a live Engagement CloudPage on the child business unit that shape returned False, in a gate that printed its own start and done markers at HTTP 200 alongside a known-good control block. Every other example in the same table matched: the missing at sign, the double at sign, the missing local part and the missing second-level domain all returned False, and a well-formed address returned True. Surrounding whitespace is also rejected, which no source mentions.',
|
|
574
|
+
category: 'Utility',
|
|
575
|
+
description:
|
|
576
|
+
'Checks a value against email address syntax only; it never tests whether the mailbox or domain exists. Surrounding whitespace and a domain without a top-level domain are both rejected.',
|
|
577
|
+
params: [
|
|
578
|
+
{
|
|
579
|
+
name: 'value',
|
|
580
|
+
description:
|
|
581
|
+
'Value to validate; trim it first, as a leading or trailing space fails',
|
|
582
|
+
type: 'string',
|
|
583
|
+
},
|
|
584
|
+
],
|
|
585
|
+
returnType: 'boolean',
|
|
586
|
+
returnDescription:
|
|
587
|
+
'True when the value is a syntactically valid email address, otherwise false.',
|
|
588
|
+
returnEnum: [true, false],
|
|
589
|
+
syntax: 'IsEmailAddress(value)',
|
|
590
|
+
example: "%%=IsEmailAddress('test@example.com')=%%",
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
name: 'IsNull',
|
|
594
|
+
supportedInCloudPage: true,
|
|
595
|
+
supportedInEmail: true,
|
|
596
|
+
mcnSince: 67,
|
|
597
|
+
handlebarsEquivalent: 'isEmpty',
|
|
598
|
+
handlebarsExact: false,
|
|
599
|
+
mcnNotes: null,
|
|
600
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-is-null.html',
|
|
601
|
+
guideUrl: 'https://ampscript.guide/isnull/',
|
|
602
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/isnull/',
|
|
603
|
+
minArgs: 1,
|
|
604
|
+
maxArgs: 1,
|
|
605
|
+
category: 'Utility',
|
|
606
|
+
description:
|
|
607
|
+
'Returns true only for a genuine null, which in practice means a data extension field with no value. An unset or undeclared variable, an empty string, whitespace and every ordinary value all return false, so this is not a general emptiness test.',
|
|
608
|
+
params: [
|
|
609
|
+
{
|
|
610
|
+
name: 'value',
|
|
611
|
+
description:
|
|
612
|
+
'Value to test; typically a data extension field value retrieved with Lookup',
|
|
613
|
+
type: 'string|number|boolean|date',
|
|
614
|
+
},
|
|
615
|
+
],
|
|
616
|
+
returnType: 'boolean',
|
|
617
|
+
returnDescription:
|
|
618
|
+
'True when the value is null, otherwise false. Prefer Empty when the intent is to detect a missing or blank value.',
|
|
619
|
+
isConfirmed: true,
|
|
620
|
+
differsFromOfficialDocs: true,
|
|
621
|
+
officialDocsNote:
|
|
622
|
+
'The official reference shows a variable declared with VAR and never assigned, and states IsNull returns true for it. On a live Engagement CloudPage on the child business unit that exact shape returned False, in a gate that printed its own start and done markers at HTTP 200 alongside a known-good control block. The same False came back for an undeclared variable, an empty string, whitespace, 0, "0", "false", a real value, a date, an absent attribute, an absent request parameter and the subscriber-context tokens. Use Empty for a missing-value test.',
|
|
623
|
+
syntax: 'IsNull(value)',
|
|
624
|
+
example: '%%=IsNull(@value)=%%',
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
name: 'IsNullDefault',
|
|
628
|
+
supportedInCloudPage: true,
|
|
629
|
+
supportedInEmail: true,
|
|
630
|
+
mcnSince: null,
|
|
631
|
+
handlebarsEquivalent: 'fallback',
|
|
632
|
+
handlebarsExact: false,
|
|
633
|
+
mcnNotes: null,
|
|
634
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sites/mc-ampscript-reference-sites-is-null-default.html',
|
|
635
|
+
guideUrl: 'https://ampscript.guide/isnulldefault/',
|
|
636
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/isnulldefault/',
|
|
637
|
+
minArgs: 2,
|
|
638
|
+
maxArgs: 2,
|
|
639
|
+
category: 'Utility',
|
|
640
|
+
description:
|
|
641
|
+
'Returns the value if not null, otherwise returns the default. Outside a Smart Capture form the default is never reached: on a CloudPage every empty-ish input returns the empty string instead, so it cannot be used as a general fallback.',
|
|
642
|
+
params: [
|
|
643
|
+
{
|
|
644
|
+
name: 'value',
|
|
645
|
+
description: 'Value to test; returned unchanged whenever it is present',
|
|
646
|
+
type: 'string|number|boolean|date',
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
name: 'defaultValue',
|
|
650
|
+
description:
|
|
651
|
+
'Default to return when the value is null; only reached in a Smart Capture form context',
|
|
652
|
+
type: 'string|number|boolean|date',
|
|
653
|
+
},
|
|
654
|
+
],
|
|
655
|
+
returnType: 'string',
|
|
656
|
+
returnDescription: 'The original value, or the default value when the original is null.',
|
|
657
|
+
isConfirmed: true,
|
|
658
|
+
syntax: 'IsNullDefault(value, defaultValue)',
|
|
659
|
+
example: "%%=IsNullDefault(@name, 'Friend')=%%",
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
name: 'IsPhoneNumber',
|
|
663
|
+
supportedInCloudPage: true,
|
|
664
|
+
supportedInEmail: true,
|
|
665
|
+
mcnSince: null,
|
|
666
|
+
handlebarsEquivalent: null,
|
|
667
|
+
mcnNotes: null,
|
|
668
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-is-phone-number.html',
|
|
669
|
+
guideUrl: 'https://ampscript.guide/isphonenumber/',
|
|
670
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/isphonenumber/',
|
|
671
|
+
minArgs: 1,
|
|
672
|
+
maxArgs: 1,
|
|
673
|
+
isConfirmed: true,
|
|
674
|
+
differsFromOfficialDocs: false,
|
|
675
|
+
category: 'Utility',
|
|
676
|
+
description:
|
|
677
|
+
'Checks a value against the North American Numbering Plan. Dashes, dots, spaces and parentheses are tolerated, but a leading plus sign, any letter, a number outside the plan and a leading country-code digit all fail.',
|
|
678
|
+
params: [
|
|
679
|
+
{
|
|
680
|
+
name: 'value',
|
|
681
|
+
description:
|
|
682
|
+
'Phone number to validate; strip any leading plus sign or country code first',
|
|
683
|
+
type: 'string|number',
|
|
684
|
+
},
|
|
685
|
+
],
|
|
686
|
+
returnType: 'boolean',
|
|
687
|
+
returnDescription: 'True when the value is a valid phone number, otherwise false.',
|
|
688
|
+
returnEnum: [true, false],
|
|
689
|
+
syntax: 'IsPhoneNumber(value)',
|
|
690
|
+
example: "%%=IsPhoneNumber('425-555-0142')=%%",
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
name: 'MicrositeURL',
|
|
694
|
+
supportedInCloudPage: true,
|
|
695
|
+
supportedInEmail: true,
|
|
696
|
+
mcnSince: null,
|
|
697
|
+
handlebarsEquivalent: null,
|
|
698
|
+
mcnNotes: null,
|
|
699
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sites/mc-ampscript-reference-sites-microsite-url.html',
|
|
700
|
+
guideUrl: 'https://ampscript.guide/micrositeurl/',
|
|
701
|
+
minArgs: 1,
|
|
702
|
+
maxArgs: INF,
|
|
703
|
+
category: 'Utility',
|
|
704
|
+
description:
|
|
705
|
+
'Builds a Classic Content microsite URL whose single encrypted query string carries the page reference and any extra name-value pairs. Every call produces a fresh token, so two calls with identical arguments never match.',
|
|
706
|
+
isConfirmed: true,
|
|
707
|
+
differsFromOfficialDocs: false,
|
|
708
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/micrositeurl/',
|
|
709
|
+
params: [
|
|
710
|
+
{ name: 'pageId', description: 'Microsite page ID', type: 'string|number' },
|
|
711
|
+
{
|
|
712
|
+
name: 'paramName1',
|
|
713
|
+
description: 'Query parameter name',
|
|
714
|
+
type: 'string',
|
|
715
|
+
optional: true,
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
name: 'paramValue1',
|
|
719
|
+
description: 'Query parameter value',
|
|
720
|
+
type: 'string',
|
|
721
|
+
optional: true,
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
name: 'paramNameN',
|
|
725
|
+
description: 'Additional query parameter name',
|
|
726
|
+
type: 'string',
|
|
727
|
+
optional: true,
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
name: 'paramValueN',
|
|
731
|
+
description: 'Additional query parameter value',
|
|
732
|
+
type: 'string',
|
|
733
|
+
optional: true,
|
|
734
|
+
},
|
|
735
|
+
],
|
|
736
|
+
returnType: 'string',
|
|
737
|
+
returnDescription:
|
|
738
|
+
'A microsite page URL carrying one encrypted token; extra name-value pairs are folded into that token rather than appended as readable query parameters.',
|
|
739
|
+
repeat: [{ startIndex: 1, groupSize: 2, minGroups: 0 }],
|
|
740
|
+
syntax: 'MicrositeURL(pageId[, paramName1, paramValue1, paramNameN, paramValueN, ...])',
|
|
741
|
+
example: '%%=MicrositeURL(12345)=%%',
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
name: 'Output',
|
|
745
|
+
supportedInCloudPage: true,
|
|
746
|
+
supportedInEmail: false,
|
|
747
|
+
mcnSince: 67,
|
|
748
|
+
handlebarsEquivalent: null,
|
|
749
|
+
mcnNotes: null,
|
|
750
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-output.html',
|
|
751
|
+
guideUrl: 'https://ampscript.guide/output/',
|
|
752
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/output/',
|
|
753
|
+
minArgs: 0,
|
|
754
|
+
maxArgs: INF,
|
|
755
|
+
category: 'Utility',
|
|
756
|
+
description:
|
|
757
|
+
'Writes the result of a nested function call into the rendered content. A string literal, a bare variable or a number renders nothing at all, without raising an error.',
|
|
758
|
+
params: [
|
|
759
|
+
{
|
|
760
|
+
name: 'content',
|
|
761
|
+
description:
|
|
762
|
+
'Function call whose result is written; a literal or bare variable renders nothing',
|
|
763
|
+
optional: true,
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
name: 'contentN',
|
|
767
|
+
description:
|
|
768
|
+
'Additional function call whose result is written in turn; a literal or bare variable renders nothing',
|
|
769
|
+
optional: true,
|
|
770
|
+
},
|
|
771
|
+
],
|
|
772
|
+
returnType: 'void',
|
|
773
|
+
returnDescription:
|
|
774
|
+
'No value is returned, so the call cannot be nested inside another function; the result is written straight into the rendered content.',
|
|
775
|
+
repeat: [{ startIndex: 0, groupSize: 1, minGroups: 0 }],
|
|
776
|
+
syntax: 'Output([content, ...])',
|
|
777
|
+
example: "%%=Output(Concat('Hello ', @firstName))=%%",
|
|
778
|
+
isConfirmed: true,
|
|
779
|
+
differsFromOfficialDocs: true,
|
|
780
|
+
officialDocsNote:
|
|
781
|
+
'The official reference states that a value which is not a function call, such as a string literal, makes the function return an error. On a live Engagement CloudPage on the child business unit a literal argument, a bare variable and a bare number each rendered nothing at all while the page still returned HTTP 200 and every surrounding marker printed, so no error surfaced anywhere. The same page also accepted zero arguments and up to three arguments, writing each one in turn.',
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
name: 'OutputLine',
|
|
785
|
+
supportedInCloudPage: true,
|
|
786
|
+
supportedInEmail: true,
|
|
787
|
+
mcnSince: 67,
|
|
788
|
+
handlebarsEquivalent: null,
|
|
789
|
+
mcnNotes: null,
|
|
790
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-output-line.html',
|
|
791
|
+
guideUrl: 'https://ampscript.guide/outputline/',
|
|
792
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/outputline/',
|
|
793
|
+
minArgs: 0,
|
|
794
|
+
maxArgs: INF,
|
|
795
|
+
category: 'Utility',
|
|
796
|
+
description:
|
|
797
|
+
'Writes the result of a nested function call into the rendered content, followed by a carriage return and line feed. A string literal, a bare variable or a number renders only the line break. The break is not an HTML line break, so an HTML view keeps everything on one line unless the content sits inside a preformatted element.',
|
|
798
|
+
params: [
|
|
799
|
+
{
|
|
800
|
+
name: 'content',
|
|
801
|
+
description:
|
|
802
|
+
'Function call whose result is written; a literal or bare variable renders only the line break',
|
|
803
|
+
optional: true,
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
name: 'contentN',
|
|
807
|
+
description:
|
|
808
|
+
'Additional function call whose result is written in turn before the single trailing line break; a literal or bare variable renders only the line break',
|
|
809
|
+
optional: true,
|
|
810
|
+
},
|
|
811
|
+
],
|
|
812
|
+
returnType: 'void',
|
|
813
|
+
returnDescription:
|
|
814
|
+
'No value is returned, so the call cannot be nested inside another function; the result and a carriage return plus line feed are written straight into the rendered content.',
|
|
815
|
+
repeat: [{ startIndex: 0, groupSize: 1, minGroups: 0 }],
|
|
816
|
+
syntax: 'OutputLine([content, ...])',
|
|
817
|
+
example: "%%=OutputLine(Concat('Hello ', @firstName))=%%",
|
|
818
|
+
isConfirmed: true,
|
|
819
|
+
differsFromOfficialDocs: false,
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
name: 'QueryParameter',
|
|
823
|
+
supportedInCloudPage: true,
|
|
824
|
+
supportedInEmail: true,
|
|
825
|
+
mcnSince: null,
|
|
826
|
+
handlebarsEquivalent: null,
|
|
827
|
+
mcnNotes: null,
|
|
828
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sites/mc-ampscript-reference-sites-query-parameter.html',
|
|
829
|
+
guideUrl: 'https://ampscript.guide/queryparameter/',
|
|
830
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/queryparameter/',
|
|
831
|
+
minArgs: 1,
|
|
832
|
+
maxArgs: 1,
|
|
833
|
+
category: 'Utility',
|
|
834
|
+
description:
|
|
835
|
+
'Returns the value of a URL query string parameter from the current page request. The name is matched without regard to case, percent-encoded characters arrive decoded, and a name supplied more than once yields the values joined by a comma.',
|
|
836
|
+
params: [
|
|
837
|
+
{
|
|
838
|
+
name: 'parameterName',
|
|
839
|
+
description: 'Query parameter name, matched without regard to case',
|
|
840
|
+
type: 'string',
|
|
841
|
+
},
|
|
842
|
+
],
|
|
843
|
+
returnType: 'string',
|
|
844
|
+
returnDescription:
|
|
845
|
+
'The decoded value of the named query-string parameter, or an empty string when the request carries no such parameter. The value is returned exactly as supplied, so escape it before rendering it into markup.',
|
|
846
|
+
syntax: 'QueryParameter(parameterName)',
|
|
847
|
+
example: "%%=QueryParameter('utm_source')=%%",
|
|
848
|
+
isConfirmed: true,
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
name: 'RaiseError',
|
|
852
|
+
supportedInCloudPage: true,
|
|
853
|
+
supportedInEmail: true,
|
|
854
|
+
mcnSince: 67,
|
|
855
|
+
handlebarsEquivalent: 'raiseError',
|
|
856
|
+
handlebarsExact: false,
|
|
857
|
+
mcnNotes: null,
|
|
858
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-raise-error.html',
|
|
859
|
+
guideUrl: 'https://ampscript.guide/raiseerror/',
|
|
860
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/raiseerror/',
|
|
861
|
+
minArgs: 1,
|
|
862
|
+
maxArgs: 5,
|
|
863
|
+
category: 'Utility',
|
|
864
|
+
description:
|
|
865
|
+
'Raises a runtime error, optionally skipping the current subscriber or returning an API error. Outside a send it is not a graceful abort: on a landing page it discards everything already written and answers the same generic failure any other aborting call gives, with the message nowhere in the response.',
|
|
866
|
+
params: [
|
|
867
|
+
{ name: 'message', description: 'Error message', type: 'string' },
|
|
868
|
+
{
|
|
869
|
+
name: 'skipSubscriber',
|
|
870
|
+
mcnSince: null,
|
|
871
|
+
mcnNotes: null,
|
|
872
|
+
description:
|
|
873
|
+
'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.',
|
|
874
|
+
type: 'string|boolean|number',
|
|
875
|
+
optional: true,
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
name: 'apiErrorCode',
|
|
879
|
+
mcnSince: null,
|
|
880
|
+
mcnNotes: null,
|
|
881
|
+
description: 'Custom API error code',
|
|
882
|
+
type: 'string',
|
|
883
|
+
optional: true,
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
name: 'apiErrorNumber',
|
|
887
|
+
mcnSince: null,
|
|
888
|
+
mcnNotes: null,
|
|
889
|
+
description: 'Custom API error message',
|
|
890
|
+
type: 'number',
|
|
891
|
+
optional: true,
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
name: 'preserveDataExt',
|
|
895
|
+
mcnSince: null,
|
|
896
|
+
mcnNotes: null,
|
|
897
|
+
description:
|
|
898
|
+
"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",
|
|
899
|
+
type: 'boolean',
|
|
900
|
+
optional: true,
|
|
901
|
+
},
|
|
902
|
+
],
|
|
903
|
+
returnType: 'void',
|
|
904
|
+
returnDescription:
|
|
905
|
+
'No value is returned; processing is halted. On a landing page the whole request is abandoned and the response body is a fixed failure notice rather than the supplied message.',
|
|
906
|
+
syntax: 'RaiseError(message[, skipSubscriber, apiErrorCode, apiErrorNumber, preserveDataExt])',
|
|
907
|
+
example: "RaiseError('Missing required field', 0)",
|
|
908
|
+
isConfirmed: true,
|
|
909
|
+
differsFromOfficialDocs: false,
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
name: 'Redirect',
|
|
913
|
+
supportedInCloudPage: true,
|
|
914
|
+
supportedInEmail: false,
|
|
915
|
+
mcnSince: null,
|
|
916
|
+
handlebarsEquivalent: null,
|
|
917
|
+
mcnNotes: null,
|
|
918
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sites/mc-ampscript-reference-sites-redirect.html',
|
|
919
|
+
guideUrl: 'https://ampscript.guide/redirect/',
|
|
920
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/redirect/',
|
|
921
|
+
minArgs: 1,
|
|
922
|
+
maxArgs: 1,
|
|
923
|
+
category: 'Utility',
|
|
924
|
+
description:
|
|
925
|
+
'Performs an HTTP redirect to the specified URL. Landing pages only. The response is a 302 whose Location is the supplied value verbatim, and everything written before the call is discarded along with the page body. Not to be confused with RedirectTo, which emits no redirect at all.',
|
|
926
|
+
params: [{ name: 'url', description: 'Target URL', type: 'string|number' }],
|
|
927
|
+
returnType: 'void',
|
|
928
|
+
returnDescription:
|
|
929
|
+
'No value is returned; the request answers 302 and the supplied value becomes the Location header unchanged, even when it is not an absolute URL.',
|
|
930
|
+
syntax: 'Redirect(url)',
|
|
931
|
+
example: "Redirect('https://example.com')",
|
|
932
|
+
isConfirmed: true,
|
|
933
|
+
differsFromOfficialDocs: true,
|
|
934
|
+
officialDocsNote:
|
|
935
|
+
'Email/send-context finding: Redirect is not valid in sendable email content. Rendered through the Email Preview API against a seeded sendable row, an isolated Redirect("https://sfmc.guide/robots.txt") was rejected with HTTP 400 errorcode 10005 ("Redirect Function is not valid in content. This function is only allowed in in content with an HTTP context."). It is a CloudPage / landing-page (non-sendable, HTTP-context) feature that emits a 302, and cannot be used inside a sendable email, where there is no HTTP response to redirect.',
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
name: 'RedirectTo',
|
|
939
|
+
supportedInCloudPage: true,
|
|
940
|
+
supportedInEmail: true,
|
|
941
|
+
mcnSince: null,
|
|
942
|
+
handlebarsEquivalent: null,
|
|
943
|
+
mcnNotes: null,
|
|
944
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-http/mc-ampscript-reference-http-redirect-to.html',
|
|
945
|
+
guideUrl: 'https://ampscript.guide/redirectto/',
|
|
946
|
+
minArgs: 1,
|
|
947
|
+
maxArgs: 1,
|
|
948
|
+
category: 'Utility',
|
|
949
|
+
description:
|
|
950
|
+
'Marks a URL held in a variable or field as a tracked email link. It never redirects the current request and never halts the script; outside a tracked send it hands the value straight back.',
|
|
951
|
+
isConfirmed: true,
|
|
952
|
+
differsFromOfficialDocs: false,
|
|
953
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/redirectto/',
|
|
954
|
+
params: [{ name: 'url', description: 'Target URL', type: 'string|number' }],
|
|
955
|
+
returnType: 'string',
|
|
956
|
+
returnDescription:
|
|
957
|
+
'The link-tracking target for the supplied address during a tracked send; on a CloudPage the supplied value unchanged.',
|
|
958
|
+
syntax: 'RedirectTo(url)',
|
|
959
|
+
example: '%%=RedirectTo(@targetUrl)=%%',
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
name: 'RequestParameter',
|
|
963
|
+
supportedInCloudPage: true,
|
|
964
|
+
supportedInEmail: true,
|
|
965
|
+
mcnSince: null,
|
|
966
|
+
handlebarsEquivalent: null,
|
|
967
|
+
mcnNotes: null,
|
|
968
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sites/mc-ampscript-reference-sites-request-parameter.html',
|
|
969
|
+
guideUrl: 'https://ampscript.guide/requestparameter/',
|
|
970
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/requestparameter/',
|
|
971
|
+
minArgs: 1,
|
|
972
|
+
maxArgs: 1,
|
|
973
|
+
category: 'Utility',
|
|
974
|
+
description:
|
|
975
|
+
'Returns the value of a form post or query string parameter from the current request. The name is matched without regard to case, percent-encoded characters arrive decoded, and a name supplied more than once yields the values joined by a comma.',
|
|
976
|
+
params: [
|
|
977
|
+
{
|
|
978
|
+
name: 'parameterName',
|
|
979
|
+
description: 'Parameter name, matched without regard to case',
|
|
980
|
+
type: 'string',
|
|
981
|
+
},
|
|
982
|
+
],
|
|
983
|
+
returnType: 'string',
|
|
984
|
+
returnDescription:
|
|
985
|
+
'The decoded value of the named request parameter, or an empty string when the request carries no such parameter. The value is returned exactly as supplied, so escape it before rendering it into markup.',
|
|
986
|
+
syntax: 'RequestParameter(parameterName)',
|
|
987
|
+
example: "%%=RequestParameter('id')=%%",
|
|
988
|
+
isConfirmed: true,
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
name: 'v',
|
|
992
|
+
supportedInCloudPage: true,
|
|
993
|
+
supportedInEmail: true,
|
|
994
|
+
mcnSince: 67,
|
|
995
|
+
handlebarsEquivalent: null,
|
|
996
|
+
mcnNotes: null,
|
|
997
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-v.html',
|
|
998
|
+
guideUrl: 'https://ampscript.guide/v/',
|
|
999
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/v/',
|
|
1000
|
+
minArgs: 1,
|
|
1001
|
+
maxArgs: 1,
|
|
1002
|
+
category: 'Utility',
|
|
1003
|
+
description:
|
|
1004
|
+
'Outputs a value inline, normally a variable reference. A string or number literal and a nested function call are accepted as well, each rendering its own value.',
|
|
1005
|
+
params: [
|
|
1006
|
+
{
|
|
1007
|
+
name: 'variableName',
|
|
1008
|
+
description: 'Variable reference, literal or nested function call to output',
|
|
1009
|
+
type: 'string|number',
|
|
1010
|
+
},
|
|
1011
|
+
],
|
|
1012
|
+
returnType: 'string',
|
|
1013
|
+
returnDescription: 'The referenced value rendered as a string.',
|
|
1014
|
+
syntax: 'v(variableName)',
|
|
1015
|
+
example: '%%=v(@myVar)=%%',
|
|
1016
|
+
isConfirmed: true,
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
name: 'WAT',
|
|
1020
|
+
supportedInCloudPage: false,
|
|
1021
|
+
supportedInEmail: false,
|
|
1022
|
+
mcnSince: null,
|
|
1023
|
+
handlebarsEquivalent: null,
|
|
1024
|
+
mcnNotes: null,
|
|
1025
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-content/mc-ampscript-reference-content-wat.html',
|
|
1026
|
+
guideUrl: 'https://ampscript.guide/wat/',
|
|
1027
|
+
minArgs: 2,
|
|
1028
|
+
maxArgs: INF,
|
|
1029
|
+
category: 'Utility',
|
|
1030
|
+
description:
|
|
1031
|
+
'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.',
|
|
1032
|
+
params: [
|
|
1033
|
+
{
|
|
1034
|
+
name: 'parameterSetKey',
|
|
1035
|
+
description: 'The external key of the WAT parameter set',
|
|
1036
|
+
type: 'string',
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
name: 'parameterValue1',
|
|
1040
|
+
description: 'Value used to replace the WATP(1) tracking parameter reference',
|
|
1041
|
+
type: 'string',
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
name: 'parameterValueN',
|
|
1045
|
+
description: 'Additional value used to replace the WATP(N) reference',
|
|
1046
|
+
type: 'string',
|
|
1047
|
+
optional: true,
|
|
1048
|
+
},
|
|
1049
|
+
],
|
|
1050
|
+
returnType: 'string',
|
|
1051
|
+
returnDescription:
|
|
1052
|
+
'The resolved Web Analytics tracking parameter value with the supplied substitutions applied.',
|
|
1053
|
+
repeat: [{ startIndex: 1, groupSize: 1, minGroups: 1 }],
|
|
1054
|
+
syntax: 'WAT(parameterSetKey, parameterValue1[, parameterValueN, ...])',
|
|
1055
|
+
example: "%%=WAT('Omniture', '1234', '5678')=%%",
|
|
1056
|
+
isConfirmed: false,
|
|
1057
|
+
verificationBlocked: true,
|
|
1058
|
+
verificationBlockedReason: 'no-test-data',
|
|
1059
|
+
officialDocsNote:
|
|
1060
|
+
'On a CloudPage every invocation aborted at HTTP 422 on both the child BU and the parent BU. An email-context render on the parent BU changed the picture: the Email Preview API RECOGNISES and evaluates the function and fails with a precise message that the named tracking parameter set does not exist (Tracking Parameter Name: Omniture). So WAT is not a broken function — it resolves a Web Analytics Tracking parameter set that must first be configured on the account (a Salesforce-support / Sender Profile setup), and none exists on these BUs to resolve. The block is a missing-test-data gate, not a broken invocation.',
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
name: 'WATP',
|
|
1064
|
+
supportedInCloudPage: false,
|
|
1065
|
+
supportedInEmail: false,
|
|
1066
|
+
mcnSince: null,
|
|
1067
|
+
handlebarsEquivalent: null,
|
|
1068
|
+
mcnNotes: null,
|
|
1069
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-content/mc-ampscript-reference-content-wat.html',
|
|
1070
|
+
guideUrl: 'https://ampscript.guide/watp/',
|
|
1071
|
+
minArgs: 1,
|
|
1072
|
+
maxArgs: 1,
|
|
1073
|
+
category: 'Utility',
|
|
1074
|
+
description:
|
|
1075
|
+
'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.',
|
|
1076
|
+
params: [
|
|
1077
|
+
{
|
|
1078
|
+
name: 'ordinal',
|
|
1079
|
+
description: 'The position of the parameter value within the WAT string (1-based)',
|
|
1080
|
+
type: 'number',
|
|
1081
|
+
},
|
|
1082
|
+
],
|
|
1083
|
+
returnType: 'string',
|
|
1084
|
+
returnDescription:
|
|
1085
|
+
'The parameter value supplied to the WAT function at the given ordinal position.',
|
|
1086
|
+
syntax: 'WATP(ordinal)',
|
|
1087
|
+
example: '%%=urlencode(WATP(1))=%%',
|
|
1088
|
+
isConfirmed: false,
|
|
1089
|
+
verificationBlocked: true,
|
|
1090
|
+
verificationBlockedReason: 'no-working-invocation',
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
name: 'WrapLongURL',
|
|
1094
|
+
supportedInCloudPage: true,
|
|
1095
|
+
supportedInEmail: true,
|
|
1096
|
+
mcnSince: null,
|
|
1097
|
+
handlebarsEquivalent: null,
|
|
1098
|
+
mcnNotes: null,
|
|
1099
|
+
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-http/mc-ampscript-reference-http-wrap-long-url.html',
|
|
1100
|
+
guideUrl: 'https://ampscript.guide/wraplongurl/',
|
|
1101
|
+
minArgs: 1,
|
|
1102
|
+
maxArgs: 1,
|
|
1103
|
+
category: 'Utility',
|
|
1104
|
+
description:
|
|
1105
|
+
'Shortens a long URL for email clients that truncate long hyperlinks. Outside an email send the argument comes back unchanged, so a CloudPage never sees a shortened link.',
|
|
1106
|
+
isConfirmed: true,
|
|
1107
|
+
differsFromOfficialDocs: true,
|
|
1108
|
+
officialDocsNote:
|
|
1109
|
+
'The official reference states that a URL longer than 975 characters comes back as a shortened link that redirects through the platform. On a live Engagement CloudPage on the child business unit a 1048-character URL was returned byte for byte unchanged at the same length, twice in one render, and the same held for a 27-character URL, an empty string and a string that is not a URL at all. The community guide notes that shortening only happens on a send, which the official page does not mention.',
|
|
1110
|
+
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/wraplongurl/',
|
|
1111
|
+
params: [{ name: 'url', description: 'URL to shorten', type: 'string|number' }],
|
|
1112
|
+
returnType: 'string',
|
|
1113
|
+
returnDescription:
|
|
1114
|
+
'The shortened URL when the call happens during a send; in any other context the supplied value unchanged.',
|
|
1115
|
+
syntax: 'WrapLongURL(url)',
|
|
1116
|
+
example: "%%=WrapLongURL('https://example.com/a/very/long/path')=%%",
|
|
1117
|
+
},
|
|
1118
|
+
];
|