Yii-Zendesk is a helper class for using the zendesk API.
Helper functions include finding user by email, finding ticket by user, find ticket by id, find all users and find all tickets. Extension also includes sorting function and a curl wrapper function for custom API calls.
Yii 1.1 or above, valid ZenDesk account and access to the API Key.
Load using config main
'components' => array( ............ 'zendesk' => array( 'class' => 'ext.zendesk.ZenDesk', 'token' => 'XXXXXXXXXXXXX', //From ZenDesk Account Settings 'email' => 'firstname.lastname@example.org', //Account associated with ZenDesk 'subdomain' => 'mycompanyname' //From ZenDesk Account ),
$zendesk = Yii::app()->zendesk; $emails = CHtml::listData($customer->userEmails,'id','email'); $zenDeskData = $zendesk->search( $zendesk->findTicketsByEmailCriteria($emails) ); $tickets = $zenDeskData->results;