Shown below are details of all the Campaign Management operations available in the RouterNET API:
The first thing any application driving Softdial Campaign Manager™ Server should do is register for a list of configured campaigns. This is achieved by calling the CampaignManagerClass method Status Request [SR], passing the Tenant Descriptor (TD), Originator Identifier (OI) and a user-generated Transaction ID (TX) parameter.
This will yield a Status Broadcast [SB]event. This event will identify the tenant and transaction, and will contain the a Data (DT) parameter containing an XML document.
Using Dialer Chat we can see the format of this Status Broadcast [SB] message:
CM:DE:SB\TDdefault\TX1\DT<CampaignStatus Time="2012-05-22T08:01:58Z"><Campaign ID="1" Name="TestCampaign" State="2" Type="0" Cache="200" LinkMaster="" IsLocked="false" LockTag="" LockTime="" Agents="0" CallsMade="20" ListRemaining="9979" ListTotal="10000" RunoutEstimate="9780" RetriesRemaining="12" PPState="2"/></CampaignStatus>\TS41051.334708
Status Broadcast [SB] is sent every 10 seconds until method Stop Status Request [SS] is invoked for the same Transaction ID (TX). Applications can choose to take a one-shot request for information by invoking Status Request [SR] followed by Stop Status Request [SS]. If the Status Request [SR] transaction is left open the driving application can take a running object table approach which will involve updating the table on receipt of every Status Broadcast [SB] event.
While an OriginatorIdentifier (OI) parameter is not required for all SDMP2 messages, it is recommended to make a habit of always adding this parameter to avoid issues where it is required.
The XML document is delivered in the Data (DT) parameter to the Status Broadcast [SB] event is a text string with no whitespace or carriage returns. In order to transmit XML via the SDMP API, backslash characters in XML element and attribute data are translated to the relevant XML escape sequence.
When the Status Broadcast [SB] event Data (DT) parameter is formatted it can be seen to contain a collection of Campaign type elements for each campaign configured in Softdial Campaign Manager™ server.
<CampaignStatus>
<Campaign ID="3" Name="linkmaster" State="0" Type="0" Cache="0" Agents="0" CallsMade="65" ListRemaining="0" ListTotal="0" RunoutEstimate="0"/>
<Campaign ID="4" Name="linkslave" State="0" Type="0" Cache="0" Agents="0" CallsMade="1859" ListRemaining="0" ListTotal="0" RunoutEstimate="0"/>
<Campaign ID="5" Name="_Low Balance Warm" State="0" Type="0" Cache="0" Agents="0" CallsMade="0" ListRemaining="0" ListTotal="0" RunoutEstimate="0"/>
<Campaign ID="6" Name="_Low Balance 90 Day" State="0" Type="0" Cache="0" Agents="0" CallsMade="0" ListRemaining="0" ListTotal="0" RunoutEstimate="0"/>
<Campaign ID="7" Name="_Low Balance 180 Day" State="0" Type="0" Cache="0" Agents="0" CallsMade="0" ListRemaining="0" ListTotal="0" RunoutEstimate="0"/>
</CampaignStatus>
The description of attributes for the Campaign type is:
Attribute | Description | Data Type |
---|---|---|
ID | Integer ID for the campaign. This is the ID used for referencing campaigns throughout the Softdial Campaign Manager™ API. | Integer |
Name | The campaign name | String |
State |
An enumeration showing the campaign's current state. Valid values are:
|
Integer Enum |
Type |
The type of campaign. (Not the same as the Dialing Mode (DM) parameter value) Valid values are: 0 - Outbound Predictive 1 - Outbound Progressive 2 - Outbound Preview (dialer-directed) 3 - Inbound 6 - Agentless |
Integer Enum |
Cache | The number of records currently in cache. If the campaign is not running this value is 0. | Integer |
Agents | The number of agents logged in and available | Integer |
CallsMade | The count of calls made in total on the campaign | Integer |
ListRemaining | The number of undialed records in this campaign. This value is only populated when the campaign is running. When not running contains 0. | Integer |
ListTotal | The total number of records in this campaign. This value is only populated when the campaign is running. When not running contains 0. | Integer |
RunoutEstimate | The estimated time to run out of data based on the current number of agents logged in and data burn rate. An integer value in minutes. This value is only populated when the campaign is running. When not running contains 0. | Integer |
See also SDMP Message Protocol
Having got a table of campaign ID / name references it is possible for the driving application to get and set properties of a campaign. The get and set operations need to lock access to the campaign before performing the get/ set operation.
Configuration is set via the
A successful call will yield the Property Data [PD] event with a Data (DT) parameter containing a large XML document with the property set for that campaign. For details of the XML document format for properties please refer to Campaign Properties XML.
The
To create a campaign, call the Add Campaign [AC] method, passing the following parameters:
Note the absence of the Campaign Identifier (CY) parameter. Softdial Campaign Manager™ Server assigns the campaign identifier. In order to perform further actions against the campaign the campaign ID will need to be acquired as described above.
The XML parser in Softdial Campaign Manager™ is a non-validating parser which means it is possible to specify an XML document with elements missing on create. In the case of missing elements Softdial Campaign Manager™ will provide default data values.
A campaign may be deleted, but only if it is in a closed state. To delete a campaign call the Delete Campaign [DC] method, passing the following parameters:
A campaign can be renamed, but only if it is in a closed state. To rename a campaign, call the Rename Campaign [NC] method, passing the following parameters:
All job management methods require passing the following parameters:
The choice of whether to implement synchronisation for these methods is left to the user. To implement synchronisation, the Token (TK) parameter should be set and the Message Verify [MV] and Error Report [ER] events should be handled to indicate success or failure.
The job management methods are:
Method | Description |
---|---|
|
Starts the campaign |
|
Requests the campaign be brought to an orderly halt |
|
Brings the campaign to an abrupt halt and will result in loss of result data. To bring a campaign to an abrupt halt whilst preserving data integrity the Softdial CallGem™ management interface Kill Campaign [KC] method should be used instead |
|
Performs a cursor reload on the main recordset for outbound campaigns. It has no use on inbound campaigns |
|
Requests the campaign to be brought to a suspended state |
|
Brings the campaign back to a running state from a suspended state |
Softdial Campaign Manager™ Server manages server-side connections to databases via ODBC. In order for a client application to validate DSN, table and column names, an interface is provided:
To get a collection of Data Source Names (DSNs), call the Get DSNs [GD] method, passing the following parameters:
Any valid Campaign Identifier (CY) may be used but we suggest that, in order to support future Softdial Campaign Manager™ developments, the user ensures the ID passed is the ID for the campaign that will be using one of the data sources returned.
The DSN Data [DB] event will return a simple XML collection of items in the Data (DT) parameter. Iterating the children of the DataSourceNames element in this collection will list the data sources configured on the server.
To get a collection of tables against a given data source, call the Get Tables [GT] method, passing the following parameters:
The Table Data [TB] event will return a simple collection of items in the Data (DT) parameter. Iterating the children of the TableNames element in this collection will list the tables and views that the specified data source and schema contains.
To get a collection of columns against a given table or view, call the Get Columns [GC] method, passing the following parameters:
The Column Data [CB] event will return a collection of items in the Data (DT) parameter. Iterating the children of the DatabaseColumnList element in this collection will list the columns that the specified table contains. Each Item element references a column with attributes as follows:
Attribute | Description | Type |
---|---|---|
Name | Column name | String |
Nullable | Whether the column allows nulls | Boolean (stored as true/ false string) |
Data Type | The ODBC data type for the column | Integer |
Data Length | The length of the data in the column (or max length in the case of varchar type columns | Integer |
Precision | The number of places of precision for decimal number types. | Integer |