-
Notifications
You must be signed in to change notification settings - Fork 22
DoSomething Zendesk
A module to interact with the Zendesk PHP API Client Library: https://github.com/zendesk/zendesk_api_client_php
The repository https://github.com/zendesk/zendesk_api_client_php should be cloned into the Drupal libraries directory with directory name "zendesk".
Within the libraries/zendesk directory, run composer install (Need Composer installed locally to do this) to install the Zendesk PHP API library. This will generate a vendor/autoload.php file, which dosomething_zendesk_libraries_info references to load the Zendesk PHP API Client Library.
The dosomething_zendesk_form provides a form to create a new Zendesk ticket, setting the ticket requester as the authenticated user. If an anonymous user is viewing the form, the form will prompt for email.
A Zendesk ticket must be associated with a Zendesk user. The function dosomething_zendesk_verify_zendesk_user checks to see if a Zendesk User exists for the email (either inputted or belonging to the global $user), and creates a Zendesk User if one does not exist (see dosomething_zendesk_create_zendesk_user). The Zendesk User is then stored in the ticket object to be submitted to the API.
The dosomething_zendesk_form accepts a Node object as a parameter, which can be used to set other Ticket properties.
A Drupal variable may be stored for the Node the form is being rendered on, to specify a specific Zendesk Group ID to assign the Ticket to: dosomething_zendesk_get_group_varname.
If the variable does not exist, the dosomething_zendesk_form function will check to see if the given Node has been assigned a Primary Cause term. Each Primary Cause term has a Drupal variable for a corresponding Zendesk Group ID to create the ticket for. If one exists, the Ticket will be assigned to this Group.
If the given Node is a staff pick, the Ticket will be assigned high priority. Otherwise, it is not assigned a priority.
Check out the Engineering Blog!
- Building your local Environment
- NFS
-
SSHFS— Deprecated - Troubleshooting
- Environment breaking changes
- Troubleshooting your local
- Bender
- Backend Development
- Conventions
- Solr information
- DoSomething Profile
- Contrib Modules
- DoSomething Modules
- Fender
- Front End Development
- Forge Pattern Library
- Testing
- General information
- Xdebug Guide
- Vagrant
- Disc performance benchmark
- Vagrant and file sharing(SSHFS)
- Documentation
- Memorable pull requests
- Documenting on this Wiki & in Code
- 2016 Product Wiki
- Product information
- Faking your geo location
- For local dev: Fastly header information and configuration
- For everywhere else: VPN Server for Testing International Sites
- Translations
- Making content translatable
- Localization Guidelines
- Old International Setup Resources archive
- Setting up international