ampscript-data 3.4.0 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +42 -13
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -905,10 +905,11 @@ export const FUNCTIONS = [
|
|
|
905
905
|
docUrl: 'https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-data-extension/mc-ampscript-reference-data-extension-claim-row-value.html',
|
|
906
906
|
guideUrl: 'https://ampscript.guide/claimrowvalue/',
|
|
907
907
|
sfmcGuideUrl: 'https://sfmc.guide/engagement/ampscript/functions/claimrowvalue/',
|
|
908
|
-
minArgs:
|
|
908
|
+
minArgs: 6,
|
|
909
909
|
maxArgs: INF,
|
|
910
910
|
category: 'Data Extension',
|
|
911
|
-
description:
|
|
911
|
+
description:
|
|
912
|
+
'Atomically claims a row and returns a specific column value from it, or a caller-supplied fallback when no unclaimed rows remain.',
|
|
912
913
|
params: [
|
|
913
914
|
{
|
|
914
915
|
name: 'dataExt',
|
|
@@ -930,35 +931,52 @@ export const FUNCTIONS = [
|
|
|
930
931
|
type: 'string',
|
|
931
932
|
},
|
|
932
933
|
{
|
|
933
|
-
name: '
|
|
934
|
+
name: 'fallbackValue',
|
|
934
935
|
mcnSince: null,
|
|
935
936
|
mcnNotes: null,
|
|
936
|
-
description:
|
|
937
|
-
|
|
937
|
+
description:
|
|
938
|
+
'Value returned when no unclaimed rows remain (required at runtime, despite ampscript.guide marking it optional)',
|
|
938
939
|
},
|
|
939
940
|
{
|
|
940
|
-
name: '
|
|
941
|
+
name: 'claimantColumn',
|
|
941
942
|
mcnSince: null,
|
|
942
943
|
mcnNotes: null,
|
|
943
944
|
description:
|
|
944
|
-
'The column the function uses to track the subscriber who claimed the row',
|
|
945
|
+
'The column the function uses to track the subscriber who claimed the row (required at runtime)',
|
|
946
|
+
type: 'string',
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
name: 'claimantValue',
|
|
950
|
+
mcnSince: null,
|
|
951
|
+
mcnNotes: null,
|
|
952
|
+
description:
|
|
953
|
+
'The value to enter in the claimant column when the function claims a row (required at runtime)',
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
name: 'additionalColumnNameN',
|
|
957
|
+
mcnSince: null,
|
|
958
|
+
mcnNotes: null,
|
|
959
|
+
description:
|
|
960
|
+
'Name of a further column to write on the claimed row (record extra context at claim time). Repeatable as name/value pairs.',
|
|
945
961
|
type: 'string',
|
|
946
962
|
optional: true,
|
|
947
963
|
},
|
|
948
964
|
{
|
|
949
|
-
name: '
|
|
965
|
+
name: 'additionalColumnValueN',
|
|
950
966
|
mcnSince: null,
|
|
951
967
|
mcnNotes: null,
|
|
952
968
|
description:
|
|
953
|
-
'
|
|
969
|
+
'Value written to the paired additionalColumnNameN column on the claimed row',
|
|
954
970
|
optional: true,
|
|
955
971
|
},
|
|
956
972
|
],
|
|
957
973
|
returnType: 'string',
|
|
958
|
-
returnDescription:
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
974
|
+
returnDescription:
|
|
975
|
+
'The value from the requested column of the claimed row, or the fallbackValue when no unclaimed rows remain.',
|
|
976
|
+
repeat: [{ startIndex: 6, groupSize: 2, minGroups: 0 }],
|
|
977
|
+
syntax: 'ClaimRowValue(dataExt, returnValueColumn, claimColumn, fallbackValue, claimantColumn, claimantValue[, additionalColumnNameN, additionalColumnValueN, ...])',
|
|
978
|
+
example:
|
|
979
|
+
"%%=ClaimRowValue('Coupons', 'Code', 'Claimed', 'SOLD OUT', 'SubKey', _subscriberkey)=%%",
|
|
962
980
|
isConfirmed: true,
|
|
963
981
|
differsFromOfficialDocs: false,
|
|
964
982
|
},
|
|
@@ -6408,6 +6426,17 @@ export const deprecatedFunctionLookup = new Map(
|
|
|
6408
6426
|
FUNCTIONS.filter((f) => f.deprecated).map((f) => [f.name.toLowerCase(), f]),
|
|
6409
6427
|
);
|
|
6410
6428
|
|
|
6429
|
+
/**
|
|
6430
|
+
* Case-insensitive lookup of functions that resolve at runtime but have no known
|
|
6431
|
+
* working invocation (`nonFunctionalAtRuntime`): lowercase name -> function entry.
|
|
6432
|
+
* Every reached call aborts the page (e.g. a retired Classic feature), so callers
|
|
6433
|
+
* can flag the call site. Kept separate from deprecation because these functions
|
|
6434
|
+
* were never formally deprecated by Salesforce.
|
|
6435
|
+
*/
|
|
6436
|
+
export const nonFunctionalFunctionLookup = new Map(
|
|
6437
|
+
FUNCTIONS.filter((f) => f.nonFunctionalAtRuntime).map((f) => [f.name.toLowerCase(), f]),
|
|
6438
|
+
);
|
|
6439
|
+
|
|
6411
6440
|
// ── Keywords ─────────────────────────────────────────────────────────────────
|
|
6412
6441
|
|
|
6413
6442
|
/**
|