Jump to content

OpenTicket API set admin name


Eduardo G.

Recommended Posts

Hi! I'm using OpenTicket local API call to automatically create a ticket for a client.
I want to create the ticket as admin, but cant find the way to set admin username in the ticket (`admin` column in `tbltickets` table)

There's an admin bool parameter: "Is an Admin opening the ticket" that I set to true, but nothing changes.
In the end, OpenTicket keeps creating ticket as client, not as admin.

Can you hel me creating an admin ticket?

 

Link to comment
Share on other sites

$postData = array (
    'deptid' => '1',
    'subject' => 'This is a sample ticket',
    'message' => 'This is a **sample** ticket message',
    'clientid' => '1',
    'priority' => 'Medium',
    'markdown' => true,
    'admin' => true
);

$results = localAPI ('OpenTicket', $postData, 'admin');
print_r ($results);

This code will create an admin ticket via the admin account "admin" for client ID 1.

Link to comment
Share on other sites

Thanks, @string

I think I've see the problem: when I look at ticket list from the admin panel I see the Submitter column shows the client name, which is not the submitter.

But then when I open that ticket from client area I see the sender is a Staff member.

So I think it was warking before but admin panel was showing wrong submitter.

 

Link to comment
Share on other sites

  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated