• Resolved Wade

    (@shoreywd)


    I’ve been trying to assign support agents to tickets when creating a new ticket via the SupportCandy REST API. However, it seems to be ignoring the assigned_agent field and not assigning any agents. My code looks similar to this:

    CURLOPT_POSTFIELDS => array(
        'name' => $user->first_name.' '.$user->last_name,
        'email' => $user->user_email,
        'subject' => 'Ticket Subject',
        'description' => 'Ticket Description',
        'category' => '7',
        'assigned_agent' => '1'
    ),

    The name, email, subject, description, and category all get filled in correctly but the assigned agent field gets left blank. Per the SupportCandy docs, the assigned_agent field should get sent as a comma-separated list as a string, but no matter how I’ve formatted it the API does not return any errors and leaves the field blank.

    I know that there is a premium plugin for automatic agent assignment, but that is not what I am trying to accomplish here. I’m looking to manually assign users via the REST API per the documentation. Is there anything that I am missing or doing incorrectly?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author SupportCandy

    (@supportcandy)

    Hello @shoreywd

    You will need to add assigned agent to ticket form in order to use it from create ticket api. Also, if your apis are being called from customer accounts, you also need to enable assigned agent field for customer in the ticket form.

    Thread Starter Wade

    (@shoreywd)

    This helped, thank you! Custom Fields->Ticket Form Fields did not have “assignee” and it worked normally after adding it there.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Assigning Agents Via REST API Not Working’ is closed to new replies.