public class AskFast
extends java.lang.Object
| Constructor and Description |
|---|
AskFast() |
AskFast(javax.servlet.http.HttpServletRequest req) |
AskFast(javax.servlet.http.HttpServletRequest req,
java.lang.String accountID,
java.lang.String refreshToken,
java.util.Map<java.lang.String,java.lang.String> params) |
AskFast(java.lang.String url) |
AskFast(java.lang.String url,
java.lang.String accountID,
java.lang.String refreshToken,
java.util.Map<java.lang.String,java.lang.String> params) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAnswer(java.lang.String answer,
java.lang.String next)
Adds an answer corresponding to a question asked
|
void |
addEvent(EventPost.EventType eventType,
java.lang.String callbackURL)
Adds an event callback
|
void |
addMediaProperty(MediaProperty.MediumType mediumType,
MediaProperty.MediaPropertyKey propertyKey,
java.lang.String value)
Adds some communication channel specific properties.
|
void |
ask(java.lang.String ask)
Asks a question of Type
Question.QUESTION_TYPE_OPEN |
void |
ask(java.lang.String ask,
java.lang.String next)
Asks an open question with text as in field: ask and an answer with
callback as in field: next
|
void |
ask(java.lang.String ask,
java.lang.String answerText,
java.lang.String next)
Asks an open question with text as in field: ask and an answer with
callback as in field: next and text as in field: answerText
|
void |
askByVoice(java.lang.String ask,
java.lang.String next)
Creates an open question with media property as audio.
|
void |
conference(java.lang.String ask,
java.lang.String next)
Sets up a conference.
|
void |
exit(java.lang.String exitURL)
Ends an existing conversation
|
protected java.lang.String |
formatURL(java.lang.String url) |
java.lang.String |
getAccountID() |
java.lang.String |
getBaseURL() |
java.lang.String |
getBearerToken() |
java.util.Map<java.lang.String,java.lang.String> |
getParams() |
Question |
getQuestion() |
java.lang.String |
getQuestionId() |
java.lang.String |
outBoundCall(java.lang.String fromAddress,
java.lang.String senderName,
java.util.Collection<java.lang.String> toAddressList,
java.lang.String subject,
java.lang.String url)
Deprecated.
Use the one of:
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
overloaded method for any broadcast outboundcalls with a subject (Everything including an Email) |
java.lang.String |
outBoundCall(java.lang.String fromAddress,
java.lang.String senderName,
java.util.Map<java.lang.String,java.lang.String> toAddressNameMap,
java.util.Map<java.lang.String,java.lang.String> ccAddressNameMap,
java.util.Map<java.lang.String,java.lang.String> bccAddressNameMap,
java.lang.String subject,
java.lang.String url)
Deprecated.
Use the one of:
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
overloaded method for any broadcast outboundcalls with a subject, cc and bcc list (Everything including Email) |
java.lang.String |
outBoundCall(java.lang.String fromAddress,
java.lang.String senderName,
java.util.Map<java.lang.String,java.lang.String> toAddressNameMap,
java.lang.String url)
Deprecated.
Use the one of:
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
overloaded method for any broadcast outboundcalls without a subject (Everything except an Email). Makes it backward compatible |
java.lang.String |
outBoundCall(java.lang.String fromAddress,
java.lang.String senderName,
java.util.Map<java.lang.String,java.lang.String> toAddressNameMap,
java.lang.String subject,
java.lang.String url)
Deprecated.
Use the one of:
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
overloaded method for any broadcast outboundcalls with a subject |
java.lang.String |
outBoundCall(java.lang.String fromAddress,
java.lang.String toAddress,
java.lang.String url)
Deprecated.
Use the one of:
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
Overloaded method for any outboundcalls without a subject (Everything except Email) |
java.lang.String |
outBoundCall(java.lang.String fromAddress,
java.lang.String toAddress,
java.lang.String subject,
java.lang.String url)
Deprecated.
Use the one of:
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
overloaded method for any outboundcalls with a subject (Everything including Email) |
java.lang.String |
outBoundCall(java.lang.String fromAddress,
java.lang.String senderName,
java.lang.String toAddress,
java.lang.String subject,
java.lang.String url)
Deprecated.
Use the one of:
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
|
void |
redirect(java.util.List<java.lang.String> addresses,
java.lang.String redirectText,
java.lang.String next,
java.lang.String preconnectURL)
Redirect the control to multiple agents
|
void |
redirect(java.lang.String to)
Redirect the control to a new agent/url
|
void |
redirect(java.lang.String to,
java.lang.String redirectText)
Redirect the control to a new agent
|
void |
redirect(java.lang.String to,
java.lang.String redirectText,
java.lang.String next)
Redirect the control to a new agent
|
void |
redirect(java.lang.String to,
java.lang.String redirectText,
java.lang.String next,
java.lang.String preconnectURL)
Redirect the control to a new phone.
|
void |
reject()
Reject this conversation.
|
java.lang.String |
render()
Serializer the question prepared till now.
|
void |
render(javax.servlet.http.HttpServletResponse response) |
void |
say(java.lang.String value)
Creates a comment question if the next parameter is null.
|
void |
say(java.lang.String value,
java.lang.String next)
Creates a comment question if the next parameter is null.
|
void |
setAccountID(java.lang.String accountID)
Set the accountId for this instance
|
void |
setBaseURL(java.lang.String baseURL) |
void |
setBearerToken(java.lang.String bearerToken) |
void |
setPreferredLanguage(java.lang.String language) |
public AskFast()
public AskFast(javax.servlet.http.HttpServletRequest req)
public AskFast(java.lang.String url)
public AskFast(javax.servlet.http.HttpServletRequest req,
java.lang.String accountID,
java.lang.String refreshToken,
java.util.Map<java.lang.String,java.lang.String> params)
public AskFast(java.lang.String url,
java.lang.String accountID,
java.lang.String refreshToken,
java.util.Map<java.lang.String,java.lang.String> params)
public java.lang.String getQuestionId()
public Question getQuestion()
public void say(java.lang.String value)
value - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which explains your question or statementpublic void say(java.lang.String value,
java.lang.String next)
value - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which explains your question or statementnext - The next URL that must be fetched. This url is added as the
answer callbackpublic void ask(java.lang.String ask)
Question.QUESTION_TYPE_OPENask - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which explains your question or statementpublic void askByVoice(java.lang.String ask,
java.lang.String next)
ask - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which explains your question or statementnext - The next URL that must be fetched. This url is added as the
answer callbackpublic void ask(java.lang.String ask,
java.lang.String next)
ask - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which explains your question or statementnext - The next URL that must be fetched. This url is added as the
answer callbackpublic void ask(java.lang.String ask,
java.lang.String answerText,
java.lang.String next)
ask - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which explains your question or statementanswerText - In an open question, this is not very relevant as information
specific to an answer can also be added to the ask paramnext - The next URL that must be fetched. This url is added as the
answer callbackpublic void exit(java.lang.String exitURL)
exitURL - Text or url to be played before exitpublic void reject()
public void conference(java.lang.String ask,
java.lang.String next)
ask - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which explains your question or statementnext - The next URL that must be fetched. This url is added as the
answer callbackpublic void addAnswer(java.lang.String answer,
java.lang.String next)
answer - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which explains this answer or statementnext - The next URL that must be fetched. This url is added as the
answer callbackpublic void redirect(java.lang.String to)
to - You can redirect to a phonenumber, client or another http URL.public void redirect(java.lang.String to,
java.lang.String redirectText)
to - You can redirect to a phonenumber, client or another http URL.redirectText - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which is played out before the redirect happenspublic void redirect(java.lang.String to,
java.lang.String redirectText,
java.lang.String next)
to - You can redirect to a phonenumber, client or another http URL.redirectText - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which is played out before the redirect happensnext - The next URL that must be fetched. This url is added as the
answer callbackpublic void redirect(java.lang.String to,
java.lang.String redirectText,
java.lang.String next,
java.lang.String preconnectURL)
to - You can redirect to a phonenumber, client or another http URL.redirectText - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which is played out before the redirect happensnext - The next URL that must be fetched. This url is added as the
answer callbackpreconnectURL - this url is used to execute a question at the callee side
before connecting him to the caller. E.g. Now the callee can
pick the phone, listen to a menu, then connect the call. This
is useful only with special calling adapters.public void redirect(java.util.List<java.lang.String> addresses,
java.lang.String redirectText,
java.lang.String next,
java.lang.String preconnectURL)
addresses - Redirect the phone call to all these addressesredirectText - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which is played out before the redirect happensnext - The next URL that must be fetched. This url is added as the
answer callbackpreconnectURL - this url is used to execute a question at the callee side
before connecting him to the caller. E.g. Now the callee can
pick the phone, listen to a menu, then connect the call. This
is useful only with special calling adapters.public java.lang.String render()
@Deprecated
public java.lang.String outBoundCall(java.lang.String fromAddress,
java.lang.String toAddress,
java.lang.String url)
throws java.lang.Exception
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
fromAddress - address of the sendertoAddress - address of the receiverurl - GET request on this URL has the questionjava.lang.Exception - 403 Authorization Exceptionspublic java.lang.String outBoundCall(java.lang.String fromAddress,
java.lang.String toAddress,
java.lang.String subject,
java.lang.String url)
throws java.lang.Exception
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
fromAddress - address of the sendertoAddress - address of the receiversubject - Subject is relevant to email conversations onlyurl - GET request on this URL has the questionjava.lang.Exception - 403 Authorization Exceptionspublic java.lang.String outBoundCall(java.lang.String fromAddress,
java.lang.String senderName,
java.lang.String toAddress,
java.lang.String subject,
java.lang.String url)
throws java.lang.Exception
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
fromAddress - address of the sendersenderName - The alternative senderIdtoAddress - address of the receiversubject - Subject is relevant to email conversations onlyurl - GET request on this URL has the questionjava.lang.Exception - 403 Authorization Exceptionspublic java.lang.String outBoundCall(java.lang.String fromAddress,
java.lang.String senderName,
java.util.Collection<java.lang.String> toAddressList,
java.lang.String subject,
java.lang.String url)
throws java.lang.Exception
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
fromAddress - address of the sendersenderName - name of the sender (userful for sending emails)toAddressList - collection of all recipient addressessubject - subject of the emailurl - question urljava.lang.Exception - 403 Authorization Exceptionspublic java.lang.String outBoundCall(java.lang.String fromAddress,
java.lang.String senderName,
java.util.Map<java.lang.String,java.lang.String> toAddressNameMap,
java.lang.String url)
throws java.lang.Exception
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
fromAddress - address of the sendersenderName - name of the sender (userful for sending emails)toAddressNameMap - map containing all recipient address for a Broadcast callurl - GET request on this URL has the questionjava.lang.Exception - 403 Authorization Exceptionspublic java.lang.String outBoundCall(java.lang.String fromAddress,
java.lang.String senderName,
java.util.Map<java.lang.String,java.lang.String> toAddressNameMap,
java.lang.String subject,
java.lang.String url)
throws java.lang.Exception
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
fromAddress - address of the sendersenderName - name of the sender (userful for sending emails)toAddressNameMap - map containing all recipient address for a Broadcast callsubject - subject used in case this is an outbound emailurl - GET request on this URL has the questionjava.lang.Exception - 403 Authorization Exceptionspublic java.lang.String outBoundCall(java.lang.String fromAddress,
java.lang.String senderName,
java.util.Map<java.lang.String,java.lang.String> toAddressNameMap,
java.util.Map<java.lang.String,java.lang.String> ccAddressNameMap,
java.util.Map<java.lang.String,java.lang.String> bccAddressNameMap,
java.lang.String subject,
java.lang.String url)
throws java.lang.Exception
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
fromAddress - address of the sendersenderName - name of the sender (userful for sending emails)toAddressNameMap - map containing all recipient address for a Broadcast callccAddressNameMap - map containing all cc recipient address for a Broadcast callbccAddressNameMap - map containing all bcc recipient address for a Broadcast callsubject - subject used in case this is an outbound emailurl - GET request on this URL has the questionjava.lang.Exception - 403 Authorization Exceptionspublic void addEvent(EventPost.EventType eventType, java.lang.String callbackURL)
eventType - Type of the eventcallbackURL - The callback to which EventPost is POSTed topublic void addMediaProperty(MediaProperty.MediumType mediumType, MediaProperty.MediaPropertyKey propertyKey, java.lang.String value)
mediumType - The type of the communication channelpropertyKey - The type of the property addedvalue - The value of the property addedpublic void setAccountID(java.lang.String accountID)
accountID - The accountId of userpublic java.lang.String getAccountID()
public java.lang.String getBearerToken()
public void setBearerToken(java.lang.String bearerToken)
public void setPreferredLanguage(java.lang.String language)
public void render(javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
java.io.IOExceptionpublic java.util.Map<java.lang.String,java.lang.String> getParams()
protected java.lang.String formatURL(java.lang.String url)
public java.lang.String getBaseURL()
public void setBaseURL(java.lang.String baseURL)
Copyright © 2018 AskFast BV. All Rights Reserved.