Transforming User and account data with the ProcessorUpdated 09/12/2019


The Processor connector gives you the flexibility you need to transform the data according to your needs. Inside the connector, you can write javascript code on Users and Accounts respectively with the Processor connector and the Account Processor connector.

How to configure the Processor

Start by installing Hull's Processor Connector. Give it a name and a description. Then, select the User segments on which you want to apply your code:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/62015d96-c7e3-48e0-829e-b9c2c6eea3f3/processor_user.png

You can add custom variables that you want to use directly inside your Processor code. For instance, define a variable name called api_key that will take as a default value 25kt and access it inside the processor as variables.foo. Note that these custom variables can only be defined as strings.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/19680aee-8347-4be5-8424-2ff4818a4942/processor_account.png

How to configure the Account Processor

Start by installing Hull's Account Processor Connector. Give it a name and a description. Then, select the Account segments on which you want to apply your code:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/44fc13d6-09b3-47c9-adc0-dda4c9dc363a/account_filter.png

You can add custom variables that you want to use directly inside your Processor code. For instance, define a variable name called api_key that will take as a default value 25kt and access it inside the processor as variables.foo. Note that these custom variables can only be defined as strings.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/ced45d83-31ab-4720-a201-d60de0769327/Screenshot_2019-12-03_at_10.45.37.png

How to transform User and Account data using the Processor

Once you have configured either your User or Account Processor connector, you can start coding. To do open the Code editor using the button inside the Overview page of the connector:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/598910c1-d68e-4de7-8e8a-d07c00e1f642/Screenshot_2019-12-03_at_17.21.03.png

To have input data, you need to load the payload on the left by selecting a user email or user id. Then, apply some code in the Code section in the middle.

You will be able to see the results of your code inside the Console section on the right.

Note

We recommend you read the full documentation for these connectors to get a good understanding of the proper way to manipulate data

⚠️ Warning ⚠️:

You can test the code as much as you want. Unless you hit the Save button, the code will not impact the data flow.