Topic by Mark Bradley
Does any caching occur on the RightNow side when using cURL in a custom process script? I have a custom process on Contact Update with the important bits of the script below.
Obtain values...
$contactId = $obj->ID;
$retailerUsername = $obj->CustomFields->Retailer->Username;
$retailerPassword = $obj->CustomFields->Retailer->password;
$retailerId = $obj->CustomFields->c->storerefnum;
Build array...
$post = array(
'app_key' => $app_key,
'contact_id' => $contactId,
'email' => $retailerUsername,
'password' => $retailerPassword,
'retailer_id' => $retailerId
);
cURL stuff...
load_curl();
$cURL = curl_init();
curl_setopt($cURL, CURLOPT_URL, $url);
curl_setopt($cURL, CURLOPT_POST, 1);
curl_setopt($cURL, CURLOPT_POSTFIELDS, $post);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($cURL);
curl_close($cURL);
Manually testing the script in the script editor and setting the password in the test harness seems to work ok. 4 requests were received by the endpoint with the correct password values. However, when I test the script via the contact screen I get intermittant problems.
One batch of 4 test saves of the contact record had the following 4 password values...
PassScreen1234, PassScreen12345, PassScreen123456, PassScreen1234567
The endpoint received...
PassScreen1234, PassScreen12345, PassScreen12345, PassScreen12345
Another set of tests went with
Password1234, Password12345, Password123456, Password1234567
And the endpoint received...
Password1234, Password12345, Password123456, Password1234
Anyone seen behaviour like this or have any suggestions as to what exactly is going on here?
Cheers,
Mark