|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface OutboundService
The OutboundService interface represents the extra features for handling
outbound requests of a particular agent or place.
To get an instance of the OutboundService interface, call the Agent.getOutboundService()
or Place.getOutboundService() method, as shown in the following code snippet.
Agent agentExample = (Agent) myAilFactory.getPerson("Agent_ID");
OutboundService myOutboundService = agentExample.getOutboundService();
Use the OutboundService interface to:
OutboundCampaignInfo information.OutboundChain instances associated with interactions that your agent or place gets to process outbound requests.
Do Not Call.To participate in an outbound campaign, your application registers a listener
implementing a CampaignListener interface on the OutboundService. Then, when participating
in an outbound campaign, the listener gets a notification of Campaign participation with a
CampaignEvent event of type CAMPAIGN_ADDED.
On InteractionEvent events, you can retrieve the Outboundchain associated with an interaction (if any) to access outbound information.
If the OutboundChain information change, you will get a PlaceEventOutboundChainInfo event on your place, as shown in the following code snippet:
public void SimpleOutboundExample implements PlaceListener, CampaignListener {
OutboundService outboundService ;
public void SimplePreviewExample(Place samplePlace)
{
outboundService = samplePlace.getOutboundService();
//register to listen for place events, including PlaceEventOutboundChain
samplePlace.addPlaceListener(this);
//register your campaign listener
outboundService.addListener(this) ;
}
//method to implement for CampaignListener
public void handleCampaignEvent(CampaignEvent event)
{
// Testing whether it is an event dealing with a new campaign
if(event.getEventType()==CampaignEvent.Type.CAMPAIGN_ADDED)
{
//The agent takes part in a new outbound campaign
//...
}
}
//PlaceListener methods...
public void handlePlaceEvent(PlaceEvent event)
{
if(event instanceof PlaceEventOutboundChainInfo)
{
PlaceEventOutboundChainInfo eventInfo = (PlaceEventOutboundChainInfo) event ;
System.out.println("Outbound chain event, reason "+
eventInfo.getReason().toString());
}
}
public void handleInteractionEvent(InteractionEvent event)
{
if(event.getStatus() == Interaction.Status.NEW)
{
Interaction ixn = event.getInteraction();
OutboundChain ixnChain = outboundService.getOutboundChain(ixn);
OutboundRecord recordToProcess = ixnChain.getActiveRecord();
//...
}
}
}
CampaignListener,
CampaignEvent,
CampaignEvent.Type,
OutboundChain,
PlaceEventOutboundChainInfo| Nested Class Summary | |
|---|---|
static class |
OutboundService.Action
Actions that are possible on the outbound service. |
| Nested classes/interfaces inherited from interface com.genesyslab.ail.IdObject |
|---|
IdObject.ObjectType |
| Method Summary | |
|---|---|
void |
addListener(CampaignListener listener)
Adds a listener that will be notified of campaign-related events. |
void |
cancelRecord(java.lang.String phone_number,
boolean all_chain)
Cancels an outbound record. |
void |
cancelRecord(java.lang.String phone_number,
boolean all_chain,
int applicationId)
Deprecated. since 7.0. Please use cancelRecord(String, boolean). |
void |
doNotCallCustomer(java.lang.String customer_id,
java.lang.String reason,
boolean all_chain)
Marks the customer as Do Not Call. |
void |
doNotCallRecord(java.lang.String phone_number,
java.lang.String reason,
boolean all_chain)
Marks the record (and chained records if all_chain is true) as Do Not Call. |
void |
doNotCallRecord(java.lang.String phone_number,
java.lang.String reason,
boolean all_chain,
int applicationId)
Deprecated. since 7.0. Please use doNotCallRecord(String, String, boolean). |
OutboundCampaignInfo |
getCampaignInfo(java.lang.String campaign_id)
Gets an OutboundCampaignInfo with this ID among those currently handled by this
OutboundService. |
java.util.Collection |
getCampaignInfos()
Returns the active campaigns. |
OutboundChain |
getChain(Interaction ixn)
Returns the outbound chain associated with the given interaction, or null, if this interaction has no outbound information. |
java.util.Collection |
getChains()
Returns all the active chains associated with the place of this service. |
boolean |
isASMCall(Interaction ixn)
Returns true if an interaction is in ASM call mode. |
void |
removeListener(CampaignListener listener)
Removes a previously added listener. |
| Methods inherited from interface com.genesyslab.ail.Possible |
|---|
arePossible, isPossible |
| Methods inherited from interface com.genesyslab.ail.IdObject |
|---|
getId, getObjectType |
| Method Detail |
|---|
void addListener(CampaignListener listener)
listener - the CampaignListener to register.void removeListener(CampaignListener listener)
listener - the CampaignListener to unregister.java.util.Collection getCampaignInfos()
Collection of OutboundCampaignInfo.OutboundCampaignInfo getCampaignInfo(java.lang.String campaign_id)
OutboundCampaignInfo with this ID among those currently handled by this
OutboundService.
campaign_id - the ID of the campaign info.
void cancelRecord(java.lang.String phone_number,
boolean all_chain,
int applicationId)
throws RequestFailedException
cancelRecord(String, boolean).
RequestFailedException
void doNotCallRecord(java.lang.String phone_number,
java.lang.String reason,
boolean all_chain,
int applicationId)
throws RequestFailedException
doNotCallRecord(String, String, boolean).
RequestFailedException
void cancelRecord(java.lang.String phone_number,
boolean all_chain)
throws RequestFailedException
phone_number - the phone number of the contact whose records must be cancelled.all_chain - true if all the chained records concerning the contact
associated with this number should be cancelled, false otherwise.
OutboundServiceException - if an error is reported by the Outbound Server.
OutboundServiceException - of type RECORD_ON_DESKTOP
if one or more records could not be canceled becaure they are
being processed by an agent.
RequestFailedException
void doNotCallRecord(java.lang.String phone_number,
java.lang.String reason,
boolean all_chain)
throws RequestFailedException
Do Not Call.
This method should be used when an agent updates data of a contact outside of the processing of a campaign (during an
inbound call, for example) and is asked by this customer not to be called again.
phone_number - the phone number of the contact who requests not to be called again.reason - the message to be written in the "Do Not Call" dedicated log.all_chain - true if all the chained records concerning the contact
associated with this number should be cancelled, false otherwise.
OutboundServiceException - if an error is reported by the Outbound Server.
RequestFailedExceptiondoNotCallCustomer(java.lang.String, java.lang.String, boolean)
void doNotCallCustomer(java.lang.String customer_id,
java.lang.String reason,
boolean all_chain)
throws RequestFailedException
Do Not Call. This method should be used when an agent
updates data of a contact outside of the processing of a campaign (during an inbound call,
for example) and is asked by this customer not to be called again.
customer_id - the customer ID of the contact who requests not to be called again.reason - the message to be written in the "Do Not Call" dedicated log.all_chain - true if all the chained records concerning the contact
associated with this number should be cancelled, false otherwise.
OutboundServiceException - if an error is reported by the Outbound Server.
RequestFailedExceptiondoNotCallRecord(java.lang.String, java.lang.String, boolean, int)OutboundChain getChain(Interaction ixn)
java.util.Collection getChains()
Collection of OutboundChain.boolean isASMCall(Interaction ixn)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||