Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Real-world examples
  • A CRM mapping script written years ago fills the points balance of a loyalty pass; it is renamed to the new key in one line, and a Describe is added so the pass template editor lists its fields.

  • A tenant has the same script id registered under both keys after a partial migration; the old registration is removed so that only one implementation remains.

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: crm

The 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:

  1. runtime.scriptable.passDataProvider.crm: when it is registered, it runs and the search stops.

  2. 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.

  3. 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 Fill behave 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:

  1. Search the advanced configuration for runtime.scriptable.customerProvider. to find every obsolete registration, including duplicates in other files.

  2. 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.

  3. Optionally add Describe. A scriptId with a hyphen is not a valid namespace: either rename the script id to camelCase in the configuration and the registration, or return a valid namespace from Describe; otherwise pass types listing the script cannot be saved.

  4. 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

Does the migration change the template variables?

No. The values are published under the same keys and the same namespace as before, as long as Describe does not choose another namespace. When Describe returns a namespace different from the scriptId, templates that read the namespaced form must be updated to the new namespace.

Last updated