ampscript-data 3.5.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +31 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ampscript-data",
3
- "version": "3.5.0",
3
+ "version": "3.6.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/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: 3,
908
+ minArgs: 6,
909
909
  maxArgs: INF,
910
910
  category: 'Data Extension',
911
- description: 'Atomically claims a row and returns a specific column value from it.',
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: 'valueIfClaimed',
934
+ name: 'fallbackValue',
934
935
  mcnSince: null,
935
936
  mcnNotes: null,
936
- description: 'A fallback value returned if there are no unclaimed rows',
937
- optional: true,
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: 'claimantColumnN',
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: 'claimantValueN',
965
+ name: 'additionalColumnValueN',
950
966
  mcnSince: null,
951
967
  mcnNotes: null,
952
968
  description:
953
- 'The value to enter in the claimant column when the function claims a row',
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: 'The value from the requested column of the claimed row.',
959
- repeat: [{ startIndex: 4, groupSize: 2, minGroups: 0 }],
960
- syntax: 'ClaimRowValue(dataExt, returnValueColumn, claimColumn[, valueIfClaimed, claimantColumnN, claimantValueN, ...])',
961
- example: "%%=ClaimRowValue('Coupons', 'Code', 'Claimed', '', 'SubKey', _subscriberkey)=%%",
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
  },