> For the complete documentation index, see [llms.txt](https://docs.thewalletcrew.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thewalletcrew.io/connectors/custom-connector/custom-connector-scripting-reference.md).

# Custom connector scripting reference

Every registrable endpoint the tenant scripting runtime exposes, grouped by what it does and linked to a dedicated page where one exists.

[Custom connectors](https://docs.thewalletcrew.io/developers-guides/integration-guides/custom-connectors) walks through the customer-provider and pass-updater pattern used by most integrations, and the approved globals available to every script (`fetch`, `console`, `getSecret`, and the rest). This page indexes every other registrable endpoint the runtime exposes, including narrower hooks that don't have a dedicated walkthrough elsewhere. Some need extra wiring — a flow step, a scheduled task, a configuration file entry — and are documented on the page shown in the table below. The five that need no extra wiring each have their own page here.

{% hint style="success" %}
The advanced configuration editor generates autocomplete and inline documentation for every registrable endpoint — its parameters and return type — directly from the runtime. It is the authoritative, always-current reference for the scripting surface; use this page to discover what exists.
{% endhint %}

## Registrable endpoints

Every endpoint below is registered the same way, from a script's default export:

```js
export default function (context) {
  context.register('<registration key>', {
    // one or more handler functions
  });
}
```

| Registration key                                        | Function(s)                                                                                                  | Needs extra wiring                                                                   | Documented on                                                                                                                                                                                                                                         |
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `runtime.scriptable.customerProvider.{scriptId}`        | `Fill(entity)`                                                                                               | Yes — a `customerProviders` entry of type `script` in the process-flow configuration | [Custom connectors](https://docs.thewalletcrew.io/developers-guides/integration-guides/custom-connectors)                                                                                                                                             |
| `runtime.wallet.passUpdater`                            | `OnPassCreating`, `OnPassCreated`, `OnPassUpdating`, `OnPassUpdated`, `OnPassInstalled`, `OnPassUninstalled` | No                                                                                   | [Custom connectors](https://docs.thewalletcrew.io/developers-guides/integration-guides/custom-connectors), [Pass installation and uninstallation hooks](https://docs.thewalletcrew.io/connectors/custom-connector/installation-changed-extensibility) |
| `runtime.scriptable.customerPipelineElement.{scriptId}` | `CreateOrUpdate(entity)`                                                                                     | Yes — used as a `script`-type step in a customer-registration flow                   | [Custom connectors](https://docs.thewalletcrew.io/developers-guides/integration-guides/custom-connectors)                                                                                                                                             |
| `runtime.scriptable.pushUpdates.{scriptId}`             | `GetPasses()`                                                                                                | Yes — a scheduled task referencing the script name                                   | [Custom connectors](https://docs.thewalletcrew.io/developers-guides/integration-guides/custom-connectors)                                                                                                                                             |
| `runtime.scriptable.emailEngine`                        | `SendEmail(recipient, template, data, cultures, buildEmail)`                                                 | Yes — `/server/emails.yml` provider set to `script`                                  | [EmailSender extensibility](https://docs.thewalletcrew.io/connectors/custom-connector/emailsender-extensibility)                                                                                                                                      |
| `runtime.scriptable.scriptableAccountValidator`         | `Validate(account)`                                                                                          | No                                                                                   | [Account validation](/connectors/custom-connector/custom-connector-scripting-reference/account-validation.md)                                                                                                                                         |
| `runtime.emailAccountChallenger.templateFinder`         | `GetEmailTemplate(data, defaultTemplateName)`                                                                | No                                                                                   | [Email challenge template selection](/connectors/custom-connector/custom-connector-scripting-reference/email-challenge-template-selection.md)                                                                                                         |
| `runtime.wallet.linkUrlEnricher`                        | `Enrich(url, context)`                                                                                       | No                                                                                   | [Wallet link URL enrichment](/connectors/custom-connector/custom-connector-scripting-reference/wallet-link-url-enrichment.md)                                                                                                                         |
| `runtime.import.updatePasses.rowTransformer`            | `GetThroughput(fileName)`, `Transform(row)`                                                                  | No                                                                                   | [Bulk pass update row transformation](/connectors/custom-connector/custom-connector-scripting-reference/bulk-pass-update-row-transformation.md)                                                                                                       |
| `runtime.benefit.benefitProvider`                       | `GetBenefits(passId, passType, identifiers)`                                                                 | No                                                                                   | [Benefit provider](/connectors/custom-connector/custom-connector-scripting-reference/benefit-provider.md)                                                                                                                                             |

{% hint style="warning" %}
If no script registers a given endpoint, the platform's default behavior applies and nothing fails. If a script registers an endpoint but omits a method it must implement, the call fails when that method is reached. If a script file has a syntax error, none of that tenant's script endpoints load — not just the broken file's. And where two files register the same key, the last one loaded wins, silently.
{% endhint %}

## SOAP-based connectors

Cegid Retail Y2 and UR front their SOAP APIs with their own request interceptor — `extensions.cegid.y2.connectionInterceptor` and `extensions.cegid.ur.connectionInterceptor` — used to inspect or alter every outbound call, commonly to inject an authentication header from the secret store. It's specific to those two connectors rather than a hook available to any custom connector, so it's documented on [Cegid's own scripting reference](https://docs.thewalletcrew.io/connectors/pos/cegid/developer-reference/scripting-reference) rather than here.

## FAQ

<details>

<summary><strong>Is this page a substitute for the advanced configuration editor's autocomplete?</strong></summary>

No. The editor generates its documentation directly from the runtime, so it always reflects the current version exactly. This page is a curated index meant to be read before opening the editor, to make endpoints discoverable that are easy to miss otherwise.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.thewalletcrew.io/connectors/custom-connector/custom-connector-scripting-reference.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
