Obsolete customerProvider script key
How the obsolete runtime.scriptable.customerProvider key still runs and how to move a script to the pass data provider.
runtime.scriptable.customerProvider.{scriptId} is the former name of the pass data provider. Scripts registered under it keep working, but the name is obsolete: new scripts register runtime.scriptable.passDataProvider.{scriptId}, and existing ones should be moved when they are next edited. This page explains how the obsolete key is still resolved, what changes with the new key (nothing in the configuration, more in the admin console) and how to migrate a script safely. The customerProviders setting in server/account.yml stays live; only the endpoint key is obsolete.
Registration
The obsolete key is runtime.scriptable.customerProvider.{scriptId}. It is wired exactly like its replacement, by the same configuration entries, which do not change during a migration:
# server/passes/<passType>.yml
dataProviders:
- provider: script
scriptId: crm# server/account.yml
customerProviders:
- type: script
scriptId: crmThe handlers are the same too: Fill(entity), required, and Describe(), optional and synchronous. Their parameters and return values are described on the pass data provider page.
When it runs
Each time an entry with scriptId: crm runs, The Wallet Crew looks for an implementation in this order:
runtime.scriptable.passDataProvider.crm: when it is registered, it runs and the search stops.runtime.scriptable.customerProvider.crm: when only the obsolete key is registered, it runs, and a warning is recorded stating that the endpoint is obsolete and naming the key to register instead.Neither is registered: the entry runs nothing and counts as having found data.
The same order applies to Describe, which the admin console calls to list the script's variables and identifiers.
The warning is recorded once per platform version and tenant for each obsolete key, rather than at every call, so it remains visible in the platform's monitoring without flooding it. The script editor of the advanced configuration also marks the obsolete key as deprecated in its typings.
Errors and edge cases
Both keys registered for the same script id, in one file or two: the pass data provider runs whatever the load order, and the obsolete registration is ignored, silently. Leaving both in place is a source of confusion, because editing the old one changes nothing.
A script id registered under the obsolete key only: it runs, with the obsolete warning.
Errors thrown by
Fillbehave as described on the pass data provider page.
Example
Moving a script is a one-line change of the registered key. The configuration keeps its scriptId, so the pass types and the account file need no edit.
Before:
After:
A safe migration follows four steps:
Search the advanced configuration for
runtime.scriptable.customerProvider.to find every obsolete registration, including duplicates in other files.Change the key to
runtime.scriptable.passDataProvider.with the same script id, in one file only, and delete any other registration of the same script id.Optionally add
Describe. AscriptIdwith a hyphen is not a valid namespace: either rename the script id to camelCase in the configuration and the registration, or return a validnamespacefromDescribe; otherwise pass types listing the script cannot be saved.Save the configuration and check one pass with the pass data inspection (below).
Checking the result
GET /api/{tenantId}/passes/{passId}/data reports, for a pass, each data provider with its status and the values it wrote; after the migration the script's entry still finds its data and writes the same values. In the admin console, the pass template editor lists the script with its namespace and, once Describe is added, its fields. The obsolete warning stops appearing in the platform's monitoring once no entry resolves to the old key.
FAQ
Last updated

