ampscript-data 4.0.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.
package/README.md CHANGED
@@ -32,6 +32,7 @@ import {
32
32
  isMcnSupported,
33
33
  getMcnApiVersion,
34
34
  getMcnNotes,
35
+ BOOLEAN_LIKE_LITERAL_VALUES,
35
36
  VERIFICATION_BLOCKED_REASONS,
36
37
  } from 'ampscript-data';
37
38
  ```
@@ -90,6 +91,18 @@ if (entry.validArities) {
90
91
 
91
92
  The array is always strictly ascending integers and includes both `minArgs` (first element) and `maxArgs` (last element). When absent, the arity range is purely contiguous — which is currently the case for every AMPscript function.
92
93
 
94
+ #### Boolean-like flag values
95
+
96
+ Boolean-like function parameters use a shared frozen enum covering the eight accepted AMPscript literal forms:
97
+
98
+ ```js
99
+ import { BOOLEAN_LIKE_LITERAL_VALUES } from 'ampscript-data';
100
+
101
+ // [true, false, 1, 0, 'true', 'false', '1', '0']
102
+ ```
103
+
104
+ These parameters use the `string|boolean|number` type and reference this array through their `enum` field.
105
+
93
106
  #### Optional: verification state
94
107
 
95
108
  | Field | Type | Description |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ampscript-data",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
4
4
  "description": "Canonical AMPscript function catalog, keywords, and personalization strings for SFMC tooling",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/constants.js CHANGED
@@ -6,21 +6,37 @@
6
6
  */
7
7
  export const INF = Infinity;
8
8
 
9
+ /**
10
+ * Boolean-like literal values accepted by AMPscript flag parameters.
11
+ *
12
+ * @type {readonly (boolean|number|string)[]}
13
+ */
14
+ export const BOOLEAN_LIKE_LITERAL_VALUES = Object.freeze([
15
+ true,
16
+ false,
17
+ 1,
18
+ 0,
19
+ 'true',
20
+ 'false',
21
+ '1',
22
+ '0',
23
+ ]);
24
+
9
25
  // ── Verification-blocked reasons ─────────────────────────────────────────────
10
26
  // Fixed enum of concrete technical/environmental reasons why a runtime verification
11
27
  // was ATTEMPTED but could not complete. Set on an entry as `verificationBlockedReason`
12
28
  // together with `verificationBlocked: true` and `isConfirmed: false`. The specific
13
29
  // evidence (error text, invocation shapes tried) belongs in `officialDocsNote`, not here.
14
30
  //
15
- // - no-working-invocation probing found no invocation shape that works; document
31
+ // - no-working-invocation no invocation shape that works was found; document
16
32
  // exactly what was tried in officialDocsNote.
17
33
  // - needs-auth-context requires an authenticated / session / subscriber state that
18
- // the probe context (e.g. a plain CloudPage) cannot supply
34
+ // a plain CloudPage cannot supply
19
35
  // - no-test-data requires pre-existing data or an integration that is not
20
36
  // provisioned on the BU
21
37
  // - classic-only-no-assets only works with classic (legacy) assets and none exist
22
38
  // on the BU to test against
23
- // - destructive-unsafe cannot be exercised without unacceptable side effects
39
+ // - destructive-unsafe cannot be observed without unacceptable side effects
24
40
  /**
25
41
  @type {readonly string[]}
26
42
  */
@@ -1,7 +1,7 @@
1
1
  // AUTO-SPLIT from the original single-file src/index.js. Data moved verbatim.
2
2
  // AMPscript FUNCTIONS — category: Content (21 entries).
3
3
 
4
- import { INF } from '../constants.js';
4
+ import { BOOLEAN_LIKE_LITERAL_VALUES, INF } from '../constants.js';
5
5
 
6
6
  export const CONTENT_FUNCTIONS = [
7
7
  {
@@ -42,7 +42,8 @@ export const CONTENT_FUNCTIONS = [
42
42
  name: 'viewOnWeb',
43
43
  description:
44
44
  '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`.',
45
- type: 'boolean',
45
+ type: 'string|boolean|number',
46
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
46
47
  optional: true,
47
48
  },
48
49
  {
@@ -70,7 +71,8 @@ export const CONTENT_FUNCTIONS = [
70
71
  name: 'contentDispositionAttachment',
71
72
  description:
72
73
  '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`.',
73
- type: 'boolean',
74
+ type: 'string|boolean|number',
75
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
74
76
  optional: true,
75
77
  },
76
78
  ],
@@ -82,7 +84,7 @@ export const CONTENT_FUNCTIONS = [
82
84
  verificationBlocked: true,
83
85
  verificationBlockedReason: 'no-working-invocation',
84
86
  officialDocsNote:
85
- 'AttachFile targets the outgoing email at send time; it has no working invocation on a CloudPage. Every reached call — contentbuilder key, http URL, and the two-argument minimum form — aborted the page with HTTP 422 and no partial output, on the child BU and again on the parent BU. The abort only happens when the call is actually reached: gating it behind an unmatched query-string branch leaves the page at HTTP 200, so the failure is a runtime abort of the reached call rather than a compile-time rejection. An email-context render on the child BU sharpened the cause: the Email Preview API recognises and evaluates the function and fails with a precise message that the EMAIL_ATTACHMENTS business rule must be turned on before AttachFile can be used, so the block is an account-level provisioning gate rather than a broken function.',
87
+ 'AttachFile targets the outgoing email at send time; it has no working invocation on a CloudPage. Every call that is reached — contentbuilder key, http URL, and the two-argument minimum form — aborts the page with HTTP 422 and no partial output. The abort happens only when the call is actually reached: inside a non-matching branch the page renders at HTTP 200, so the failure is a runtime abort of the reached call rather than a compile-time rejection. In an email context the function is recognised and evaluated, and the render fails with a precise message that the EMAIL_ATTACHMENTS business rule must be turned on before AttachFile can be used, so the block is account-level provisioning rather than a broken function. Because that rule is disabled, the viewOnWeb and contentDispositionAttachment boolean-like enums cannot be exercised and are marked assumed (acceptance-only) — the account-level requirement blocks any behavioural check of these two flags.',
86
88
  },
87
89
  {
88
90
  name: 'BarcodeURL',
@@ -143,7 +145,8 @@ export const CONTENT_FUNCTIONS = [
143
145
  name: 'showText',
144
146
  description:
145
147
  "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`.",
146
- type: 'boolean',
148
+ type: 'string|boolean|number',
149
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
147
150
  optional: true,
148
151
  },
149
152
  {
@@ -163,7 +166,8 @@ export const CONTENT_FUNCTIONS = [
163
166
  name: 'transparentBG',
164
167
  description:
165
168
  'If `true` or `1`, the barcode includes a transparent background. Otherwise, the background is white. The default value is `false`.',
166
- type: 'boolean',
169
+ type: 'string|boolean|number',
170
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
167
171
  optional: true,
168
172
  },
169
173
  ],
@@ -293,7 +297,8 @@ export const CONTENT_FUNCTIONS = [
293
297
  mcnNotes: null,
294
298
  description:
295
299
  'Pass 1 or true to get an empty rowset when the payload or path cannot be parsed; 0 or false makes the same input abort the page',
296
- type: 'boolean|number',
300
+ type: 'string|boolean|number',
301
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
297
302
  },
298
303
  ],
299
304
  returnType: 'rowset',
@@ -304,7 +309,7 @@ export const CONTENT_FUNCTIONS = [
304
309
  isConfirmed: true,
305
310
  differsFromOfficialDocs: true,
306
311
  officialDocsNote:
307
- 'The official syntax section states that a false third argument yields an empty rowset and a true one raises an exception; runtime on the child BU (CloudPage GET) does the opposite. Malformed JSON with 1 rendered a rowset of zero rows, while the identical payload with 0 aborted the page with HTTP 422. The same page also proved that an unparsable payload, an unset variable, an empty string, [] and a path matching nothing all yield zero rows when 1 is passed. Note the official Errors section already describes the runtime ordering, so the page contradicts itself.',
312
+ 'The official syntax section states that a false third argument yields an empty rowset and a true one raises an exception; on a CloudPage, runtime does the opposite. Malformed JSON with 1 yields a rowset of zero rows, while the identical payload with 0 aborts the page with HTTP 422. An unparsable payload, an unset variable, an empty string, [] and a path matching nothing likewise yield zero rows when 1 is passed. Note the official Errors section already describes this runtime ordering, so the reference contradicts itself.',
308
313
  },
309
314
  {
310
315
  name: 'BuildRowSetFromString',
@@ -368,7 +373,8 @@ export const CONTENT_FUNCTIONS = [
368
373
  mcnNotes: null,
369
374
  description:
370
375
  'Pass 1 or true to get an empty rowset when the payload or path cannot be parsed; 0 or false makes the same input abort the page',
371
- type: 'boolean|number',
376
+ type: 'string|boolean|number',
377
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
372
378
  },
373
379
  ],
374
380
  returnType: 'rowset',
@@ -379,7 +385,7 @@ export const CONTENT_FUNCTIONS = [
379
385
  isConfirmed: true,
380
386
  differsFromOfficialDocs: true,
381
387
  officialDocsNote:
382
- 'The official syntax section states that a false third argument yields an empty rowset and a true one raises an exception; runtime on the child BU (CloudPage GET) behaves the other way round. Unclosed XML parsed with 1 rendered a rowset of zero rows, whereas the identical payload with 0 aborted the page with HTTP 422. An empty string, an unset variable, an empty root element and an XPath matching nothing likewise gave zero rows under 1.',
388
+ 'The official syntax section states that a false third argument yields an empty rowset and a true one raises an exception; on a CloudPage, runtime behaves the other way round. Unclosed XML parsed with 1 yields a rowset of zero rows, whereas the identical payload with 0 aborts the page with HTTP 422. An empty string, an unset variable, an empty root element and an XPath matching nothing likewise yield zero rows under 1.',
383
389
  },
384
390
  {
385
391
  name: 'ContentArea',
@@ -417,7 +423,8 @@ export const CONTENT_FUNCTIONS = [
417
423
  mcnNotes: null,
418
424
  description:
419
425
  "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.",
420
- type: 'boolean',
426
+ type: 'string|boolean|number',
427
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
421
428
  optional: true,
422
429
  default: true,
423
430
  },
@@ -485,7 +492,8 @@ export const CONTENT_FUNCTIONS = [
485
492
  mcnNotes: null,
486
493
  description:
487
494
  "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.",
488
- type: 'boolean',
495
+ type: 'string|boolean|number',
496
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
489
497
  optional: true,
490
498
  default: true,
491
499
  },
@@ -554,7 +562,8 @@ export const CONTENT_FUNCTIONS = [
554
562
  mcnNotes: null,
555
563
  description:
556
564
  "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",
557
- type: 'boolean',
565
+ type: 'string|boolean|number',
566
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
558
567
  optional: true,
559
568
  default: true,
560
569
  },
@@ -620,7 +629,8 @@ export const CONTENT_FUNCTIONS = [
620
629
  mcnNotes: null,
621
630
  description:
622
631
  "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",
623
- type: 'boolean',
632
+ type: 'string|boolean|number',
633
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
624
634
  optional: true,
625
635
  default: true,
626
636
  },
@@ -686,7 +696,8 @@ export const CONTENT_FUNCTIONS = [
686
696
  mcnNotes: null,
687
697
  description:
688
698
  "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",
689
- type: 'boolean',
699
+ type: 'string|boolean|number',
700
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
690
701
  optional: true,
691
702
  default: true,
692
703
  },
@@ -852,7 +863,7 @@ export const CONTENT_FUNCTIONS = [
852
863
  isConfirmed: true,
853
864
  nonFunctionalAtRuntime: true,
854
865
  officialDocsNote:
855
- 'Classic Portfolio is retired on this tenant, so no Portfolio item exists to retrieve. A reached call with an external key that does not resolve aborted the page with HTTP 422 and no partial output, on both the child BU and the parent BU; the same call gated behind an unmatched query-string branch left the page at HTTP 200, confirming a runtime abort of the reached call. No valid key could be sourced because Portfolio asset creation and applications were retired, so the documented success path could not be exercised here.',
866
+ 'Classic Portfolio is retired, so no Portfolio item is available to retrieve. A reached call with an external key that does not resolve aborts the page with HTTP 422 and no partial output; gating the same call behind an unmatched query-string branch leaves the page at HTTP 200, confirming a runtime abort of the reached call. No valid key can be sourced because Portfolio asset creation and applications are retired, so the documented success path cannot be exercised.',
856
867
  },
857
868
  {
858
869
  name: 'Image',
@@ -893,9 +904,9 @@ export const CONTENT_FUNCTIONS = [
893
904
  nonFunctionalAtRuntime: true,
894
905
  deprecated: true,
895
906
  deprecatedReason:
896
- 'The classic Portfolio / Classic Content area this function reads from was retired in April 2023, so no image assets exist for it to reference on any current tenant, and every invocation aborts the page at runtime. Use ContentImageByKey or ContentImageByID against Content Builder image assets instead.',
907
+ 'The classic Portfolio / Classic Content area this function reads from was retired in April 2023, so no image assets exist for it to reference on any current account, and every invocation aborts the page at runtime. Use ContentImageByKey or ContentImageByID against Content Builder image assets instead.',
897
908
  officialDocsNote:
898
- 'No working invocation was found on either the child BU or the parent BU. Image resolves images from the legacy Portfolio, whose creation and applications have been retired; no Portfolio assets exist on either BU to reference. Every attempt aborted the CloudPage with HTTP 422 and no output: a literal URL, a Content Builder asset external key, and a plausible Portfolio-style key were all tried on the child BU, and a Portfolio-style key on the parent BU. Use ContentImageByKey or ContentImageByID against Content Builder image assets instead.',
909
+ 'No working invocation exists. Image resolves images from the legacy Portfolio, whose creation and applications have been retired; no Portfolio assets exist to reference. Every invocation aborts the CloudPage with HTTP 422 and no output: a literal URL, a Content Builder asset external key, and a plausible Portfolio-style key all fail. Use ContentImageByKey or ContentImageByID against Content Builder image assets instead.',
899
910
  },
900
911
  {
901
912
  name: 'LiveContentMicrositeURL',
@@ -916,7 +927,7 @@ export const CONTENT_FUNCTIONS = [
916
927
  deprecatedReason:
917
928
  'Live Offers (Live Content) was removed from Marketing Cloud in 2019 and the Classic Microsites this URL points at were retired in June 2022, so there is no provisionable modern equivalent and every invocation aborts the page at runtime.',
918
929
  officialDocsNote:
919
- "Attempted on both the child BU and the parent BU. Every invocation shape aborted the CloudPage with HTTP 200 lost to a 422 page abort: the documented-valid LiveContentMicrositeURL('coupon','MyCoupon'), an unknown content type, and an empty external key all failed identically. The function resolves a Live Offers (Live Content) coupon by external key, and no such Live Content asset is provisioned on either BU, so no working invocation could be produced. Left blocked pending a tenant with a real Live Offers coupon.",
930
+ "Every invocation shape aborts the CloudPage (HTTP 200 lost to a 422 page abort): the documented-valid LiveContentMicrositeURL('coupon','MyCoupon'), an unknown content type, and an empty external key all fail identically. The function resolves a Live Offers (Live Content) coupon by external key, and no such Live Content asset is provisioned, so no working invocation exists. It requires a real Live Offers coupon.",
920
931
  params: [
921
932
  {
922
933
  name: 'contentType',
@@ -1,7 +1,7 @@
1
1
  // AUTO-SPLIT from the original single-file src/index.js. Data moved verbatim.
2
2
  // AMPscript FUNCTIONS — category: Data Extension (21 entries).
3
3
 
4
- import { INF } from '../constants.js';
4
+ import { BOOLEAN_LIKE_LITERAL_VALUES, INF } from '../constants.js';
5
5
 
6
6
  export const DATA_EXTENSION_FUNCTIONS = [
7
7
  {
@@ -73,7 +73,7 @@ export const DATA_EXTENSION_FUNCTIONS = [
73
73
  isConfirmed: true,
74
74
  differsFromOfficialDocs: true,
75
75
  officialDocsNote:
76
- 'Runtime-proven on a Marketing Cloud Engagement CloudPage (child BU) against a data extension built to the documented claimable schema (Text primary key, Text claimant column, required non-nullable Boolean claim column defaulting to False, nullable Date column). Each call passing a NEW claimant value claims the next unclaimed row and advances: four distinct claimants received C1, C2, C3, C4 in order, each row flipping to claimed with its claimant recorded and ClaimedDate auto-populated. Re-calling with a claimant value that already holds a row returns that same row rather than advancing (per-subscriber idempotency). The official reference states that ClaimRow returns an exception when no unclaimed rows remain; at runtime it instead returned an empty row that does not abort the page (Empty() on it is true), so a caller must guard with Empty() rather than expecting a raised error. Each claim was driven by a separate HTTP request carrying the claimant value as a RequestParameter — the prior single-render probe that reused one claimant value never advanced because of the idempotency rule, not a provisioning gap.',
76
+ 'In a CloudPage context, against a data extension built to the documented claimable schema (Text primary key, Text claimant column, required non-nullable Boolean claim column defaulting to False, nullable Date column): each call passing a new claimant value claims the next unclaimed row and advances — four distinct claimants receive C1, C2, C3, C4 in order, each row flipping to claimed with its claimant recorded and ClaimedDate auto-populated. Re-calling with a claimant value that already holds a row returns that same row rather than advancing (per-subscriber idempotency). The official reference states that ClaimRow returns an exception when no unclaimed rows remain; at runtime it instead returns an empty row that does not abort the page (Empty() on it is true), so a caller must guard with Empty() rather than expecting a raised error. Reusing one claimant value never advances, because of the idempotency rule rather than a provisioning gap.',
77
77
  },
78
78
  {
79
79
  name: 'ClaimRowValue',
@@ -203,7 +203,7 @@ export const DATA_EXTENSION_FUNCTIONS = [
203
203
  isConfirmed: true,
204
204
  differsFromOfficialDocs: true,
205
205
  officialDocsNote:
206
- 'Email/send-context finding: DeleteData is not valid in sendable email content. Rendered through the Email Preview API against a seeded sendable row, an isolated DeleteData(...) was rejected with HTTP 400 errorcode 10005 ("DeleteData Function is not valid in content. This function is only allowed in a non batch context."). A send is a batch operation, so the DeleteData/*Data write family cannot run inside a sendable email; use the DeleteDE variant instead, which the send parser accepts in sendable content. This is a CloudPage / landing-page (non-batch) feature.',
206
+ 'Email/send-context finding: DeleteData is not valid in sendable email content. An isolated DeleteData(...) is rejected with HTTP 400 errorcode 10005 ("DeleteData Function is not valid in content. This function is only allowed in a non batch context."). A send is a batch operation, so the DeleteData/*Data write family cannot run inside a sendable email; use the DeleteDE variant instead, which the send parser accepts in sendable content. This is a CloudPage / landing-page (non-batch) feature.',
207
207
  minArgs: 3,
208
208
  maxArgs: INF,
209
209
  category: 'Data Extension',
@@ -302,7 +302,7 @@ export const DATA_EXTENSION_FUNCTIONS = [
302
302
  isConfirmed: true,
303
303
  differsFromOfficialDocs: true,
304
304
  officialDocsNote:
305
- 'Email/send-context finding: ExecuteFilter is not valid in sendable email content. Rendered through the Email Preview API against a seeded sendable row, an isolated ExecuteFilter(...) was rejected with HTTP 400 errorcode 10004 ("ExecuteFilter Function is not valid in content. This function is only allowed in non sendable content."). It is a CloudPage / landing-page (non-sendable content) feature.',
305
+ 'Email/send-context finding: ExecuteFilter is not valid in sendable email content. An isolated ExecuteFilter(...) is rejected with HTTP 400 errorcode 10004 ("ExecuteFilter Function is not valid in content. This function is only allowed in non sendable content."). It is a CloudPage / landing-page (non-sendable content) feature.',
306
306
  minArgs: 1,
307
307
  maxArgs: 1,
308
308
  category: 'Data Extension',
@@ -333,7 +333,7 @@ export const DATA_EXTENSION_FUNCTIONS = [
333
333
  isConfirmed: true,
334
334
  differsFromOfficialDocs: true,
335
335
  officialDocsNote:
336
- 'Email/send-context finding: ExecuteFilterOrderedRows is not valid in sendable email content. Rendered through the Email Preview API against a seeded sendable row, an isolated ExecuteFilterOrderedRows(...) was rejected with HTTP 400 errorcode 10004 ("ExecuteFilterOrderedRows Function is not valid in content. This function is only allowed in non sendable content."). It is a CloudPage / landing-page (non-sendable content) feature.',
336
+ 'Email/send-context finding: ExecuteFilterOrderedRows is not valid in sendable email content. An isolated ExecuteFilterOrderedRows(...) is rejected with HTTP 400 errorcode 10004 ("ExecuteFilterOrderedRows Function is not valid in content. This function is only allowed in non sendable content."). It is a CloudPage / landing-page (non-sendable content) feature.',
337
337
  minArgs: 3,
338
338
  maxArgs: 3,
339
339
  category: 'Data Extension',
@@ -391,7 +391,8 @@ export const DATA_EXTENSION_FUNCTIONS = [
391
391
  mcnNotes: null,
392
392
  description:
393
393
  "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.",
394
- type: 'boolean',
394
+ type: 'string|boolean|number',
395
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
395
396
  optional: true,
396
397
  default: true,
397
398
  },
@@ -414,7 +415,7 @@ export const DATA_EXTENSION_FUNCTIONS = [
414
415
  isConfirmed: true,
415
416
  differsFromOfficialDocs: true,
416
417
  officialDocsNote:
417
- 'Email/send-context finding: InsertData is not valid in sendable email content. Rendered through the Email Preview API against a seeded sendable row, an isolated InsertData(...) was rejected with HTTP 400 errorcode 10005 ("InsertData Function is not valid in content. This function is only allowed in a non batch context."). A send is a batch operation, so the InsertData/*Data write family cannot run inside a sendable email; use the InsertDE variant instead, which the send parser accepts in sendable content. This is a CloudPage / landing-page (non-batch) feature.',
418
+ 'Email/send-context finding: InsertData is not valid in sendable email content. An isolated InsertData(...) is rejected with HTTP 400 errorcode 10005 ("InsertData Function is not valid in content. This function is only allowed in a non batch context."). A send is a batch operation, so the InsertData/*Data write family cannot run inside a sendable email; use the InsertDE variant instead, which the send parser accepts in sendable content. This is a CloudPage / landing-page (non-batch) feature.',
418
419
  minArgs: 3,
419
420
  maxArgs: INF,
420
421
  category: 'Data Extension',
@@ -823,7 +824,7 @@ export const DATA_EXTENSION_FUNCTIONS = [
823
824
  isConfirmed: true,
824
825
  differsFromOfficialDocs: true,
825
826
  officialDocsNote:
826
- 'Email/send-context finding: UpdateData is not valid in sendable email content. Rendered through the Email Preview API against a seeded sendable row, an isolated UpdateData(...) was rejected with HTTP 400 errorcode 10005 ("UpdateData Function is not valid in content. This function is only allowed in a non batch context."). A send is a batch operation, so the UpdateData/*Data write family cannot run inside a sendable email; use the UpdateDE variant instead, which the send parser accepts in sendable content. This is a CloudPage / landing-page (non-batch) feature.',
827
+ 'Email/send-context finding: UpdateData is not valid in sendable email content. An isolated UpdateData(...) is rejected with HTTP 400 errorcode 10005 ("UpdateData Function is not valid in content. This function is only allowed in a non batch context."). A send is a batch operation, so the UpdateData/*Data write family cannot run inside a sendable email; use the UpdateDE variant instead, which the send parser accepts in sendable content. This is a CloudPage / landing-page (non-batch) feature.',
827
828
  minArgs: 6,
828
829
  maxArgs: INF,
829
830
  category: 'Data Extension',
@@ -965,7 +966,7 @@ export const DATA_EXTENSION_FUNCTIONS = [
965
966
  isConfirmed: true,
966
967
  differsFromOfficialDocs: true,
967
968
  officialDocsNote:
968
- 'Email/send-context finding: UpsertData is not valid in sendable email content. Rendered through the Email Preview API against a seeded sendable row, an isolated UpsertData(...) was rejected with HTTP 400 errorcode 10005 ("UpsertData Function is not valid in content. This function is only allowed in a non batch context."). A send is a batch operation, so the UpsertData/*Data write family cannot run inside a sendable email; use the UpsertDE variant instead, which the send parser accepts in sendable content. This is a CloudPage / landing-page (non-batch) feature.',
969
+ 'Email/send-context finding: UpsertData is not valid in sendable email content. An isolated UpsertData(...) is rejected with HTTP 400 errorcode 10005 ("UpsertData Function is not valid in content. This function is only allowed in a non batch context."). A send is a batch operation, so the UpsertData/*Data write family cannot run inside a sendable email; use the UpsertDE variant instead, which the send parser accepts in sendable content. This is a CloudPage / landing-page (non-batch) feature.',
969
970
  minArgs: 6,
970
971
  maxArgs: INF,
971
972
  category: 'Data Extension',
@@ -1,6 +1,8 @@
1
1
  // AUTO-SPLIT from the original single-file src/index.js. Data moved verbatim.
2
2
  // AMPscript FUNCTIONS — category: Date and Time (10 entries).
3
3
 
4
+ import { BOOLEAN_LIKE_LITERAL_VALUES } from '../constants.js';
5
+
4
6
  export const DATE_TIME_FUNCTIONS = [
5
7
  {
6
8
  name: 'DateAdd',
@@ -122,6 +124,7 @@ export const DATE_TIME_FUNCTIONS = [
122
124
  description:
123
125
  'If true, return the instant in UTC; otherwise in the account time zone. Accepts 1/0, true/false, or those spellings quoted, and is not validated',
124
126
  type: 'string|boolean|number',
127
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
125
128
  optional: true,
126
129
  default: false,
127
130
  },
@@ -201,7 +204,7 @@ export const DATE_TIME_FUNCTIONS = [
201
204
  isConfirmed: true,
202
205
  differsFromOfficialDocs: true,
203
206
  officialDocsNote:
204
- 'Proven on the child BU. The official reference presents one .NET-style custom-pattern table and shows it applied to the dateFormat argument, but at runtime the two format arguments use SEPARATE, case-INSENSITIVE token sets. In dateFormat, mm and MM both render the MONTH, so the documented pattern yyyy-MM-dd HH:mm:ss returned 2026-03-04 13:03:07 for the instant 2026-03-04 13:52:07 — the minutes position printed 03, the month. The same pattern moved to timeFormat returned 13:52:07 correctly, because there mm and MM mean minutes. Single-letter tokens also disagree with the doc: d rendered the whole short date 3/4/2026 rather than the day number, M rendered March 4 rather than 3, and h or H alone in timeFormat aborts the page with HTTP 422 instead of rendering an hour. The day-name tokens are off by one repetition — dddd rendered Wed where the doc promises Wednesday, ddddd rendered Wednesday, and ddd rendered the corrupted string We4ne74a26 in which digits from the date replaced letters of the day name.',
207
+ 'The official reference presents one .NET-style custom-pattern table and shows it applied to the dateFormat argument, but at runtime the two format arguments use SEPARATE, case-INSENSITIVE token sets. In dateFormat, mm and MM both render the MONTH, so the documented pattern yyyy-MM-dd HH:mm:ss returned 2026-03-04 13:03:07 for the instant 2026-03-04 13:52:07 — the minutes position printed 03, the month. The same pattern moved to timeFormat returned 13:52:07 correctly, because there mm and MM mean minutes. Single-letter tokens also disagree with the doc: d rendered the whole short date 3/4/2026 rather than the day number, M rendered March 4 rather than 3, and h or H alone in timeFormat aborts the page with HTTP 422 instead of rendering an hour. The day-name tokens are off by one repetition — dddd rendered Wed where the doc promises Wednesday, ddddd rendered Wednesday, and ddd rendered the corrupted string We4ne74a26 in which digits from the date replaced letters of the day name.',
205
208
  sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/formatdate/',
206
209
  description:
207
210
  'Formats a date according to a date pattern, a time pattern and a locale. The two pattern arguments use separate, case-insensitive token sets: in the date pattern mm means month, and minutes are only reachable from the time pattern.',
@@ -264,6 +267,7 @@ export const DATE_TIME_FUNCTIONS = [
264
267
  description:
265
268
  'If true, return the job start or publish time instead of the individual subscriber send-completed time; outside a send context it makes no difference. Accepts 1/0, true/false, or those spellings quoted, and is not validated',
266
269
  type: 'string|boolean|number',
270
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
267
271
  optional: true,
268
272
  },
269
273
  ],
@@ -275,7 +279,7 @@ export const DATE_TIME_FUNCTIONS = [
275
279
  isConfirmed: true,
276
280
  differsFromOfficialDocs: false,
277
281
  officialDocsNote:
278
- 'Runtime-verified. The function has a working invocation (arity 0 and 1) that renders a real date value in every argument spelling, and its observed behaviour is consistent with the official reference. Probed on the child BU: GetSendTime() rendered 8/8/2026 7:35:16 PM against Now()=8/8/2026 7:35:16 PM in the same render, with FormatDate(..., "ffffff") giving 507042 for both, so the two are the same instant to the microsecond rather than merely the same second. Every argument spelling (1, 0, true, false, "1", "0", "true", "false", and the non-flag word spring) was accepted at HTTP 200 and returned that same current time, and DateDiff(GetSendTime(1), Now(), "MI") was 0. The value is a real date (FormatDate gave 2026-08-08, DatePart gave 2026 and 7, DateAdd of three hours advanced it, DateDiff measured that gap as 3), it renders as a US short date plus a 12-hour clock (Length 19 for that instant), Empty() over it is False, and it sits on the system side of the clock (DateDiff to SystemDateToLocalDate was 480 minutes, identical to the same measurement over Now()); arity 2 aborts with HTTP 422. This matches the official reference\'s "during a send" row, which states both call forms return the current system time. The after-send value was also captured from a REAL send job via send-context UpsertDE writeback into a results DE: a User-Initiated Send (messaging-experimental/v1/email/send) rendered GetSendTime() as 8/15/2026 10:31:40 AM, identical to Now() in the same send, confirming the send-execution system time. A test send does not fire the writeback (upsert operations run only at send-completion), and the send must target at least one deliverable subscriber or it completes without running the body. The function is fully working and correctly catalogued as verified; it is not a Sender-Authenticated-Redirection / session-state function, so no authenticated-context caveat applies.',
282
+ 'GetSendTime() has a working invocation (arity 0 and 1) that renders a real date value in every argument spelling, and its behaviour matches the official reference. Outside a send context, it returns the current system time: on a CloudPage it renders the same instant as Now() — both resolve to the same microsecond (FormatDate(..., "ffffff") is 507042 for each) rather than merely the same second. Every argument spelling (1, 0, true, false, "1", "0", "true", "false", and the non-flag word spring) returns that same current time, and DateDiff(GetSendTime(1), Now(), "MI") is 0. The value is a real date (FormatDate gives 2026-08-08, DatePart gives 2026 and 7, DateAdd of three hours advances it, DateDiff measures that gap as 3), it renders as a US short date plus a 12-hour clock (Length 19 for that instant), Empty() over it is False, and it is the system-side instant (DateDiff to SystemDateToLocalDate is 480 minutes, the same as over Now()); arity 2 aborts with HTTP 422. This matches the official reference\'s "during a send" row, which states both call forms return the current system time. Inside a send job it is the send-execution system time: a send-context UpsertDE writeback into a results DE records the same instant as Now() in that send (upsert operations run only at send-completion, so a send must target at least one deliverable subscriber for the body to run). The function is fully working; it is not a Sender-Authenticated-Redirection / session-state function, so no authenticated-context caveat applies.',
279
283
  },
280
284
  {
281
285
  name: 'LocalDateToSystemDate',
@@ -335,6 +339,7 @@ export const DATE_TIME_FUNCTIONS = [
335
339
  description:
336
340
  'In a send context, a true value returns the send job start or publish time instead of the current time; on a CloudPage it makes no difference. Accepts 1/0, true/false, or those spellings quoted',
337
341
  type: 'string|boolean|number',
342
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
338
343
  optional: true,
339
344
  },
340
345
  ],
@@ -359,7 +364,7 @@ export const DATE_TIME_FUNCTIONS = [
359
364
  maxArgs: 1,
360
365
  category: 'Date and Time',
361
366
  description:
362
- 'Converts a date string to a date value. Behaves identically to DateParse for every input format tested, but takes no second argument, so DateParse is the only one of the two that can return the instant in UTC. A string the parser cannot read aborts the page instead of returning a sentinel, and an ambiguous day-first string such as 5/8/2026 is silently read month-first rather than rejected.',
367
+ 'Converts a date string to a date value. Behaves identically to DateParse for every input format, but takes no second argument, so DateParse is the only one of the two that can return the instant in UTC. A string the parser cannot read aborts the page instead of returning a sentinel, and an ambiguous day-first string such as 5/8/2026 is silently read month-first rather than rejected.',
363
368
  params: [
364
369
  {
365
370
  name: 'dateString',
@@ -27,6 +27,6 @@ export const EINSTEIN_EMAIL_RECS_FUNCTIONS = [
27
27
  verificationBlocked: true,
28
28
  verificationBlockedReason: 'no-test-data',
29
29
  officialDocsNote:
30
- 'No working CloudPage invocation was found. Any valid-arity call aborts the whole page with HTTP 422 at compile time, even when placed inside an unreached IF gate, so it cannot be probed behind a query-string switch. Two signature shapes were each deployed as the whole page: the catalog form RatingStars(4, 5, "https://example.com/star.png") and the ampscript.guide form RatingStars(5, "yellow", 25). Both returned HTTP 422 on the child BU and again on the parent BU. The surrounding harness structure (RequestParameter gating, IF/ELSE/ENDIF) returned HTTP 200 once the RatingStars call was removed, confirming the abort is caused by the function itself, not the harness. RatingStars is an Einstein Email Recommendations helper that appears to resolve only inside the recommendations rendering context, which a bare CloudPage does not supply.',
30
+ 'No working CloudPage invocation exists. Any valid-arity call aborts the whole page with HTTP 422 at compile time, even when placed inside an unreached IF branch, so it cannot be hidden behind a query-string switch. Two signature shapes both abort: the catalog form RatingStars(4, 5, "https://example.com/star.png") and the ampscript.guide form RatingStars(5, "yellow", 25). An otherwise identical page returns HTTP 200 once the RatingStars call is removed, confirming the abort is caused by the function itself rather than the surrounding page. RatingStars is an Einstein Email Recommendations helper that appears to resolve only inside the recommendations rendering context, which a bare CloudPage does not supply.',
31
31
  },
32
32
  ];
@@ -1,6 +1,8 @@
1
1
  // AUTO-SPLIT from the original single-file src/index.js. Data moved verbatim.
2
2
  // AMPscript FUNCTIONS — category: Encryption and Encoding (12 entries).
3
3
 
4
+ import { BOOLEAN_LIKE_LITERAL_VALUES } from '../constants.js';
5
+
4
6
  export const ENCRYPTION_ENCODING_FUNCTIONS = [
5
7
  {
6
8
  name: 'Base64Decode',
@@ -37,8 +39,9 @@ export const ENCRYPTION_ENCODING_FUNCTIONS = [
37
39
  mcnSince: null,
38
40
  mcnNotes: null,
39
41
  description:
40
- 'Flag reserved for send-time failure handling; 0, 1, true and false are all accepted and none of them changes the value a successful decode returns',
41
- type: 'number|boolean',
42
+ 'If truthy, a payload that cannot be decoded aborts the page; if falsy, the same malformed input returns an empty string at HTTP 200. Only a failed decode is affected. Accepts 1/0, true/false, or those spellings quoted',
43
+ type: 'string|boolean|number',
44
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
42
45
  optional: true,
43
46
  },
44
47
  ],
@@ -526,6 +529,7 @@ export const ENCRYPTION_ENCODING_FUNCTIONS = [
526
529
  description:
527
530
  'When switched on, every reserved character of the query string is percent-encoded and spaces become plus signs; when off, only spaces are encoded, as %20. Accepts 1/0, true/false, or those spellings quoted. Defaults to off',
528
531
  type: 'string|boolean|number',
532
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
529
533
  optional: true,
530
534
  default: false,
531
535
  },
@@ -534,6 +538,7 @@ export const ENCRYPTION_ENCODING_FUNCTIONS = [
534
538
  description:
535
539
  'When switched on, the whole input is encoded even if it is not a URL; when off, only the part after a question mark is encoded. Accepts 1/0, true/false, or those spellings quoted. Defaults to off',
536
540
  type: 'string|boolean|number',
541
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
537
542
  optional: true,
538
543
  },
539
544
  ],
@@ -1,7 +1,7 @@
1
1
  // AUTO-SPLIT from the original single-file src/index.js. Data moved verbatim.
2
2
  // AMPscript FUNCTIONS — category: HTTP (5 entries).
3
3
 
4
- import { INF } from '../constants.js';
4
+ import { BOOLEAN_LIKE_LITERAL_VALUES, INF } from '../constants.js';
5
5
 
6
6
  export const HTTP_FUNCTIONS = [
7
7
  {
@@ -30,7 +30,8 @@ export const HTTP_FUNCTIONS = [
30
30
  mcnSince: null,
31
31
  mcnNotes: null,
32
32
  description: 'If true, ignore errors encountered during the GET operation',
33
- type: 'boolean',
33
+ type: 'string|boolean|number',
34
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
34
35
  optional: true,
35
36
  },
36
37
  {
@@ -73,7 +74,7 @@ export const HTTP_FUNCTIONS = [
73
74
  isConfirmed: true,
74
75
  differsFromOfficialDocs: true,
75
76
  officialDocsNote:
76
- 'The official reference labels the fourth argument as an output parameter holding the "status" of the request, but on a live Engagement CloudPage (child BU) that variable receives the response BODY, not the status. The HTTP status code is the function return value. A non-2xx response (proven with a 404) and an empty URL both abort the whole page rather than returning the status, so a failing status can never be read from the return value.',
77
+ 'The official reference labels the fourth argument as an output parameter holding the "status" of the request, but on an Engagement CloudPage that variable receives the response BODY, not the status. The HTTP status code is the function return value. A non-2xx response (for example a 404) and an empty URL both abort the whole page rather than returning the status, so a failing status can never be read from the return value.',
77
78
  description:
78
79
  'Performs an HTTP POST request and returns the HTTP status code. The response body is written to the optional output variable.',
79
80
  params: [
@@ -148,7 +149,7 @@ export const HTTP_FUNCTIONS = [
148
149
  isConfirmed: true,
149
150
  differsFromOfficialDocs: true,
150
151
  officialDocsNote:
151
- 'The official reference labels the fifth argument (response) as storing the "status" of the request, but on a live Engagement CloudPage (child BU) it receives the response BODY and the sixth argument (responseRowSet) receives the response HEADERS as a rowset (11 header rows observed). The HTTP status code is the function return value. The boolean exceptionOnError flag is accepted at position four.',
152
+ 'The official reference labels the fifth argument (response) as storing the "status" of the request, but on an Engagement CloudPage it receives the response BODY and the sixth argument (responseRowSet) receives the response HEADERS as a rowset (11 header rows). The HTTP status code is the function return value. The boolean exceptionOnError flag is accepted at position four.',
152
153
  description:
153
154
  'Performs an HTTP POST and returns the HTTP status code. The response body and the response headers (as a rowset) are written to optional output variables.',
154
155
  params: [
@@ -159,7 +160,8 @@ export const HTTP_FUNCTIONS = [
159
160
  name: 'exceptionOnError',
160
161
  description:
161
162
  'If `true`, raise an exception when the request fails; if `false`, continue after an error',
162
- type: 'boolean',
163
+ type: 'string|boolean|number',
164
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
163
165
  optional: true,
164
166
  },
165
167
  {
@@ -224,7 +226,7 @@ export const HTTP_FUNCTIONS = [
224
226
  isConfirmed: true,
225
227
  differsFromOfficialDocs: true,
226
228
  officialDocsNote:
227
- 'The official reference labels the responseStatus argument as storing the "status" of the request, but on a live Engagement CloudPage (child BU) it receives the response BODY and responseContentRowset receives the response HEADERS as a rowset (11 header rows observed). The HTTP status code is the function return value. The numRetries, reschedule and returnExceptionOnError arguments are all accepted at runtime; retry-on-failure is documented but was not forced here because a transient failure could not be induced safely against the echo endpoint.',
229
+ 'The official reference labels the responseStatus argument as storing the "status" of the request, but on an Engagement CloudPage it receives the response BODY and responseContentRowset receives the response HEADERS as a rowset (11 header rows). The HTTP status code is the function return value. The numRetries, reschedule and returnExceptionOnError arguments are all accepted at runtime; retry-on-failure is documented but not observable in practice, because a transient failure cannot be induced safely. The reschedule boolean-like enum is acceptance-only: all eight literal spellings are accepted without rejection, but the documented effect is an out-of-band retry after 15 minutes, so no on/off behavioural difference occurs within a render.',
228
230
  description:
229
231
  'Posts content to the specified URL with automatic retry logic on failure, and returns the HTTP status code. Similar to HTTPPost2 but adds configurable retries and rescheduling; the response body and headers (as a rowset) are written to optional output variables.',
230
232
  params: [
@@ -250,7 +252,8 @@ export const HTTP_FUNCTIONS = [
250
252
  name: 'reschedule',
251
253
  description:
252
254
  'Whether the request is rescheduled (retried after 15 minutes) if it still fails after all retries',
253
- type: 'boolean',
255
+ type: 'string|boolean|number',
256
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
254
257
  optional: true,
255
258
  default: false,
256
259
  },
@@ -258,7 +261,8 @@ export const HTTP_FUNCTIONS = [
258
261
  name: 'returnExceptionOnError',
259
262
  description:
260
263
  'If true, raise an exception on error; if false, continue after an error',
261
- type: 'boolean',
264
+ type: 'string|boolean|number',
265
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
262
266
  optional: true,
263
267
  },
264
268
  {
@@ -314,7 +318,7 @@ export const HTTP_FUNCTIONS = [
314
318
  isConfirmed: true,
315
319
  differsFromOfficialDocs: true,
316
320
  officialDocsNote:
317
- 'Runtime-verified on a live Marketing Cloud Engagement CloudPage (child BU). The official reference states this function can only retrieve the standard HTTP headers listed in RFC 7231, but at runtime it also returns the value of a non-standard custom request header: a request sent with an X-Amp-Probe header returned that exact value, so the RFC 7231 restriction is not enforced when reading headers. A header that is absent from the request (for example Referer when none was sent) returns the empty string, matching the documented note. Email/send-context finding: rendered through the Email Preview API against a seeded sendable row, an isolated HTTPRequestHeader("User-Agent") was rejected with HTTP 400 errorcode 10004 ("HTTPRequestHeader Function is not valid in content. This function is only allowed in content with an HTTP context."). So it works only where an inbound HTTP request exists (CloudPages / landing pages) and cannot be used inside a sendable email, which fits its purpose since request headers are a request-time value absent at send time.',
321
+ 'The official reference states this function can only retrieve the standard HTTP headers listed in RFC 7231, but at runtime it also returns the value of a non-standard custom request header: a request sent with a custom header returns that exact value, so the RFC 7231 restriction is not enforced when reading headers. A header that is absent from the request (for example Referer when none was sent) returns the empty string, matching the documented note. In sendable email content an isolated HTTPRequestHeader("User-Agent") is rejected with HTTP 400 errorcode 10004 ("HTTPRequestHeader Function is not valid in content. This function is only allowed in content with an HTTP context."). So it works only where an inbound HTTP request exists (CloudPages / landing pages) and cannot be used inside a sendable email, which fits its purpose since request headers are a request-time value absent at send time.',
318
322
  docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-http/mc-ampscript-reference-http-request-header.html',
319
323
  guideUrl: 'https://ampscript.guide/httprequestheader/',
320
324
  sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/httprequestheader/',
@@ -29,7 +29,7 @@ export const MARKETING_CLOUD_API_FUNCTIONS = [
29
29
  isConfirmed: true,
30
30
  differsFromOfficialDocs: true,
31
31
  officialDocsNote:
32
- 'Email/send-context finding: the WSProxy object model is not valid in sendable email content. Rendered through the Email Preview API against a seeded sendable row, an isolated CreateObject(...) was 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.',
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
33
  },
34
34
  {
35
35
  name: 'CreateObject',
@@ -56,7 +56,7 @@ export const MARKETING_CLOUD_API_FUNCTIONS = [
56
56
  isConfirmed: true,
57
57
  differsFromOfficialDocs: true,
58
58
  officialDocsNote:
59
- 'Email/send-context finding: the WSProxy object model is not valid in sendable email content. Rendered through the Email Preview API against a seeded sendable row, an isolated CreateObject(...) was 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.',
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
60
  },
61
61
  {
62
62
  name: 'InvokeCreate',
@@ -106,7 +106,7 @@ export const MARKETING_CLOUD_API_FUNCTIONS = [
106
106
  isConfirmed: true,
107
107
  differsFromOfficialDocs: true,
108
108
  officialDocsNote:
109
- 'Email/send-context finding: the WSProxy object model is not valid in sendable email content. Rendered through the Email Preview API against a seeded sendable row, an isolated CreateObject(...) was 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.',
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
110
  },
111
111
  {
112
112
  name: 'InvokeDelete',
@@ -156,7 +156,7 @@ export const MARKETING_CLOUD_API_FUNCTIONS = [
156
156
  isConfirmed: true,
157
157
  differsFromOfficialDocs: true,
158
158
  officialDocsNote:
159
- 'Email/send-context finding: the WSProxy object model is not valid in sendable email content. Rendered through the Email Preview API against a seeded sendable row, an isolated CreateObject(...) was 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.',
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
160
  },
161
161
  {
162
162
  name: 'InvokeExecute',
@@ -198,7 +198,7 @@ export const MARKETING_CLOUD_API_FUNCTIONS = [
198
198
  isConfirmed: true,
199
199
  differsFromOfficialDocs: true,
200
200
  officialDocsNote:
201
- 'Email/send-context finding: the WSProxy object model is not valid in sendable email content. Rendered through the Email Preview API against a seeded sendable row, an isolated CreateObject(...) was 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.',
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
202
  },
203
203
  {
204
204
  name: 'InvokePerform',
@@ -239,7 +239,7 @@ export const MARKETING_CLOUD_API_FUNCTIONS = [
239
239
  isConfirmed: true,
240
240
  differsFromOfficialDocs: true,
241
241
  officialDocsNote:
242
- 'Email/send-context finding: the WSProxy object model is not valid in sendable email content. Rendered through the Email Preview API against a seeded sendable row, an isolated CreateObject(...) was 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.',
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
243
  },
244
244
  {
245
245
  name: 'InvokeRetrieve',
@@ -285,7 +285,7 @@ export const MARKETING_CLOUD_API_FUNCTIONS = [
285
285
  isConfirmed: true,
286
286
  differsFromOfficialDocs: true,
287
287
  officialDocsNote:
288
- 'Email/send-context finding: the WSProxy object model is not valid in sendable email content. Rendered through the Email Preview API against a seeded sendable row, an isolated CreateObject(...) was 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.',
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
289
  },
290
290
  {
291
291
  name: 'InvokeUpdate',
@@ -337,7 +337,7 @@ export const MARKETING_CLOUD_API_FUNCTIONS = [
337
337
  isConfirmed: true,
338
338
  differsFromOfficialDocs: true,
339
339
  officialDocsNote:
340
- 'Email/send-context finding: the WSProxy object model is not valid in sendable email content. Rendered through the Email Preview API against a seeded sendable row, an isolated CreateObject(...) was 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.',
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
341
  },
342
342
  {
343
343
  name: 'SetObjectProperty',
@@ -373,6 +373,6 @@ export const MARKETING_CLOUD_API_FUNCTIONS = [
373
373
  isConfirmed: true,
374
374
  differsFromOfficialDocs: true,
375
375
  officialDocsNote:
376
- 'Email/send-context finding: the WSProxy object model is not valid in sendable email content. Rendered through the Email Preview API against a seeded sendable row, an isolated CreateObject(...) was 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.',
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
377
  },
378
378
  ];
@@ -136,7 +136,7 @@ export const MATH_FUNCTIONS = [
136
136
  isConfirmed: true,
137
137
  differsFromOfficialDocs: true,
138
138
  officialDocsNote:
139
- 'The official reference states the bounds may be decimal numbers. On the child BU every decimal bound aborted the CloudPage 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 failed, while the equivalent whole-number and numeric-string calls returned values normally. The same decimal calls also aborted on the parent BU, so this is not a child-BU limitation. Only whole-number bounds are usable at runtime.',
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
140
  },
141
141
  {
142
142
  name: 'Subtract',
@@ -21,7 +21,7 @@ export const MOBILECONNECT_FUNCTIONS = [
21
21
  isConfirmed: true,
22
22
  differsFromOfficialDocs: true,
23
23
  officialDocsNote:
24
- "The out-of-context return is confirmed in two independent runtime contexts: a CloudPage on the child BU and an email render on the child BU. Being an ordinary function call (unlike Msg()/Noun()/Verb()), it compiles and evaluates in both: on the CloudPage, called with a real short code, an authorized destination number and app 'MOBILECONNECT', it returned the literal boolean false with the page rendering fully and no SMS sent; in an email body the same call rendered the literal False through the Email Preview API. This confirms the ampscript.guide claim that the function returns false outside a MobileConnect message context; the official Salesforce reference omits this and describes only the in-context behaviour (true on success, exception on failure). The success path (true, real conversation creation) requires a live MobileConnect message context and cannot be reproduced in a CloudPage or email; only the out-of-context false-return is exercisable, and it is proven. The catalogued signature was also corrected here: the four parameters are originationNumber, destinationNumber, nextKeyword and app, and the return is a boolean, not void.",
24
+ "Outside a MobileConnect message context, the function returns false. Being an ordinary function call (unlike Msg()/Noun()/Verb()), it compiles and evaluates in both a CloudPage and an email body: on a CloudPage, called with a real short code, an authorized destination number and app 'MOBILECONNECT', it returns the literal boolean false with the page rendering fully and no SMS sent; in an email body the same call renders the literal False. This matches the ampscript.guide claim that the function returns false outside a MobileConnect message context; the official Salesforce reference omits this and describes only the in-context behaviour (true on success, exception on failure). The success path (true, real conversation creation) requires a live MobileConnect message context; a CloudPage or email render returns only the out-of-context false. The catalogued signature was also corrected here: the four parameters are originationNumber, destinationNumber, nextKeyword and app, and the return is a boolean, not void.",
25
25
  params: [
26
26
  {
27
27
  name: 'originationNumber',
@@ -46,7 +46,7 @@ export const MOBILECONNECT_FUNCTIONS = [
46
46
  ],
47
47
  returnType: 'boolean',
48
48
  returnDescription:
49
- 'true when a conversation is created inside a MobileConnect message context; false in any other context (proven on a CloudPage). Fails with an exception in-context if unsuccessful.',
49
+ 'true when a conversation is created inside a MobileConnect message context; false in any other context, including a CloudPage. Fails with an exception in-context if unsuccessful.',
50
50
  syntax: 'CreateSmsConversation(originationNumber, destinationNumber, nextKeyword, app)',
51
51
  example: '%%=CreateSmsConversation("12345", MOBILE_NUMBER, "KEYWORD", "MOBILECONNECT")=%%',
52
52
  },
@@ -67,7 +67,7 @@ export const MOBILECONNECT_FUNCTIONS = [
67
67
  isConfirmed: true,
68
68
  differsFromOfficialDocs: true,
69
69
  officialDocsNote:
70
- 'The out-of-context return is confirmed in two independent runtime contexts: a CloudPage on the child BU and an email render on the child BU. Being an ordinary function call, it compiles and evaluates in both: on the CloudPage, called with a real short code and the authorized destination number, it returned the literal boolean false with the page rendering fully, no SMS sent and no conversation state changed; in an email body the same call rendered the literal False through the Email Preview API. This confirms the ampscript.guide claim that the function returns false outside a MobileConnect message context; the official Salesforce reference omits this and describes only the in-context behaviour (true on success, exception on failure). The success path (true, real conversation end) requires a live MobileConnect message context and cannot be reproduced in a CloudPage or email; only the out-of-context false-return is exercisable, and it is proven. The catalogued signature was corrected here: the two parameters are originationNumber and destinationNumber, and the return is a boolean, not void.',
70
+ 'Outside a MobileConnect message context, the function returns false. Being an ordinary function call, it compiles and evaluates in both a CloudPage and an email body: on a CloudPage, called with a real short code and the authorized destination number, it returns the literal boolean false with the page rendering fully, no SMS sent and no conversation state changed; in an email body the same call renders the literal False. This matches the ampscript.guide claim that the function returns false outside a MobileConnect message context; the official Salesforce reference omits this and describes only the in-context behaviour (true on success, exception on failure). The success path (true, real conversation end) requires a live MobileConnect message context; a CloudPage or email render returns only the out-of-context false. The catalogued signature was corrected here: the two parameters are originationNumber and destinationNumber, and the return is a boolean, not void.',
71
71
  params: [
72
72
  {
73
73
  name: 'originationNumber',
@@ -82,7 +82,7 @@ export const MOBILECONNECT_FUNCTIONS = [
82
82
  ],
83
83
  returnType: 'boolean',
84
84
  returnDescription:
85
- 'true when the conversation is ended inside a MobileConnect message context; false in any other context (proven on a CloudPage). Fails with an exception in-context if unsuccessful.',
85
+ 'true when the conversation is ended inside a MobileConnect message context; false in any other context, including a CloudPage. Fails with an exception in-context if unsuccessful.',
86
86
  syntax: 'EndSmsConversation(originationNumber, destinationNumber)',
87
87
  example: '%%=EndSmsConversation("12345", MOBILE_NUMBER)=%%',
88
88
  },
@@ -104,7 +104,7 @@ export const MOBILECONNECT_FUNCTIONS = [
104
104
  verificationBlocked: true,
105
105
  verificationBlockedReason: 'no-working-invocation',
106
106
  officialDocsNote:
107
- 'Could not runtime-verify on the only available context (a CloudPage GET on the child BU; no parent-BU escalation is configured on this tenant). Including an MMS_Content_URL(0) call in the injected content block aborted the whole page at compile time (HTTP 422) even when the call sat inside a non-matching IF branch, while an otherwise identical page with the call removed rendered HTTP 200. This matches the official reference, which states the function is usable only in MobileConnect and not in landing pages or other content types; there is no mobile-originated message context on a CloudPage to exercise it against.',
107
+ 'An MMS_Content_URL(0) call aborts the whole page at compile time (HTTP 422) even when inside a non-matching IF branch, while an otherwise identical page with the call removed renders HTTP 200. This matches the official reference, which states the function is usable only in MobileConnect and not in landing pages or other content types; a CloudPage supplies no mobile-originated message context to exercise it against.',
108
108
  params: [
109
109
  {
110
110
  name: 'position',
@@ -136,7 +136,7 @@ export const MOBILECONNECT_FUNCTIONS = [
136
136
  verificationBlocked: true,
137
137
  verificationBlockedReason: 'no-working-invocation',
138
138
  officialDocsNote:
139
- 'Could not runtime-verify on the only available context (a CloudPage GET on the child BU; no parent-BU escalation is configured on this tenant). A page containing a Msg(0) call aborted at compile time (HTTP 422) even when the call sat inside a non-matching IF branch, whereas the same page with no Msg construct rendered HTTP 200 — so the abort happens at parse time, before any runtime gate. This matches the official reference, which states the function is usable only in MobileConnect and not in landing pages or other content types; a CloudPage supplies no mobile-originated message to read.',
139
+ 'A page containing a Msg(0) call aborts at compile time (HTTP 422) even when the call sits inside a non-matching IF branch, whereas the same page with no Msg construct renders HTTP 200 — so the abort happens at parse time, before any runtime evaluation. This matches the official reference, which states the function is usable only in MobileConnect and not in landing pages or other content types; a CloudPage supplies no mobile-originated message to read.',
140
140
  params: [
141
141
  {
142
142
  name: 'index',
@@ -167,7 +167,7 @@ export const MOBILECONNECT_FUNCTIONS = [
167
167
  verificationBlocked: true,
168
168
  verificationBlockedReason: 'no-working-invocation',
169
169
  officialDocsNote:
170
- 'Could not runtime-verify on the only available context (a CloudPage GET on the child BU; no parent-BU escalation on this tenant). Noun is chained off Msg(0), and any page containing a Msg(0) construct aborts at compile time (HTTP 422) on a CloudPage while an otherwise identical page without it renders HTTP 200. This matches the official reference, which restricts the function to MobileConnect and forbids landing pages / other content types; a CloudPage supplies no mobile-originated message to parse.',
170
+ 'Noun is chained off Msg(0), and any page containing a Msg(0) construct aborts at compile time (HTTP 422) on a CloudPage while an otherwise identical page without it renders HTTP 200. This matches the official reference, which restricts the function to MobileConnect and forbids landing pages / other content types; a CloudPage supplies no mobile-originated message to parse.',
171
171
  params: [
172
172
  {
173
173
  name: 'position',
@@ -199,7 +199,7 @@ export const MOBILECONNECT_FUNCTIONS = [
199
199
  verificationBlocked: true,
200
200
  verificationBlockedReason: 'no-working-invocation',
201
201
  officialDocsNote:
202
- 'Could not runtime-verify on the only available context (a CloudPage GET on the child BU; no parent-BU escalation on this tenant). Nouns is chained off Msg(0), and any page containing a Msg(0) construct aborts at compile time (HTTP 422) on a CloudPage while an otherwise identical page without it renders HTTP 200. This matches the official reference, which restricts the function to MobileConnect and forbids landing pages / other content types; a CloudPage supplies no mobile-originated message to parse.',
202
+ 'Nouns is chained off Msg(0), and any page containing a Msg(0) construct aborts at compile time (HTTP 422) on a CloudPage while an otherwise identical page without it renders HTTP 200. This matches the official reference, which restricts the function to MobileConnect and forbids landing pages / other content types; a CloudPage supplies no mobile-originated message to parse.',
203
203
  params: [],
204
204
  returnType: 'string',
205
205
  returnDescription: 'All content that follows the keyword in the inbound message.',
@@ -223,7 +223,7 @@ export const MOBILECONNECT_FUNCTIONS = [
223
223
  isConfirmed: true,
224
224
  differsFromOfficialDocs: true,
225
225
  officialDocsNote:
226
- 'The out-of-context return is confirmed in two independent runtime contexts: a CloudPage on the child BU and an email render on the child BU. Being an ordinary function call, it compiles and evaluates in both: on the CloudPage, called with a real short code, the authorized destination number and a keyword, it returned the literal boolean false with the page rendering fully, no SMS sent and no conversation state changed; in an email body the same call rendered the literal False through the Email Preview API. This confirms the ampscript.guide claim that the function returns false outside a MobileConnect message context; the official Salesforce reference omits this and describes only the in-context behaviour. The success path (true, keyword actually set) requires a live MobileConnect message context and cannot be reproduced in a CloudPage or email; only the out-of-context false-return is exercisable, and it is proven. The catalogued signature was corrected here: the three parameters are originationNumber, destinationNumber and keyword, and the return is a boolean, not void. A docUrl to the official reference was also added.',
226
+ 'Outside a MobileConnect message context, the function returns false. Being an ordinary function call, it compiles and evaluates in both a CloudPage and an email body: on a CloudPage, called with a real short code, the authorized destination number and a keyword, it returns the literal boolean false with the page rendering fully, no SMS sent and no conversation state changed; in an email body the same call renders the literal False. This matches the ampscript.guide claim that the function returns false outside a MobileConnect message context; the official Salesforce reference omits this and describes only the in-context behaviour. The success path (true, keyword actually set) requires a live MobileConnect message context; a CloudPage or email render returns only the out-of-context false. The catalogued signature was corrected here: the three parameters are originationNumber, destinationNumber and keyword, and the return is a boolean, not void. A docUrl to the official reference was also added.',
227
227
  params: [
228
228
  {
229
229
  name: 'originationNumber',
@@ -243,7 +243,7 @@ export const MOBILECONNECT_FUNCTIONS = [
243
243
  ],
244
244
  returnType: 'boolean',
245
245
  returnDescription:
246
- 'true when the next keyword is set inside a MobileConnect message context; false in any other context (proven on a CloudPage). Fails with an exception in-context if unsuccessful.',
246
+ 'true when the next keyword is set inside a MobileConnect message context; false in any other context, including a CloudPage. Fails with an exception in-context if unsuccessful.',
247
247
  syntax: 'SetSmsConversationNextKeyword(originationNumber, destinationNumber, keyword)',
248
248
  example: '%%=SetSmsConversationNextKeyword("12345", MOBILE_NUMBER, "EXAMPLE")=%%',
249
249
  },
@@ -265,7 +265,7 @@ export const MOBILECONNECT_FUNCTIONS = [
265
265
  isConfirmed: true,
266
266
  differsFromOfficialDocs: false,
267
267
  officialDocsNote:
268
- 'Both return tokens were runtime-proven on the child BU. The success status 0 was proven by creating a brand-new mobile contact keyed on an opaque, unreachable phone number in a reserved test range with a documented system attribute (_ZipCode); calling the same key a second time with a different value updated that contact and again returned 0, so both the create and update branches of the upsert return 0. The error status 1 was proven three independent ways (unsupported channel, unsupported match attribute, non-numeric phone) and again by passing an attribute name that is not a defined MobileConnect attribute — each returned 1 with the page rendering fully and no write performed. The return is a status code (0 success / 1 error), not a count of records. The phone-number argument accepts both an integer literal and a numeric string (both returned 0 for a successful create). runtime matches the official reference, so differsFromOfficialDocs stays false.',
268
+ 'Both return tokens are observable. The success status 0 occurs when creating a new mobile contact keyed on an unreachable phone number with a documented system attribute (_ZipCode); calling the same key a second time with a different value updates that contact and again returns 0, so both the create and update branches of the upsert return 0. The error status 1 occurs in three independent cases (unsupported channel, unsupported match attribute, non-numeric phone) and also when passing an attribute name that is not a defined MobileConnect attribute — each returns 1 with the page rendering fully and no write performed. The return is a status code (0 success / 1 error), not a count of records. The phone-number argument accepts both an integer literal and a numeric string (both return 0 for a successful create). Runtime matches the official reference, so differsFromOfficialDocs stays false.',
269
269
  params: [
270
270
  {
271
271
  name: 'channel',
@@ -306,7 +306,7 @@ export const MOBILECONNECT_FUNCTIONS = [
306
306
  returnType: 'number',
307
307
  returnEnum: [0, 1],
308
308
  returnDescription:
309
- 'A status code: 0 when the upsert succeeds (both creating a new contact and updating an existing one), 1 when an error occurs. Both tokens were proven at runtime.',
309
+ 'A status code: 0 when the upsert succeeds (both creating a new contact and updating an existing one), 1 when an error occurs.',
310
310
  repeat: [{ startIndex: 3, groupSize: 2, minGroups: 1 }],
311
311
  syntax: 'UpsertContact(channel, attribute, phoneNumber, keyToUpsert1, valueToUpsert1[, keyToUpsertN, valueToUpsertN, ...])',
312
312
  example: "%%=UpsertContact('mobile', 'phone', 14255550142, '_ZipCode', '98026')=%%",
@@ -329,7 +329,7 @@ export const MOBILECONNECT_FUNCTIONS = [
329
329
  verificationBlocked: true,
330
330
  verificationBlockedReason: 'no-working-invocation',
331
331
  officialDocsNote:
332
- 'Could not runtime-verify on the only available context (a CloudPage GET on the child BU; no parent-BU escalation on this tenant). Verb is chained off Msg(0), and any page containing a Msg(0) construct aborts at compile time (HTTP 422) on a CloudPage while an otherwise identical page without it renders HTTP 200. This matches the official reference, which restricts the function to MobileConnect and forbids landing pages / other content types; a CloudPage supplies no mobile-originated message to parse.',
332
+ 'Verb is chained off Msg(0), and any page containing a Msg(0) construct aborts at compile time (HTTP 422) on a CloudPage while an otherwise identical page without it renders HTTP 200. This matches the official reference, which restricts the function to MobileConnect and forbids landing pages / other content types; a CloudPage supplies no mobile-originated message to parse.',
333
333
  params: [],
334
334
  returnType: 'string',
335
335
  returnDescription: 'The keyword (first word) of the inbound mobile-originated message.',
@@ -22,7 +22,7 @@ export const SALES_SERVICE_CLOUD_FUNCTIONS = [
22
22
  isConfirmed: true,
23
23
  differsFromOfficialDocs: false,
24
24
  officialDocsNote:
25
- 'The success path was runtime-proven on the child BU, which has an active Marketing Cloud Connect integration to a real Salesforce org. Creating a benign Task with a single opaque field returned a real 18-character Salesforce ID (an 00T-prefixed Task ID), confirming the documented return shape. The fault path was also proven: an unknown object name and an unknown field name on a real object each aborted the CloudPage with HTTP 422 — the SOAP fault from the connected org propagates as an uncatchable page abort (AMPscript has no try/catch), exactly like RetrieveSalesforceObjects against an unknown object — so there is no testable error value, the function either returns an ID or aborts. AMPscript has no delete function for Salesforce objects, so the created Task remains as benign residue in the org. Catalog signature, returnType and repeat group all match the official reference and ampscript.guide, so differsFromOfficialDocs stays false.',
25
+ 'With an active Marketing Cloud Connect integration to a Salesforce org, the success path returns a real 18-character Salesforce ID (an 00T-prefixed Task ID), confirming the documented return shape. The fault path behaves differently: an unknown object name and an unknown field name on a real object each abort the CloudPage with HTTP 422 — the SOAP fault from the connected org propagates as an uncatchable page abort (AMPscript has no try/catch), exactly like RetrieveSalesforceObjects against an unknown object — so there is no observable error value, the function either returns an ID or aborts. AMPscript has no delete function for Salesforce objects, so a created record remains as benign residue in the org. Catalog signature, returnType and repeat group all match the official reference and ampscript.guide, so differsFromOfficialDocs stays false.',
26
26
  params: [
27
27
  {
28
28
  name: 'objectName',
@@ -198,7 +198,7 @@ export const SALES_SERVICE_CLOUD_FUNCTIONS = [
198
198
  isConfirmed: true,
199
199
  differsFromOfficialDocs: false,
200
200
  officialDocsNote:
201
- 'The success token 1 was runtime-proven on the child BU, which has an active Marketing Cloud Connect integration to a real Salesforce org: updating one field of a record created moments earlier in the same run (a benign Task) returned the literal 1 with the page rendering fully. The failure token 0 is NOT observable in CloudPage GET context: every safe induced failure (unknown object, a malformed ID, and a well-formed but non-existent Lead ID at both 15 and 18 characters, on a real field) aborted the whole page with HTTP 422 — the SOAP fault propagates as an uncatchable page abort (identical to CreateSalesforceObject and RetrieveSalesforceObjects against a bad target), so the documented 0 return never materialises to be read. returnEnum is therefore left unset: only 1 is provable here, and asserting a [0,1] enum would ship the unproven 0 token. returnType stays number and the 0/1 semantics are retained in the description as a documented fact attributed to the official reference. The 0-on-CloudPage-abort behaviour is a context observation, not a contradiction of the send/preview-context 0/1 contract, so differsFromOfficialDocs stays false.',
201
+ 'With an active Marketing Cloud Connect integration to a Salesforce org, a successful update returns the literal 1 with the page rendering fully. The failure token 0 does not occur in a CloudPage context: a failed update (unknown object, a malformed ID, or a well-formed but non-existent Lead ID at 15 or 18 characters, on a real field) aborts the whole page with HTTP 422 — the SOAP fault propagates as an uncatchable page abort (identical to CreateSalesforceObject and RetrieveSalesforceObjects against a bad target), so the documented 0 return never materialises to be read. The 0/1 contract therefore applies to the send/preview context, not to CloudPages.',
202
202
  params: [
203
203
  {
204
204
  name: 'objectName',
@@ -222,7 +222,7 @@ export const SALES_SERVICE_CLOUD_FUNCTIONS = [
222
222
  ],
223
223
  returnType: 'number',
224
224
  returnDescription:
225
- '1 when the record was updated successfully (runtime-proven). Per the official reference a failed update returns 0, but on a CloudPage a failure aborts the page (HTTP 422) instead of returning 0, so the 0 token is not observable in that context.',
225
+ '1 when the record was updated successfully. Per the official reference a failed update returns 0, but on a CloudPage a failure aborts the page (HTTP 422) instead of returning 0, so the 0 token does not occur in that context.',
226
226
  repeat: [{ startIndex: 2, groupSize: 2, minGroups: 1 }],
227
227
  syntax: 'UpdateSingleSalesforceObject(objectName, idToUpdate, fieldName1, fieldValue1[, fieldNameN, fieldValueN, ...])',
228
228
  example: "%%=UpdateSingleSalesforceObject('Contact', @recordId, 'LastName', 'Smith')=%%",
@@ -28,7 +28,7 @@ export const SOCIAL_FUNCTIONS = [
28
28
  nonFunctionalAtRuntime: true,
29
29
  differsFromOfficialDocs: true,
30
30
  officialDocsNote:
31
- 'The community guide flags this as usable only inside Microsites and Landing Pages and only for content regions built in Classic Content, which is retired on this tenant. A reached call aborted the page with HTTP 422 and no partial output for both a string region name and a numeric region id, on the child BU and again on the parent BU. The same call gated behind an unmatched query-string branch left the page at HTTP 200, confirming a runtime abort of the reached call rather than a compile-time failure. No Classic Content region exists here to source a resolvable identifier, so the documented success path could not be exercised. Email/send context: the send parser EXPLICITLY rejects this function with errorcode 10004 ("GetPublishedSocialContent Function is only allowed to be called from social sharing pages or landing pages") - a hard context restriction, stronger and different from the CloudPage runtime abort, which only occurs because no Classic Content region resolves.',
31
+ 'The community guide flags this as usable only inside Microsites and Landing Pages and only for content regions built in Classic Content, which is retired. A reached call aborts the page with HTTP 422 and no partial output for both a string region name and a numeric region id; gating the same call behind an unmatched query-string branch leaves the page at HTTP 200, confirming a runtime abort of the reached call rather than a compile-time failure. No Classic Content region exists to source a resolvable identifier, so the documented success path cannot be exercised. Email/send context: the send parser EXPLICITLY rejects this function with errorcode 10004 ("GetPublishedSocialContent Function is only allowed to be called from social sharing pages or landing pages") - a hard context restriction, stronger and different from the CloudPage runtime abort, which only occurs because no Classic Content region resolves.',
32
32
  },
33
33
  {
34
34
  name: 'GetSocialPublishURL',
@@ -1,7 +1,7 @@
1
1
  // AUTO-SPLIT from the original single-file src/index.js. Data moved verbatim.
2
2
  // AMPscript FUNCTIONS — category: Utility (32 entries).
3
3
 
4
- import { INF } from '../constants.js';
4
+ import { BOOLEAN_LIKE_LITERAL_VALUES, INF } from '../constants.js';
5
5
 
6
6
  export const UTILITY_FUNCTIONS = [
7
7
  {
@@ -77,11 +77,11 @@ export const UTILITY_FUNCTIONS = [
77
77
  params: [],
78
78
  returnType: 'string',
79
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.',
80
+ 'The notification address as a string, usable directly in Concat and in comparisons. It is a real email address on a registered domain, and it is non-empty even without a signed-in visitor.',
81
81
  isConfirmed: true,
82
82
  differsFromOfficialDocs: true,
83
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.',
84
+ 'The official reference scopes the function to microsites that use sender authenticated redirection and explicitly says it is not for use with CloudPages. In practice the opposite happens: on a public CloudPage the call returns a well-formed, non-empty notification email address — Empty() answers false, Length() reports 29 characters and IsEmailAddress() accepts it. The value behaves 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
85
  sfmcGuideUrl:
86
86
  'https://sfmc.guide/engagement/ampscript/functions/authenticatedemployeenotificationaddress/',
87
87
  syntax: 'AuthenticatedEmployeeNotificationAddress()',
@@ -104,7 +104,7 @@ export const UTILITY_FUNCTIONS = [
104
104
  params: [],
105
105
  returnType: 'string',
106
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.',
107
+ 'The username as a string, usable directly in Concat and in comparisons. It is shaped like an email address and is non-empty even without a signed-in visitor.',
108
108
  isConfirmed: true,
109
109
  differsFromOfficialDocs: false,
110
110
  sfmcGuideUrl:
@@ -317,7 +317,7 @@ export const UTILITY_FUNCTIONS = [
317
317
  isConfirmed: true,
318
318
  differsFromOfficialDocs: true,
319
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.',
320
+ '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 abort, 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
321
  sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/format/',
322
322
  description:
323
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.',
@@ -537,7 +537,7 @@ export const UTILITY_FUNCTIONS = [
537
537
  isConfirmed: true,
538
538
  differsFromOfficialDocs: true,
539
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.',
540
+ 'The official reference documents this as an AMPscript function without noting that it is restricted to non-sendable content. Email/send-context finding: an isolated IsCHTMLBrowser("DoCoMo/2.0 N905i") is rejected in sendable email content 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
541
  category: 'Utility',
542
542
  description:
543
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.',
@@ -570,7 +570,7 @@ export const UTILITY_FUNCTIONS = [
570
570
  isConfirmed: true,
571
571
  differsFromOfficialDocs: true,
572
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.',
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 CloudPage that shape returns False. Every other example in the same table matches: the missing at sign, the double at sign, the missing local part and the missing second-level domain all return False, and a well-formed address returns True. Surrounding whitespace is also rejected, which no source mentions.',
574
574
  category: 'Utility',
575
575
  description:
576
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.',
@@ -619,7 +619,7 @@ export const UTILITY_FUNCTIONS = [
619
619
  isConfirmed: true,
620
620
  differsFromOfficialDocs: true,
621
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.',
622
+ 'The official reference shows a variable declared with VAR and never assigned, and states IsNull returns true for it. On a CloudPage that exact shape returns False. The same False comes 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
623
  syntax: 'IsNull(value)',
624
624
  example: '%%=IsNull(@value)=%%',
625
625
  },
@@ -778,7 +778,7 @@ export const UTILITY_FUNCTIONS = [
778
778
  isConfirmed: true,
779
779
  differsFromOfficialDocs: true,
780
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.',
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 CloudPage a literal argument, a bare variable and a bare number each render nothing at all while the page still returns HTTP 200, so no error surfaces anywhere. The function also accepts zero arguments and up to three arguments, writing each one in turn.',
782
782
  },
783
783
  {
784
784
  name: 'OutputLine',
@@ -872,6 +872,7 @@ export const UTILITY_FUNCTIONS = [
872
872
  description:
873
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
874
  type: 'string|boolean|number',
875
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
875
876
  optional: true,
876
877
  },
877
878
  {
@@ -895,8 +896,9 @@ export const UTILITY_FUNCTIONS = [
895
896
  mcnSince: null,
896
897
  mcnNotes: null,
897
898
  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',
899
+ "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. Boolean-like numbers and quoted representations are accepted as well; in an email preview, bare true and false tokens resolve as field references, so use 1, 0, or a quoted representation for literals. This parameter applies to information that is inserted, updated, upserted, or deleted using AMPscript functions",
900
+ type: 'string|boolean|number',
901
+ enum: BOOLEAN_LIKE_LITERAL_VALUES,
900
902
  optional: true,
901
903
  },
902
904
  ],
@@ -932,7 +934,7 @@ export const UTILITY_FUNCTIONS = [
932
934
  isConfirmed: true,
933
935
  differsFromOfficialDocs: true,
934
936
  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.',
937
+ 'Email/send-context finding: Redirect is not valid in sendable email content. An isolated Redirect("https://sfmc.guide/robots.txt") is rejected with HTTP 400 errorcode 10005 ("Redirect Function is not valid in content. This function is only allowed 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
938
  },
937
939
  {
938
940
  name: 'RedirectTo',
@@ -1057,7 +1059,7 @@ export const UTILITY_FUNCTIONS = [
1057
1059
  verificationBlocked: true,
1058
1060
  verificationBlockedReason: 'no-test-data',
1059
1061
  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.',
1062
+ 'On a CloudPage every invocation aborts at HTTP 422. In an email context, however, the function is recognised and evaluated, 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 to resolve. The block is missing configuration, not a broken invocation.',
1061
1063
  },
1062
1064
  {
1063
1065
  name: 'WATP',
@@ -1106,7 +1108,7 @@ export const UTILITY_FUNCTIONS = [
1106
1108
  isConfirmed: true,
1107
1109
  differsFromOfficialDocs: true,
1108
1110
  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.',
1111
+ 'The official reference states that a URL longer than 975 characters comes back as a shortened link that redirects through the platform. On a CloudPage a 1048-character URL is returned byte for byte unchanged at the same length, twice in one render, and the same holds 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
1112
  sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/wraplongurl/',
1111
1113
  params: [{ name: 'url', description: 'URL to shorten', type: 'string|number' }],
1112
1114
  returnType: 'string',
package/src/index.js CHANGED
@@ -32,17 +32,17 @@
32
32
  * difference.
33
33
  * - officialDocsNote?: string — human-readable evidence: what the official docs claim, what
34
34
  * the runtime actually did, and what was tried.
35
- * - supportedInCloudPage?: boolean — RUNTIME-PROVEN runtime-context flag (orthogonal to the
35
+ * - supportedInCloudPage?: boolean — runtime-context flag (orthogonal to the
36
36
  * Engagement/Next PLATFORM flags mcnSince/mcnNotes). true when a live CloudPage/landing-page
37
- * probe rendered the function successfully; false when the function was actually probed in a
38
- * CloudPage context and proven NOT to work there (the reached call aborts the page, or the
39
- * parser refuses it). ABSENT means the function was never probed in that context — absence
37
+ * render evaluated the function successfully; false when the function was actually evaluated in a
38
+ * CloudPage context and confirmed NOT to work there (the reached call aborts the page, or the
39
+ * parser refuses it). ABSENT means the function was never evaluated in that context — absence
40
40
  * MUST NOT be read as unsupported. Never defaults to false.
41
41
  * - supportedInEmail?: boolean — same semantics for the email/send context: true when a live
42
- * email/send probe rendered/evaluated the function successfully (a data/connector/asset gate
42
+ * email/send render evaluated the function successfully (a data/connector/asset requirement
43
43
  * that still lets the function itself run counts as supported); false when the send-content
44
- * parser proved it does not work there (rejected as not valid in sendable content, or the
45
- * engine does not recognise it). ABSENT means never probed — not unsupported. Never defaults
44
+ * parser confirmed it does not work there (rejected as not valid in sendable content, or the
45
+ * engine does not recognise it). ABSENT means never evaluated — not unsupported. Never defaults
46
46
  * to false.
47
47
  */
48
48
 
@@ -69,5 +69,5 @@ export { AMPSCRIPT_OPERATORS } from './operators.js';
69
69
  export { AMPSCRIPT_GLOBALS } from './globals.js';
70
70
  export { PERSONALIZATION_STRINGS, isSystemPersonalizationString } from './personalization.js';
71
71
 
72
- // Shared constants (only the public enum is re-exported).
73
- export { VERIFICATION_BLOCKED_REASONS } from './constants.js';
72
+ // Shared constants.
73
+ export { BOOLEAN_LIKE_LITERAL_VALUES, VERIFICATION_BLOCKED_REASONS } from './constants.js';