How You Use the pre_pta_convert Hook

You can use a pre_pta_convert hook that runs after the data has been decoded and converted into an array, and before it is converted to the correct pair data structure.

This lets you modify the PTA data sent in the URL on the fly without having to decrypt and convert it yourself.

In this hook, a single parameter named “decodedData,” which is in the form of an array, is passed. This example shows the data in the URL in the first line and the decoded/decrypted data passed to the hook by reference in the second line.

JnBfdXNlcmlkPXVzZXJuYW1lJnBfZW1haWw9dGVzdEBleGFtcGx lLmNvbQ**
[p_userid => 'username', p_email => 'test@example.com']

Any modifications to the array are picked up by the PTA controller when the data is converted into contact API pairs.