Skip to main content

Example

Below is a very simple PHP example of what the script on the URL you have provided us with could look like. We first check that the key is valid then we use the email address and look it up in the database, and finally we print out the information we want to display.

<?php
// Check that key is valid
if($_GET['key'] != 'your-secret-key'){
exit();
}
// Will contain ticket requesters email, example: ticketrequester@gmail.com
$email = $_GET['email'];

// Lookup the email address in your database..

// Note: you can print plain text or HTML. The width of the frame in ImBox is roughly 290px, so make sure to adapt your content accordingly.
echo 'Print the information you found. The content your print will be displayed under "Your content will appear here--"';
?>

If you return HTML in your response keep the following in mind

  • All links (a-tags) will be treated as external links, meaning that any link will be opened in the agent's default web browser. If you wish to create a link to your CRM from the plugin use a regular a-tag.
  • The height of the plugin box in ImBox will automatically adjust to the height of the content you return.
  • Since all links are handled as external, your page has to be a single page. If you wish to have some sort of navigation on the page create it using JavaScript. Example, show/hide divs when different elements are clicked.
  • ImBox runs on Electron, when testing your page we recommend doing so in Chrome.