Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions content/advanced-extensions/api-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ You can find the extension UUID by listing all extensions using the API: `GET {Y
| Parameter | Description | Example |
|-----------|-------------|---------|
| `configuration[labels][{locale}]` | Localized labels | `configuration[labels][en_US]="My Extension"` |
| `configuration[custom_variables]̀` | Custom variables | `configuration[custom_variables] = {"key": "value"}` |
| `credentials[{n}][code]` | Credential identifier | `credentials[0][code]="api_token"` |
| `credentials[{n}][type]` | Auth type: `Bearer Token`, `Basic Auth`, or `Custom Header` | `credentials[0][type]="Bearer Token"` |
| `credentials[{n}][value]` | Credential value(s) | `credentials[0][value]="token123"` |
Expand Down
17 changes: 17 additions & 0 deletions content/advanced-extensions/sdk-in-depth.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,23 @@ const secureResponse = await PIM.api.external.call({

The external gateway provides a secure way to integrate your extension with external systems while maintaining the security of the PIM environment.

## Using Custom variables

Custom Variables allow you to define configuration data that will be securely passed to your SDK Custom Component extensions at runtime. They are stored as encrypted JSON objects in the PIM database and made available to your extension's JavaScript code through a global variable.

This feature is designed to make your extensions adaptable across multiple PIM instances. By externalizing configuration through Custom Variables, you can deploy the same extension code to different environments (development, staging, production) or different customer PIM instances, and simply
adjust the configuration values without modifying your JavaScript code.

```js
// Access the entire custom variables object
const config = globalThis.PIM_CUSTOM_VARIABLES;

// Access specific values
const apiUrl = globalThis.PIM_CUSTOM_VARIABLES.apiUrl;
const timeout = globalThis.PIM_CUSTOM_VARIABLES.timeout;
const features = globalThis.PIM_CUSTOM_VARIABLES.features;
```

## Error Handling

The SDK methods return promises that you can handle with try/catch:
Expand Down
3 changes: 3 additions & 0 deletions content/advanced-extensions/ui-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ If you prefer an automated deployments method, check out the [API deployment gui
- **Basic Auth**: For username/password authentication
- **Custom Header**: For custom HTTP headers

- **Add Custom variables**
- You can add custom varaibles that will be iterpreted but your extension. The accepted format is JSON.

- **Save and Activate**:
- Click "Save" to store your extension configuration
- The extension will be immediately available in the configured position
Expand Down
Loading