Setup Ticket Form

Embeddable ticket form in CRM is a predefined form for tickets added in version 1.8.0 which you can add to your websites with an iframe and when a user submits the form the ticket will automatically open a ticket in the system. You can use this form eq for a way your customers to contact you or offer support via this form on multiple websites.

Imagine you have 5 websites, you can embed the form in all 5 websites and in this case all the form submits will be created as a ticket in your CRM installation, in this case all your staff members/sales agents will be able to view the requests send and take appropriate actions in no time. If the email field in the ticket form already exists as a contact in CRM under specific customer, the system will auto add this ticket to this contact.

You can even add custom fields in the form, in Setup->Custom Fields if you create a custom field that belongs to tickets, a new checkbox will be shown at the bottom Show on ticket form, tick this checkbox if you want this custom field to be shown on the ticket form.

The form URL can be found at Setup->Settings->Support->Ticket Form.

The system will automatically show you a sample iframe embeddable code which you can copy and paste in your website.

Redirect User to Custom URL After Form Submission

Via FTP/cPanel go to application/helpers/ and create (if don’t exists) file my_functions_helper.php and add the following code snippet:

add_action('ticket_form_submitted','my_ticket_form_submitted_redirect_to_custom_url');

function my_ticket_form_submitted_redirect_to_custom_url($data){
    echo json_encode(array(
      'success'=>true,
      'redirect_url'=>'http://yourcustomurl.com'
    ));
    die;
}

Don’t forget to include the <?php opening tag at the top of the file if it’s not already added.

Styling

If you need to style the color of the input fields to fit with your website you can create custom.css file in assets/css and apply the necessary styles.

Example changing inputs border color:

body.ticket_form input {
border-color:red;
}

Example changing submit button background color:

body.ticket_form #form_submit {
background:red;
}

body.ticket_form #form_submit:hover,
body.ticket_form #form_submit:active {
background:green;
}

Passing department ID in URL (from v2.1.1)

If you are using the ticket form to a multiple URL’s where on each URL you need to send the ticket to a different department without the user that is filling the form knowing this, you can pass parameter in the ticket form URL to achieve this.

For example, let’s assume you have 2 different departments Billing and Technical Questions and the ticket form is placed on different landing pages or sections on your website corresponding to the department and you want each time the user fills the form e.q. on Billing landing page or section the ticket to go straight into the Billing department without the user knowing this.

The first step you need to make is to get the department ID in Setup->Support->Departments, on the table first column you will be able to see the department ID, for this example let’s assume that your Billing department has ID with number 1.

After you get the department ID, you should modify your ticket form URL to https://your-crm-installation.com/forms/ticket?department_id=1

If you visit the URL you will be able to see that the department field is hidden but the Billing department will be pre-selected and the ticket will go straight to the Billing department.

You can repeat this step for an unlimited number of departments, you will only need to change the department ID parameter.

Add custom form HTML, Eq. logo

In application/helpers create a file (if don’t exists) and add the following code:

hooks()->add_action('ticket_form_start','my_ticket_form_start');
function my_ticket_form_start(){
    echo '<img src="https://yourwebsite.com/logo.jpg">';
}

Don’t forget to include the <?php opening tag at the top of the file if it’s not already added.

Keep in mind that you will need to change the logo URL.

When placing the iframe snippet code there are few things you need to consider.

  1. If the protocol of your CRM installation is HTTP then use a HTTP page inside the iframe.
  2. If the protocol of your CRM installation is https than use an https page inside the iframe.
  3. Summarized will be no SSL CRM installation will need to place the link in no SSL eq landing page and backward, SSL websites with SSL Perfex CRM installation and no SSL website with none SSL Perfex CRM installation.

Did you find this article useful?

  • Email Piping / Auto Importing Tickets

    Email Piping is a feature in Perfex CRM to auto open or reply to ticket from email. You can’t...
  • Ticket Services

    Ticket services is a feature in CRM that allows your customer to select to what service/product thi...
  • Departments

    To configure your support system departments, navigate to Setup-> Support -> Departments...
  • Auto Close Tickets

    CRM offers you the ability to auto close inactive tickets for a certain time. This option is locate...
  • Ticket Email Templates

    You can easily customize all ticket email templates by going to Setup -> Email Templates -&...