1. Kayako Download customers: we will continue to develop and support Kayako Download beyond July 2017, alongside the new Kayako for existing customers.

    Find out more.

  2. The forum you are viewing relates to Kayako Classic. If you signed up or upgraded to the new Kayako (after the 4th July 2016), the information in this thread may not apply to you. You can visit the forums for the new Kayako here.

PHP API Class - Replying to a Ticket

Discussion in 'Developing, APIs and extending' started by keliix06, Jul 23, 2012.

  1. keliix06

    keliix06 Established Member

    I'm having a little trouble getting the PHP API class to reply to a ticket. First I call

    $ticket = kyTicket::get('***');
    $creator = kyUser::search('***');
    That code returns everything as expected.

    So then I call

    kyTicketPost::createNew($ticket,$creator,'this is another reply');

    I know that's not set to send anything, I'm just testing what's returned. This is what I get

    So the creator isn't passed from what I can see. If I change it to
    kyTicketPost::createNew($ticket,$creator,'this is another reply')->create();

    I get

    Enabled debugging, this is what I get

  2. keliix06

    keliix06 Established Member

    Just had an epiphany while looking at what was being returned. I changed the $creator line to

    $creator = kyUser::search('***')->first();
    and it worked.

Share This Page