opendns / autotask-php

A PHP SOAP wrapper for the Autotask Web Service API
BSD 3-Clause "New" or "Revised" License
61 stars 33 forks source link

Ticket note creator name #103

Closed Dunnestein closed 6 years ago

Dunnestein commented 6 years ago

Hi all,

First off, thank you for this client! I really appreciate the efforts you people have put into this.

I have a little problem linking a ticket note to the note creator when the note creator is the customer logged in via the Autotask portal. When I use a query to get all the ticket notes for a particular ticket I get all ticket notes returned in an array. But for the ticket notes created by the customer via the portal I get the following object back in the array (removed any privacy info):

[CreatorResourceID] => [Description] => Customer description. [LastActivityDate] => 2018-03-20T07:58:01.626 [NoteType] => 18 [Publish] => 1 [TicketID] => 12345 [Title] => Note title. [Fields] => [UserDefinedFields] => ATWS\AutotaskObjects\ArrayOfUserDefinedField Object ( [UserDefinedField] => ) [id] => 12345678

As you can see the CreatorResourceID is empty. That is to be expected as the customers entity is a contact. But I can't see or find a way to link this note entry to the contact that actually created this note. When I log in to Autotask I can see the note, and the correct contact is shown, so somewhere the relationship should exist at least in the portal, I hope also in the API.

Some additional information, I use an API only Autotask account. My goal is to provide our customers with the ability to see/create/edit tickets in our customer portal to give them a one stop experience. I use the following code to build the query to get the ticket notes:

public function getTicketNotes($ticketID)
{
    $query = new Query('TicketNote');
    $ticketIDQueryField = new Queryfield('TicketID');
    $ticketIDQueryField->addExpression('Equals',$ticketID);
    $query->addField($ticketIDQueryField);

    $noteData = $this->client->query($query);
    $noteData = $noteData->queryResult->EntityResults->Entity;
    if (!is_array($noteData)){
        $noteData = array($noteData);
    }
    return $noteData;
}

Does someone maybe have an idea how I could get the correct contact (FirstName, MiddleName, LastName) information for the contact that created the note in the ticket? Any help will be greatly appreciated!

With kind regards, Dunnestein.

devinhyden commented 6 years ago

@Dunnestein Whoa. I was taken aback by this. I can confirm your findings and do not have a recommendation other than reaching out to Autotask. It's really odd they map that data within the UI, but do not present it in the API.

I am very interested, please share your findings.

Dunnestein commented 6 years ago

@SirPoot- Thank you for your response! I have created a ticket with Autotask and will keep you updated on the progress.

Dunnestein commented 6 years ago

Update on 23-03-2018: No word back yet from Autotask, it is EOB here in Europe. Chatting with a support technician learned that the ticket was not assigned yet. They will do that now, I will await further feedback from Autotask and keep this ticket (or comment) updated.

devinhyden commented 6 years ago

@Dunnestein Thanks for the update. If a ticket was created, it set your exceptions, it will be a while (most likely weeks) until you get feedback.

Dunnestein commented 6 years ago

@SirPoot I got a response back from Autotask, in short: "We have reviewed the available options to - somehow - provide you with an option to report on the Ticket Note's initiating Contact ID, or any other detail that could help you to identify the source of these entities, if they are not added by an internal resource of yours.

Unfortunately, after further review, we have found, that the API is currently not providing with such an option, and also the previously mentioned sorting is quite difficult to achieve (note: I took the opportunity to ask for API data sorting as well :)). This happens, because the API is primarily focused on interacting with the database via integrations and it is not built around reporting on the data in your database. Therefore, you may have information that cannot be pulled via the API, such as the Ticket Note's Contact.

The normal process of requesting the availability of such a feature in the future would be submitting a feature request in our brand new community forum."

So I did just that, submitted 2 'idea's': API sorting Ticket note contact info The idea is that people can vote (give kudo's) to ideas, and the most popular will hopefully get realized. So I can only ask people who land on this issue to vote for these ideas.

@SirPoot I will leave it to you to decide what to do with this issue. I don't see this getting sorted anytime soon so I'm perfectly fine with you closing this ticket. I can always update it (right?) when I do get some feedback on my 'ideas'. Thank you anyway for your quick responses and all the good work!

reynolek commented 6 years ago

Going to close this issue. Hopefully one day they will add in what you are looking for!