remote-config-update-user-identifier-criteria
Modify user identifier criteria in remote configurations to refine targeting across production and development environments using Hackle's $deviceId, $userId, or custom criteria.
Instructions
Updates remote config's user identifier criteria. The change will be applied to both production and development environment.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| remoteConfigId | Yes | Remote config's id. |
Implementation Reference
- src/index.ts:501-510 (handler)The asynchronous handler function that executes the tool logic by sending a PATCH request to update the remote config's user identifier criteria via WebClient.async ({ body, remoteConfigId }) => { return { content: [ { type: 'text', text: JSON.stringify(await WebClient.patch(`/api/v1/remote-configs/${remoteConfigId}/identifierType`, body)), }, ], }; },
- src/index.ts:491-500 (schema)Zod schema defining the input parameters: remoteConfigId (number) and body containing userIdentifierCriteria (string).{ remoteConfigId: z.number().positive().describe("Remote config's id."), body: z.object({ userIdentifierCriteria: z .string() .describe( 'User identifier criteria for targeting. You can use criteria provided by Hackle($deviceId, $userId) or your own criteria created at Hackle dashboard website.', ), }), },
- src/index.ts:489-511 (registration)Registration of the 'remote-config-update-user-identifier-criteria' tool using server.tool(), including name, description, schema, and inline handler.'remote-config-update-user-identifier-criteria', "Updates remote config's user identifier criteria. The change will be applied to both production and development environment.", { remoteConfigId: z.number().positive().describe("Remote config's id."), body: z.object({ userIdentifierCriteria: z .string() .describe( 'User identifier criteria for targeting. You can use criteria provided by Hackle($deviceId, $userId) or your own criteria created at Hackle dashboard website.', ), }), }, async ({ body, remoteConfigId }) => { return { content: [ { type: 'text', text: JSON.stringify(await WebClient.patch(`/api/v1/remote-configs/${remoteConfigId}/identifierType`, body)), }, ], }; }, );