HelpSpot Help Desk Software | HelpSpot Blog | HelpSpot Support

API: privagte.request.create creates post with name of API user, not customer


#1

I’m using private.request.create as the primary method for bringing customer requests into Helpspot. Everything seems OK, except there is one small oddity. In the Inbox and My Queue views the request lists the correct customer name, email and User ID values. However when viewing the full ticket, the initial post shows up in the request’s history as if the “API user” posted the message, and it shows as a “private note”. The staff reply goes to the customer, so it’s not a big deal, but it is a little confusing and odd, especially to staffers new to HelpSpot.

The request data is sent via HTTP_POST, using basic authentication using curl in PHP. For example:

curl_setopt($curl, CURLOPT_USERPWD, ‘example@example.com:abc123’);
curl_setopt($curl, CURLOPT_URL, $this->helpSpotApiURL);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $queryString);
$queryString is this string
xCategory=2&email_from=2&sFirstName=Test&sLastName=Guy&sEmail=test%40example.net&sTitle=%5BCE%5D+Contact%3A+Support&tNote=This+is+a+test+ticket.%3Cbr+%2F%3E%0A%3Cbr+%2F%3E%0A97.125.45.105%3Cbr+%2F%3E%0A%3Cbr+%2F%3E%0A&fNoteIsHTML=1&fOpenedVia=7&method=private.request.create&output=xml

In this example, the request will have “Test Guy” as the customer name, and the staff reply will go to test@example.net. But looking at the Request History, the first post (i.e. the bottom item in the Request History) will show up with the name of the staff user account matching the example@example.com authentication info.

How can I rectify this?


#2

Hi Max,

Sorry for the delay on this. Yes, you need to set xPersonOpenedBy = 0 that will tell the system that the “customer” is opening it and not the user connecting to HS which is the default.


#3

Ah great, a simple answer to a long question! Works perfectly. Thanks!


#4

That should be in the API docs. Please. :slight_smile:


#5

I added it a few days ago actually to the doc definition page, but I’ll go ahead and put a note in with that methods docs as well since it’s probably something people want to use :slight_smile:


#6

I think I never noticed the API Field Definition document before. Nice.


#7

I did notice it, but the wording for that particular field didn’t catch my eye in that way – after all the request record was showing up with the correct customer info, just that initial message in that request was showing up incorrectly.