com.genesyslab.ail
Interface OutboundRecord

All Superinterfaces:
IdObject, Possible

public interface OutboundRecord
extends Possible

Describes the contact of an outbound campaign.


Nested Class Summary
static class OutboundRecord.Action
          Actions that are possible on an outbound record.
static class OutboundRecord.CallbackType
          Constants for the different types of callback.
static class OutboundRecord.CallResult
          Enum for the possible results of the call handling.
static class OutboundRecord.PhoneType
          Constants for the phone types.
static class OutboundRecord.Status
          Constants describing the status of a record.
 
Nested classes/interfaces inherited from interface com.genesyslab.ail.IdObject
IdObject.ObjectType
 
Method Summary
 void cancel()
          Determines that this record (and only this one) does not need any call.
 OutboundRecord clone(java.lang.String phoneNumber)
          Returns a copy of this record.
 void doNotCall(java.lang.String reason)
          Prevents this record (and only this one) from being dialed by any campaign.
 java.lang.String getCallingListName()
          Returns the name of the current calling list.
 OutboundRecord.CallResult getCallResult()
          Returns the result of this call.
 OutboundCampaignInfo getCampaignInfo()
          Returns the campaign that handles this record.
 java.lang.String getContactMediaType()
          Returns the contact's media type.
 java.lang.Object getCustomField(java.lang.String field_name)
          Returns the object associated with this parameter.
 java.util.Map getCustomFields()
          Returns the custom fields for this record.
 java.lang.Integer getDailyFrom()
          Returns the beginning of the time frame when this contact can be called, in seconds from midnight.
 java.lang.Integer getDailyTill()
          Returns the end of the time frame when this contact can be called, in seconds from midnight.
 OutboundChain getOutboundChain()
          Returns the OutboundChain this record belongs to or null.
 java.lang.String getPhone()
          Returns the phone number for this record.
 OutboundRecord.PhoneType getPhoneType()
          Returns the phone type for this record or null if not available.
 int getRecordHandle()
          Returns an integer used as an ID (handle) for this record.
 OutboundRecord.Status getStatus()
          Returns the current status of this record.
 java.lang.String getTimeZone()
          Returns the time zone ID, or null if not available.
 int getTimeZoneOffset()
          Returns an integer value for the timezone offset from GMT, in hours.
 void reschedule(java.util.Calendar calendar, OutboundRecord.CallbackType callbackType)
          Reschedules a call for later.
 void setCallResult(OutboundRecord.CallResult result)
          Sets the result of the current call for this current record.
 void setCustomField(java.lang.String field_name, java.lang.Object value)
          Sets a custom field in the record and updates it in the Outbound Contact Server.
 void setCustomField(java.lang.String field_name, java.lang.Object value, boolean update)
          Sets a custom field in the record.
 void setDailyFrom(java.lang.Integer from)
          Sets the beginning of the time frame when this contact can be called, in seconds from midnight.
 void setDailyTill(java.lang.Integer till)
          Sets the end of the time frame when this contact can be called, in seconds from midnight.
 void setPhone(java.lang.String phone_number)
          Sets the phone number of the customer in the phone field of the current record.
 void setPhoneType(OutboundRecord.PhoneType phoneType)
          Sets the phone type.
 void setTimeZone(java.lang.String timeZoneID)
          Sets the time zone ID, which have already been declared in the Configuration Layer.
 void setTimeZoneOffset(int offset)
          Deprecated. Use setTimeZone(String) instead.
 void update()
          Requests an update of this record with the values of the Outbound Contact Server database.
 
Methods inherited from interface com.genesyslab.ail.Possible
arePossible, isPossible
 
Methods inherited from interface com.genesyslab.ail.IdObject
getId, getObjectType
 

Method Detail

getStatus

OutboundRecord.Status getStatus()
Returns the current status of this record.


update

void update()
            throws RequestFailedException
Requests an update of this record with the values of the Outbound Contact Server database.

Throws:
OutboundServiceException - if an error is reported by the Outbound Server.
InvalidStatusException - if the record is not in OPEN status.
RequestFailedException

reschedule

void reschedule(java.util.Calendar calendar,
                OutboundRecord.CallbackType callbackType)
                throws RequestFailedException
Reschedules a call for later.

Parameters:
calendar - A calendar object where time is set to the required date of the callback and time zone must be set to GMT. The time should be set in the customer's timezone.
callbackType - the type of the callback.
Throws:
OutboundServiceException - if an error is reported by the Outbound Server.
InvalidStatusException - if the record is not in OPEN status.
RequestFailedException

cancel

void cancel()
            throws RequestFailedException
Determines that this record (and only this one) does not need any call. This can be due to its history or record data. This record will no longer be handled by the current campaign.

Throws:
OutboundServiceException - if an error is reported by the Outbound Server.
RequestFailedException

doNotCall

void doNotCall(java.lang.String reason)
               throws RequestFailedException
Prevents this record (and only this one) from being dialed by any campaign. This can be for instance by contact request.

Parameters:
reason - a message to be written in the "Do Not Call" dedicated log.
Throws:
OutboundServiceException - if an error is reported by the Outbound Server.
RequestFailedException

clone

OutboundRecord clone(java.lang.String phoneNumber)
Returns a copy of this record. All fields are cloned except Phone. This new record can be used in OutboundChain.addRecordToChain(com.genesyslab.ail.OutboundRecord).

Parameters:
phoneNumber - the phone number of the new record.

getCampaignInfo

OutboundCampaignInfo getCampaignInfo()
Returns the campaign that handles this record.


getRecordHandle

int getRecordHandle()
Returns an integer used as an ID (handle) for this record.


getCallingListName

java.lang.String getCallingListName()
Returns the name of the current calling list.


getCallResult

OutboundRecord.CallResult getCallResult()
Returns the result of this call.


getPhone

java.lang.String getPhone()
Returns the phone number for this record.


getPhoneType

OutboundRecord.PhoneType getPhoneType()
Returns the phone type for this record or null if not available.


getTimeZoneOffset

int getTimeZoneOffset()
Returns an integer value for the timezone offset from GMT, in hours.


getCustomField

java.lang.Object getCustomField(java.lang.String field_name)
Returns the object associated with this parameter.


getCustomFields

java.util.Map getCustomFields()
Returns the custom fields for this record.

Returns:
Map (String, Object).

getTimeZone

java.lang.String getTimeZone()
Returns the time zone ID, or null if not available.


getDailyFrom

java.lang.Integer getDailyFrom()
Returns the beginning of the time frame when this contact can be called, in seconds from midnight.

Returns:
null if not available.

getDailyTill

java.lang.Integer getDailyTill()
Returns the end of the time frame when this contact can be called, in seconds from midnight.

Returns:
null if not available.

getContactMediaType

java.lang.String getContactMediaType()
Returns the contact's media type.

Returns:
a business attribute ID.

setCallResult

void setCallResult(OutboundRecord.CallResult result)
Sets the result of the current call for this current record.


setPhone

void setPhone(java.lang.String phone_number)
Sets the phone number of the customer in the phone field of the current record. This is a mandatory field.

Parameters:
phone_number - the phone number to set

setTimeZoneOffset

void setTimeZoneOffset(int offset)
Deprecated. Use setTimeZone(String) instead.

Writes the offset in the time zone of this record. This is a mandatory field.

Parameters:
offset - the offset from Greenwich Meridian Time

setCustomField

void setCustomField(java.lang.String field_name,
                    java.lang.Object value)
                    throws RequestFailedException
Sets a custom field in the record and updates it in the Outbound Contact Server.

Parameters:
field_name - the name of the record to update.
value - the new value of this record.
Throws:
InvalidParameterException - if the value is null, or does not have the correct type or if the field_name does not already exists.
InvalidStatusException - if the record is not in OPEN status
OutboundServiceException - if an error is reported by the Outbound Server.
RequestFailedException

setCustomField

void setCustomField(java.lang.String field_name,
                    java.lang.Object value,
                    boolean update)
                    throws RequestFailedException
Sets a custom field in the record. With update=false, this method allows you to set several fields with only one update in the OCS.

Parameters:
field_name - the name of the record to update.
value - the new value of this record.
update - Indicates whether this modification should be applied into the OCS. If false, you must call update() in order to apply the modification in the OCS.
Throws:
InvalidParameterException - if the value is null, or does not have the correct type or if the field_name does not already exists.
InvalidStatusException - when update=true if the record is not in OPEN status.
OutboundServiceException - if an error is reported by the Outbound Server.
RequestFailedException

setTimeZone

void setTimeZone(java.lang.String timeZoneID)
Sets the time zone ID, which have already been declared in the Configuration Layer.


setPhoneType

void setPhoneType(OutboundRecord.PhoneType phoneType)
Sets the phone type.


setDailyFrom

void setDailyFrom(java.lang.Integer from)
Sets the beginning of the time frame when this contact can be called, in seconds from midnight.


setDailyTill

void setDailyTill(java.lang.Integer till)
Sets the end of the time frame when this contact can be called, in seconds from midnight.


getOutboundChain

OutboundChain getOutboundChain()
Returns the OutboundChain this record belongs to or null.