You are here: Integrating with External CRM > Configuring External CRM Triggers > Example of a CRM Trigger

Example of a CRM Trigger

The following example illustrates the use of the CRM Trigger tab.

Figure 133 illustrates a trigger specification.

Figure 133: Integration, CRM Trigger tab, example trigger

In Figure 133:

Example 1 shows a PHP script invoked by the trigger illustrated in Figure 133.

Example 1: Example PHP script invoked by a Virtual Contact Center CRM Trigger

/* 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 named myfile.txt.

 

See Also

 


Send us your Feedback