Example of a CRM trigger

The following 8x8 Contact Center example illustrates a trigger specification in 8x8 Configuration Manager by going to Integration > CRM Trigger tab.

In the above image:

  • <myServer.net> specifies a valid HTTPS server
  • <acct_add.php> specifies a PHP script that creates a log file of the account ID written to myfile.txt

The following example shows a PHP script invoked by the 8x8 Contact Center CRM trigger illustrated in the above image.

/* acct_add.php – log creation of new accounts*/

<?

if(is_file('myfile.txt')) {

  $fp = fopen('myfile.txt','a+');

}

else {

  $fp = fopen('myfile.txt','w');

}

if($fp) {

  $now = date( "[m/d/Y H:i:s] – ", time());

  fwrite($fp, $now.'AccountID: '.$AccountID." – action: CREATE CUSTOMER\n");

  fclose($fp);

}

The script reads the account ID referenced by an agent interaction, and writes the account ID to a file called myfile.txt.

Concept Link IconSee Also