Hello
We have a problem making url integration work with liveagent form qualityunit with the following.
We want to call an API working like this : (see example on
API docs
Code:
Example of calling POST request
//next example will insert new conversation
$service_url = 'http://example.com/api/conversations';
$curl = curl_init($service_url);
$curl_post_data = array(
'message' => 'test message',
'useridentifier' => 'agent@example.com',
'department' => 'departmentId001',
'subject' => 'My first conversation',
'recipient' => 'recipient@example.com',
'apikey' => 'key001'
);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_post_data);
$curl_response = curl_exec($curl);
if ($curl_response === false) {
$info = curl_getinfo($curl);
curl_close($curl);
die('error occured during curl exec. Additioanl info: ' . var_export($info));
}
curl_close($curl);
$decoded = json_decode($curl_response);
if (isset($decoded->response->status) && $decoded->response->status == 'ERROR') {
die('error occured: ' . $decoded->response->errormessage);
}
echo 'response ok!';
var_export($decoded->response);
and we have set up the integration as post like this :
Code:
https://ourwebsite.com/support/api/index.php?handler=conversations
message=[PLAN_NAME]
useridentifier=email@ourwebsite.com
subject=oursubject
department=Department001
recipient=[EMAIL]
do_not_send_mail=Y
apikey=xxxxxxx
However this does not work with CBsubs.
Is this integration compatible with the above suggested post code ?
Do we have to set fields between quotes or something else ?
Thanks for helping