You are here: Integrate with External CRM > Configure External CRM Triggers > Example of a CRM Trigger

Example of a CRM Trigger

The following example illustrates a trigger specification via Integration > CRM Trigger.

In the above image:

The following example shows a PHP script invoked by the Virtual 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.

See Also

 


Send us your Feedback