Hi,
The update has been released so you can get started with it now. The WordPress documentation has a detailed explanation of how hooks are used, though you can find a lot of other tutorials online.
For your case, you can use our plugin’s hook by doing the following:
1. Navigate to the wp-content/themes/yourthemename
directory and open the functions.php file.
2. Add the following line anywhere in the file, but replace ‘function_name’ with a function name of your choosing:
add_action('watsonconv_message_parsed', 'function_name');
3. Create a PHP function with the same name. This function will now be called every time a user receives a message from the chatbot, and it will be given the body of the HTTP response as an argument. This argument will be in array format, so you can access the context like this:
function get_context_variables($response) {
$context = $response['context'];
}
Feel free to ask if you have any questions.