handleInject function in the Endpoint settings or via CLI.
Restrictions
- The inject transformer is supported only for webhook- and socket-based Endpoints.
-
The return value is validated against a set of rules. If these rules aren’t met, the transformer throws an error. The following rules apply:
userIdis a string with up to 256 characters.sessionIdis a string with up to 256 characters.textis a string with up to 10,000 characters.datais an object.
Transformer Function Arguments
The following table shows an overview of the function arguments:Endpoint Configuration Object
endpoint Object Properties
endpoint Object Properties