Feedback

  • Contents
 

IS_Action_QueryContactList

Definition

Queries the specified contact list for records. Use with care. If used inappropriately this action could impede the performance of a script, or affect the performance of a database server.

Attributes

All of the following attributes are required:

statement

The sql query that will run against the specified contact list.

connectionid

The id of the connection associated with the contact list in the dialer_config.xml. The connectionId can be found in the dialer_config.xml by searching for a DIALEROBJECT with type="10". Below is an example of the default connection in dialer_config.xml.

<DIALEROBJECT id="{A0000000-0000-0000-0000-000000000000}" type="10" rev="2">
	<PROPERTIES>
		<udldataset>example.udl</udldataset>
		<dbms>0</dbms>
	</PROPERTIES>
</DIALEROBJECT>
displayname

The name of the contact list as defined in Interaction Administrator.

tablename

The database table name of the contact list.

callback

This function will be called once the query has returned. The associated records will be returned as a parameter of the callback.

Example

function queryContactList() {
  IS_Action_QueryContactList.tablename = “ContactListTable1”;
  IS_Action_QueryContactList.displayname = “ContactList1”;
  IS_Action_QueryContactList.connectionid = "{A0000000-0000-0000-0000-000000000000}";
  IS_Action_QueryContactList.statement = “select i3_identity, status, zone, phonenumber from ContactListTable1”;
  IS_Action_QueryContactList.callback = contactsReturnedCallback;
  IS_Action_QueryContactList.click();
}
function contactsReturnedCallback(contacts) {
  //The returned contacts could be used here for various purposes, such as populating a table with each record.
}