public class APIContextWrapper extends java.lang.Object implements APIContext
Constructor and Description |
---|
APIContextWrapper(com.speechstorm.fish.runtime.VuiContext context_p,
com.speechstorm.fish.runtime.Channel channel_p)
This is the only sensible way to create an instance of this class.
|
Modifier and Type | Method and Description |
---|---|
void |
addExtraMenuOption(java.lang.String sName_p,
java.lang.String sDTMF_p,
java.util.List<java.lang.String> synonyms_p,
java.util.Map<java.lang.String,java.lang.String> slotData_p,
int iConfirmationMode_p,
com.speechstorm.fish.sites.Prompt confirmationPrompt_p,
boolean isFullConfirmationPrompt_p,
int iOptionWeight_p) |
void |
addExtraMenuOption(java.lang.String sName_p,
java.lang.String sDTMF_p,
java.util.List<java.lang.String> synonyms_p,
java.util.Map<java.lang.String,java.lang.String> slotData_p,
int iConfirmationMode_p,
com.speechstorm.fish.sites.Prompt confirmationPrompt_p,
int iOptionWeight_p,
com.speechstorm.fish.sites.Prompt imagePrompt_p,
com.speechstorm.fish.sites.Prompt descriptionPrompt_p) |
void |
addExtraMenuOption(java.lang.String sName_p,
java.lang.String sDTMF_p,
java.util.List<java.lang.String> synonyms_p,
java.util.Map<java.lang.String,java.lang.String> slotData_p,
int iConfirmationMode_p,
java.lang.String sConfirmationPromptTTS_p,
boolean isFullConfirmationPrompt_p,
int iOptionWeight_p)
This function can be used to dynamically build menus at runtime whilst the call is occurring.
|
void |
addExtraMenuOption(java.lang.String sName_p,
java.lang.String sDTMF_p,
java.util.List<java.lang.String> synonyms_p,
java.util.Map<java.lang.String,java.lang.String> slotData_p,
int iConfirmationMode_p,
java.lang.String sConfirmationPromptTTS_p,
int iOptionWeight_p,
java.lang.String sImageURL_p,
java.lang.String sDescription_p) |
void |
addExtraMenuOption(java.lang.String sName_p,
java.lang.String sDTMF_p,
java.lang.String[] synonyms_p,
java.util.Map<java.lang.String,java.lang.String> slotData_p,
int iConfirmationMode_p,
com.speechstorm.fish.sites.Prompt confirmationPrompt_p,
boolean isFullConfirmationPrompt_p,
int iOptionWeight_p) |
void |
addExtraMenuOption(java.lang.String sName_p,
java.lang.String sDTMF_p,
java.lang.String[] synonyms_p,
java.util.Map<java.lang.String,java.lang.String> slotData_p,
int iConfirmationMode_p,
com.speechstorm.fish.sites.Prompt confirmationPrompt_p,
int iOptionWeight_p,
com.speechstorm.fish.sites.Prompt imagePrompt_p,
com.speechstorm.fish.sites.Prompt descriptionPrompt_p) |
void |
addExtraMenuOption(java.lang.String sName_p,
java.lang.String sDTMF_p,
java.lang.String[] synonyms_p,
java.util.Map<java.lang.String,java.lang.String> slotData_p,
int iConfirmationMode_p,
java.lang.String sConfirmationPromptTTS_p,
boolean isFullConfirmationPrompt_p,
int iOptionWeight_p) |
void |
addExtraMenuOption(java.lang.String sName_p,
java.lang.String sDTMF_p,
java.lang.String[] synonyms_p,
java.util.Map<java.lang.String,java.lang.String> slotData_p,
int iConfirmationMode_p,
java.lang.String sConfirmationPromptTTS_p,
int iOptionWeight_p,
java.lang.String sImageURL_p,
java.lang.String sDescription_p) |
boolean |
canStoreCLIData()
Identifies if the current call is capable of storing CLI Data, i.e.
|
void |
clearExtraMenuOptions()
Clears the list of extra menu options already added to the next Menu or Question block
|
NativeDataElement |
createNativePrompt(java.lang.String sFallbackText_p,
java.lang.String sPayload_p,
java.lang.String sContentType_p)
Create a NativeDataElement
|
NativeDataElement |
createNativePrompt(java.lang.String sFallbackText_p,
java.lang.String sPayload_p,
java.lang.String sContentType_p,
java.lang.String sTargetPlatform_i)
Create a NativeDataElement
|
NativeDataElement |
createNativePrompt(java.lang.String sFallbackText_p,
java.lang.String sPayload_p,
java.lang.String sContentType_p,
java.lang.String sTargetPlatform_i,
java.lang.String sOptionalTypeFields_p)
Create a NativeDataElement
|
void |
endBusinessTaskWithCPFL(java.lang.String sTaskName_p,
java.lang.String sOutcome_p,
java.lang.String sDetails_p)
End the logging of a specific Business Task with a customer perceived failure result.
|
void |
endBusinessTaskWithFailure(java.lang.String sTaskName_p,
java.lang.String sOutcome_p,
java.lang.String sDetails_p)
End the logging of a specific Business Task with failure result.
|
void |
endBusinessTaskWithHangup(java.lang.String sTaskName_p,
java.lang.String sOutcome_p,
java.lang.String sDetails_p)
End the logging of a specific Business Task with a "hangup" result.
|
void |
endBusinessTaskWithSuccess(java.lang.String sTaskName_p,
java.lang.String sDetails_p)
End the logging of a specific Business Task with the result "success".
|
void |
endBusinessTaskWithUnknownOutcome(java.lang.String sTaskName_p,
java.lang.String sOutcome_p,
java.lang.String sDetails_p)
End the logging of a specific Business Task with an unknown result.
|
java.lang.String |
expandVariables(java.lang.String sTextWithVariableReferences_p)
Parses the provided text, looking for standard variable placeholders such as:
[var:MyVariable] and replaces these with the appropriate value of the variable
|
com.speechstorm.fish.data.DataObject |
findDataObject(java.lang.String sTypeName_p,
java.lang.String sName_p)
Retrieves a site-specific data object from memory.
|
java.util.List<com.speechstorm.fish.data.DataObject> |
findDataObjects(java.lang.String sTypeName_p)
Returns a list of all data objects of the provided "type" for the current site
No data dip is required for production sites that are cached, as these data objects
will be cached when the server starts.
|
java.lang.String |
generateCTICodeForContextTransfer()
Saves the current context into the call_contexts database table and
generates a URL for Visual IVR that allows it to be retrieved
|
java.lang.String |
getActiveChannelName()
Provides the name of the current channel being used by the user.
|
java.lang.String |
getAttachedCallData(java.lang.String sName_p)
Returns the value of a piece of attached call data.
|
java.lang.String |
getCLI()
Provides access to the CLI of this call i.e.
|
java.lang.String |
getCLIData(java.lang.String sName_p)
Accesses the CLI data for this call, and obtains the variable passed in the "sName_p"
parameter.
|
java.util.List<java.lang.String> |
getCurrentBlockOutputNodeNames()
Provides a list of names, each of which corresponds to an output node for the current block.
|
com.speechstorm.fish.blocks.BlockRef |
getCurrentBlockRef()
Provides access to a reference to the current block in the call, which will always be the Script block that is currently executing.
|
java.lang.String |
getDNIS()
Provides access to the DNIS of the current call, which represents the number that the caller dialled to reach the voice application
|
java.lang.String |
getInitialChannelName()
Provides the name of the channel in which the interaction began.
|
com.speechstorm.fish.runtime.FailureDetails |
getLastFailureDetails()
Generates a FailureDetails object to provide more context about the most recent failure to occur in
the call.
|
java.lang.String |
getLastOutputNodeName()
Provides the last output node name that has been processed in the call at the point it is called.
|
com.speechstorm.fish.runtime.RecognitionResults |
getLastRecognitionResults()
Generates the recognition results from the last Menu or Question block.
|
java.lang.String |
getLastResult()
Provides the last result obtained in the call, which can be used to identify the path taken to reach the current block.
|
java.lang.String |
getLastResultDetail()
Provides a more detailed result breakdown, such as the reason for an error in an error result.
|
int |
getModuleID()
Provides the numeric ID of the current module at any given point in the call flow
|
java.lang.String |
getModuleName()
Provides the name of the current module at any given point in the call flow
|
RemoteDataResult |
getNamedQueryData(java.lang.String sQueryName_p,
int iTimeout_p)
A specific implementation of the getRemoteHTTPData method for requesting and receiving database information
from 'services' tables that have been populated using the 'Flat File Loader' mechanism.
|
int |
getNumberOfCallsInLast2Weeks()
Returns the number of calls that have occurred in the last 14 days from this CLI.
|
int |
getNumberOfCallsInLast4Weeks()
Returns the number of calls that have occurred in the last 28 days from this CLI.
|
int |
getNumberOfCallsThisWeek()
Returns the number of calls that have occurred this week from this CLI, where a week is
considered the last 7 days.
|
int |
getNumberOfCallsToday()
Returns the number of calls that have occurred today from this CLI
If the CLI data has not already been loaded for this call, a call to this method will
also ensure the CLI is loaded.
|
java.util.Map<java.lang.String,com.speechstorm.fish.scripting.plugins.Plugin> |
getPlugins()
Returns a map of all Plugins currently available in the call
|
com.speechstorm.fish.blocks.BlockRef |
getPreviousBlockRef()
Provides access to a reference to the previous block in the call.
|
com.speechstorm.fish.sites.Prompt |
getPrompt(java.lang.String sPromptName_p)
Returns a read-only copy of the prompt that's currently in session with
the given name, or null if it is not found.
|
int |
getRandomPercentage()
Miscellaneous helper method to generate a random percentage, useful for routing logic.
|
com.speechstorm.fish.runtime.RecognitionResults |
getRecognitionResults(java.lang.String sBlockName_p)
Generates a RecognitionResults object for the most recent execution of the
block, whose name is provided via the parameter.
|
RemoteDataResult |
getRemoteHttpData(java.lang.String sURL_p,
java.lang.String sMethod_p,
java.util.List<java.lang.String> headers_p,
java.util.Map<java.lang.String,java.lang.String> params_p,
int iTimeout_p)
Makes an HTTP request onto a remote data end point.
|
RemoteDataResult |
getRemoteHttpData(java.lang.String sURL_p,
java.lang.String sMethod_p,
java.util.List<java.lang.String> headers_p,
java.lang.String sRequestBody_p,
java.lang.String sContentType_p,
int iTimeout_p)
Makes an HTTP request onto a remote data end point.
|
RemoteDataResult |
getRemoteHttpData(java.lang.String sURL_p,
java.lang.String sMethod_p,
java.util.Map<java.lang.String,java.lang.String> params_p,
int iTimeout_p)
Makes an HTTP request onto a remote data end point.
|
RemoteDataResult |
getRemoteHttpData(java.lang.String sURL_p,
java.lang.String sMethod_p,
java.lang.String sRequestBody_p,
java.lang.String sContentType_p,
int iTimeout_p)
Makes an HTTP request onto a remote data end point.
|
java.lang.Object |
getVariable(java.lang.String sName_p)
Accesses the value of a variable at the current time
|
java.util.Collection<java.lang.String> |
getVariableNames()
Generates a collection of all variables currently assigned a value within
the call, but does not include any confidential variables.
|
java.util.Collection<java.lang.String> |
getVariableNames(boolean bIncludeConfidentialVars_p)
Generates a collection of all variables currently assigned a value within
the call
|
java.lang.String |
getVoicePlatformFullCallID()
Provides access to the Voice Platform Full Call ID, a unique identifier generated by the voice platform at the start of the call
|
java.lang.String |
getVoicePlatformSessionID()
Provides access to the Voice Platform Session ID, a unique identifier generated by the voice platform at the start of the call
|
java.lang.String |
getVuiPreference(java.lang.String sName_p)
Allows you to find the value of a VUI Preference at the current point in the call
|
boolean |
isASRReleased()
Identifies whether or not an ASR release has been made, or if one is pending.
|
boolean |
isRecentFailure()
Identifies if there has been a recent failure in the call flow.
|
boolean |
isTestCall()
Identifies whether the current was a "test" call, using the test version of the call flow or if it was a production call.
|
void |
log(java.lang.String sMessage_p)
A debugging tool, that allows individual scripts to log to the standard framework "info" level
logs.
|
void |
logError(java.lang.String sMessage_p)
Allows individual scripts to log to the standard framework "error" level logs.
|
void |
logError(java.lang.String sMessage_p,
java.lang.Throwable error_p)
Allows individual scripts to log to the standard framework "error" level logs.
|
java.lang.String |
prepareForContextTransferToWebIVR(int iTestSiteId_p)
Saves the current context into the call_contexts database table and
generates a URL for Visual IVR that allows it to be retrieved
|
void |
releaseASR()
Sets a flag to say that we should render the VXML instruction to release
the current ASR session at the next available opportunity.
|
void |
retrieveContextFromCTI(java.lang.String sCTICode_p)
Saves the current context into the call_contexts database table and
generates a URL for Visual IVR that allows it to be retrieved
|
RemoteDataResult |
sendEmail(java.util.List<java.lang.String> recipients_p,
java.lang.String sFromAddress_p,
java.lang.String sSubject_p,
java.lang.String sMessage_p)
Attempts to send a simple 'text' email using the platform's configured SMPT provider.
|
RemoteDataResult |
sendSMS(java.lang.String sRecipientNumber_p,
java.lang.String sSenderNumber_p,
java.lang.String sMessage_p)
Attempts to send an SMS message asynchronously using the platform's standard HTTP-based gateway.
|
void |
setAttachedCallData(java.lang.String sName_p,
java.lang.String sValue_p)
Sets a value as "attached" call data.
|
void |
setCLIData(java.lang.String sName_p,
java.lang.String sValue_p)
Sets a value in the CLI data, which will be saved at the end of the call in order to be
remembered in the next call
If the CLI data has not already been loaded for this call, a call to this method will
also ensure the CLI is loaded.
|
void |
setConfidentialVariable(java.lang.String sName_p,
java.lang.Object value_p)
Sets the value of the variable, overriding any existing value.
|
void |
setResultDetail(java.lang.String sResultDetail_p)
Overrides the 'result detail' field in the reports for the current block, which lets you provide more
information about the execution of the block.
|
void |
setVariable(java.lang.String sName_p,
java.lang.Object value_p)
Sets the value of the variable, overriding any existing value.
|
void |
setVariable(java.lang.String sName_p,
com.speechstorm.fish.sites.Prompt prompt_p)
Sets the value of the variable, overriding any existing value.
|
void |
setVariable(java.lang.String sName_p,
java.lang.String sValue_p)
Sets the value of the variable, overriding any existing value.
|
void |
setVariable(java.lang.String sName_p,
java.lang.String sValue_p,
boolean bAttachToCallData_p)
Sets the value of the variable, overriding any existing value.
|
void |
setVariable(java.lang.String sName_p,
java.lang.String sValue_p,
boolean bAttachToCallData_p,
boolean bSetAsCLIData_p)
Sets the value of the variable, overriding any existing value.
|
void |
setVuiPreferenceForModule(java.lang.String sName_p,
java.lang.String sValue_p)
Sets the value of the VUI Preference for the rest of the current module, and any sub modules
called from this module by updating the default for the module.
|
void |
startBusinessTask(java.lang.String sTaskName_p)
Begins the logging of a specific Business Task, denoted by the "sTaskName_p" parameter.
|
java.lang.String |
toJsonString(java.lang.Object object_p) |
public APIContextWrapper(com.speechstorm.fish.runtime.VuiContext context_p, com.speechstorm.fish.runtime.Channel channel_p)
context_p
- The VuiContext object that you want to wrap.public com.speechstorm.fish.sites.Prompt getPrompt(java.lang.String sPromptName_p)
APIContext
getPrompt
in interface APIContext
sPromptName_p
- The exact prompt namepublic java.lang.String expandVariables(java.lang.String sTextWithVariableReferences_p)
APIContext
expandVariables
in interface APIContext
sTextWithVariableReferences_p
- The text to be parsedpublic void addExtraMenuOption(java.lang.String sName_p, java.lang.String sDTMF_p, java.util.List<java.lang.String> synonyms_p, java.util.Map<java.lang.String,java.lang.String> slotData_p, int iConfirmationMode_p, com.speechstorm.fish.sites.Prompt confirmationPrompt_p, boolean isFullConfirmationPrompt_p, int iOptionWeight_p)
addExtraMenuOption
in interface APIContext
public void addExtraMenuOption(java.lang.String sName_p, java.lang.String sDTMF_p, java.util.List<java.lang.String> synonyms_p, java.util.Map<java.lang.String,java.lang.String> slotData_p, int iConfirmationMode_p, java.lang.String sConfirmationPromptTTS_p, boolean isFullConfirmationPrompt_p, int iOptionWeight_p)
APIContext
addExtraMenuOption
in interface APIContext
sName_p
- The name of the menu option, which will appear in ReportssDTMF_p
- An optional DTMF field that can be used by the caller to reference this answersynonyms_p
- A List OR any array (see variant of method below) of possible words or phrases that can be spoken or entered by the user, the answers to which will be
treated as synonymous with this option.slotData_p
- A map of extra data that can be associated with this answer, and can be retrieved at a later point in
the call by accessing the RecognitionResults for the answer.iConfirmationMode_p
- An Integer representing whether or not to confirm the answer the user gives. Only 4 choices
are considered acceptable input. 0 to never confirm, 1 to confirm if necessary, 2 to always confirm and 3 to confirm unless
the caller has used DTMF.sConfirmationPromptTTS_p
- The TTS OR Prompt to be read as a confirmation message if the answer needs to be confirmedisFullConfirmationPrompt_p
- True if full confirmation prompt, false if notiOptionWeight_p
- A numeric weighting for this option. Higher values will be favoured by the vocal recogniser and in
ambiguous cases the recogniser will choose the option with the highest meaning.public void addExtraMenuOption(java.lang.String sName_p, java.lang.String sDTMF_p, java.lang.String[] synonyms_p, java.util.Map<java.lang.String,java.lang.String> slotData_p, int iConfirmationMode_p, com.speechstorm.fish.sites.Prompt confirmationPrompt_p, boolean isFullConfirmationPrompt_p, int iOptionWeight_p)
addExtraMenuOption
in interface APIContext
public void addExtraMenuOption(java.lang.String sName_p, java.lang.String sDTMF_p, java.lang.String[] synonyms_p, java.util.Map<java.lang.String,java.lang.String> slotData_p, int iConfirmationMode_p, java.lang.String sConfirmationPromptTTS_p, boolean isFullConfirmationPrompt_p, int iOptionWeight_p)
addExtraMenuOption
in interface APIContext
public void addExtraMenuOption(java.lang.String sName_p, java.lang.String sDTMF_p, java.lang.String[] synonyms_p, java.util.Map<java.lang.String,java.lang.String> slotData_p, int iConfirmationMode_p, java.lang.String sConfirmationPromptTTS_p, int iOptionWeight_p, java.lang.String sImageURL_p, java.lang.String sDescription_p)
addExtraMenuOption
in interface APIContext
public void addExtraMenuOption(java.lang.String sName_p, java.lang.String sDTMF_p, java.lang.String[] synonyms_p, java.util.Map<java.lang.String,java.lang.String> slotData_p, int iConfirmationMode_p, com.speechstorm.fish.sites.Prompt confirmationPrompt_p, int iOptionWeight_p, com.speechstorm.fish.sites.Prompt imagePrompt_p, com.speechstorm.fish.sites.Prompt descriptionPrompt_p)
addExtraMenuOption
in interface APIContext
public void addExtraMenuOption(java.lang.String sName_p, java.lang.String sDTMF_p, java.util.List<java.lang.String> synonyms_p, java.util.Map<java.lang.String,java.lang.String> slotData_p, int iConfirmationMode_p, java.lang.String sConfirmationPromptTTS_p, int iOptionWeight_p, java.lang.String sImageURL_p, java.lang.String sDescription_p)
addExtraMenuOption
in interface APIContext
public void addExtraMenuOption(java.lang.String sName_p, java.lang.String sDTMF_p, java.util.List<java.lang.String> synonyms_p, java.util.Map<java.lang.String,java.lang.String> slotData_p, int iConfirmationMode_p, com.speechstorm.fish.sites.Prompt confirmationPrompt_p, int iOptionWeight_p, com.speechstorm.fish.sites.Prompt imagePrompt_p, com.speechstorm.fish.sites.Prompt descriptionPrompt_p)
addExtraMenuOption
in interface APIContext
public boolean canStoreCLIData()
APIContext
canStoreCLIData
in interface APIContext
public void clearExtraMenuOptions()
APIContext
clearExtraMenuOptions
in interface APIContext
public void endBusinessTaskWithCPFL(java.lang.String sTaskName_p, java.lang.String sOutcome_p, java.lang.String sDetails_p)
APIContext
endBusinessTaskWithCPFL
in interface APIContext
sTaskName_p
- The name of the Business Task to report onsOutcome_p
- The specific outcome that led to the task failuresDetails_p
- Optional result detail to provide more informationpublic void endBusinessTaskWithFailure(java.lang.String sTaskName_p, java.lang.String sOutcome_p, java.lang.String sDetails_p)
APIContext
endBusinessTaskWithFailure
in interface APIContext
sTaskName_p
- The name of the Business Task to report onsOutcome_p
- The specific outcome that led to the task failuresDetails_p
- Optional result detail to provide more informationpublic void endBusinessTaskWithHangup(java.lang.String sTaskName_p, java.lang.String sOutcome_p, java.lang.String sDetails_p)
APIContext
endBusinessTaskWithHangup
in interface APIContext
sTaskName_p
- The name of the Business Task to report onsOutcome_p
- The specific outcomesDetails_p
- Optional result detail to provide more informationpublic void endBusinessTaskWithSuccess(java.lang.String sTaskName_p, java.lang.String sDetails_p)
APIContext
endBusinessTaskWithSuccess
in interface APIContext
sTaskName_p
- The name of the Business Task to report onsDetails_p
- Optional result detail to provide more informationpublic void endBusinessTaskWithUnknownOutcome(java.lang.String sTaskName_p, java.lang.String sOutcome_p, java.lang.String sDetails_p)
APIContext
endBusinessTaskWithUnknownOutcome
in interface APIContext
sTaskName_p
- The name of the Business Task to report onsOutcome_p
- The specific outcomesDetails_p
- Optional result detail to provide more informationpublic com.speechstorm.fish.data.DataObject findDataObject(java.lang.String sTypeName_p, java.lang.String sName_p) throws com.speechstorm.fish.db.DBException
APIContext
findDataObject
in interface APIContext
sTypeName_p
- The type of DataObject to loadsName_p
- The name of the data objectcom.speechstorm.fish.db.DBException
- If there was an issue loading the DataObject cache for this sitepublic java.util.List<com.speechstorm.fish.data.DataObject> findDataObjects(java.lang.String sTypeName_p) throws com.speechstorm.fish.db.DBException
APIContext
findDataObjects
in interface APIContext
sTypeName_p
- The type of DataObject to loadcom.speechstorm.fish.db.DBException
- If there was an issue loading the DataObject cache for this sitepublic java.lang.String getAttachedCallData(java.lang.String sName_p)
APIContext
getAttachedCallData
in interface APIContext
sName_p
- The name of the attached data to retrievepublic java.lang.String getCLI()
APIContext
getCLI
in interface APIContext
public java.lang.String getDNIS()
APIContext
getDNIS
in interface APIContext
public java.lang.String getCLIData(java.lang.String sName_p)
APIContext
getCLIData
in interface APIContext
sName_p
- The name of the data you wish to load.public com.speechstorm.fish.blocks.BlockRef getCurrentBlockRef()
APIContext
getCurrentBlockRef
in interface APIContext
public java.lang.String getLastOutputNodeName()
APIContext
getLastOutputNodeName
in interface APIContext
public java.util.List<java.lang.String> getCurrentBlockOutputNodeNames()
APIContext
getCurrentBlockOutputNodeNames
in interface APIContext
public com.speechstorm.fish.runtime.RecognitionResults getLastRecognitionResults()
APIContext
getLastRecognitionResults
in interface APIContext
public com.speechstorm.fish.runtime.RecognitionResults getRecognitionResults(java.lang.String sBlockName_p)
APIContext
getRecognitionResults
in interface APIContext
sBlockName_p
- The exact name of the blockpublic java.lang.String getLastResult()
APIContext
getLastResult
in interface APIContext
public java.lang.String getLastResultDetail()
APIContext
getLastResultDetail
in interface APIContext
public int getModuleID()
APIContext
getModuleID
in interface APIContext
public java.lang.String getModuleName()
APIContext
getModuleName
in interface APIContext
public boolean isRecentFailure()
APIContext
isRecentFailure
in interface APIContext
public com.speechstorm.fish.runtime.FailureDetails getLastFailureDetails()
APIContext
getLastFailureDetails
in interface APIContext
public void setResultDetail(java.lang.String sResultDetail_p)
APIContext
setResultDetail
in interface APIContext
sResultDetail_p
- - private function so not available externally.public java.lang.String getActiveChannelName()
APIContext
getActiveChannelName
in interface APIContext
public java.lang.String getInitialChannelName()
APIContext
getInitialChannelName
in interface APIContext
public RemoteDataResult getNamedQueryData(java.lang.String sQueryName_p, int iTimeout_p) throws RemoteException
APIContext
getNamedQueryData
in interface APIContext
sQueryName_p
- The name of the query to runiTimeout_p
- The number of milliseconds to wait after establishing a connection for the entire response to be receivedRemoteException
- Represents any exception that occurred while calling an asynchronous integration method.public com.speechstorm.fish.blocks.BlockRef getPreviousBlockRef()
APIContext
getPreviousBlockRef
in interface APIContext
public int getRandomPercentage()
APIContext
getRandomPercentage
in interface APIContext
public RemoteDataResult getRemoteHttpData(java.lang.String sURL_p, java.lang.String sMethod_p, java.lang.String sRequestBody_p, java.lang.String sContentType_p, int iTimeout_p) throws RemoteException
APIContext
Makes an HTTP request onto a remote data end point. The possible requests (sMethod_p) allowed are: GET The parameter sRequestBody_p must be null, or empty. POST No check will be made at this level. PUT The parameter params_p must be null. DELETE The parameter params_p must be null. The parameter sRequestBody_p must be null, or empty. If a POST request is made, extra parameters will automatically added onto the request. It will add two special parameters (if they don't already exist) called "cli" and "sessionid". It will also add (but not overwrite) any non-confidential variables defined in session which are Strings. The results of this request are parsed into a RemoteDataResult object.
getRemoteHttpData
in interface APIContext
sURL_p
- The URL of the end point to request ontosMethod_p
- The HTTP method to use, such as "GET" or "POST"sRequestBody_p
- The body of the request to be sentsContentType_p
- The content type of the request, such as "application/json"iTimeout_p
- The number of milliseconds to wait after establishing a connection for the entire response to be receivedRemoteException
- Represents any exception that occurred while calling an asynchronous integration method.public RemoteDataResult getRemoteHttpData(java.lang.String sURL_p, java.lang.String sMethod_p, java.util.Map<java.lang.String,java.lang.String> params_p, int iTimeout_p) throws RemoteException
APIContext
Makes an HTTP request onto a remote data end point. If a POST request is made, extra parameters will automatically added onto the request. It will add two special parameters (if they don't already exist) called "cli" and "sessionid". It will also add (but not overwrite) any non-confidential variables defined in session which are Strings. The results of this request are parsed into a RemoteDataResult object.
getRemoteHttpData
in interface APIContext
sURL_p
- The URL of the end point to request ontosMethod_p
- The HTTP method to use, such as "GET" or "POST"params_p
- A map of parameters to be passed along with the requestiTimeout_p
- The number of milliseconds to wait after establishing a connection for the entire response to be receivedRemoteException
- Represents any exception that occurred while calling an asynchronous integration method.public RemoteDataResult getRemoteHttpData(java.lang.String sURL_p, java.lang.String sMethod_p, java.util.List<java.lang.String> headers_p, java.lang.String sRequestBody_p, java.lang.String sContentType_p, int iTimeout_p) throws RemoteException
APIContext
getRemoteHttpData
in interface APIContext
sURL_p
- The URL of the end point to request ontosMethod_p
- The HTTP method to use, such as "GET" or "POST"headers_p
- A map of headers to be sent in the requestsRequestBody_p
- The body of the request to be sentsContentType_p
- The content type of the request, such as "application/json"iTimeout_p
- The number of milliseconds to wait after establishing a connection for the entire response to be receivedRemoteException
- Represents any exception that occurred while calling an asynchronous integration method.public RemoteDataResult getRemoteHttpData(java.lang.String sURL_p, java.lang.String sMethod_p, java.util.List<java.lang.String> headers_p, java.util.Map<java.lang.String,java.lang.String> params_p, int iTimeout_p) throws RemoteException
APIContext
getRemoteHttpData
in interface APIContext
sURL_p
- The URL of the end point to request ontosMethod_p
- The HTTP method to use, such as "GET" or "POST"headers_p
- A map of headers to be sent in the requestparams_p
- A map of parameters to be passed along with the requestiTimeout_p
- The number of milliseconds to wait after establishing a connection for the entire response to be receivedRemoteException
- Represents any exception that occurred while calling an asynchronous integration method.public java.lang.Object getVariable(java.lang.String sName_p)
APIContext
getVariable
in interface APIContext
sName_p
- The name of the variable to be accessedpublic java.util.Collection<java.lang.String> getVariableNames()
APIContext
getVariableNames
in interface APIContext
public java.util.Collection<java.lang.String> getVariableNames(boolean bIncludeConfidentialVars_p)
APIContext
getVariableNames
in interface APIContext
bIncludeConfidentialVars_p
- True to include variables marked as "confidential", false if notpublic java.lang.String getVoicePlatformFullCallID()
APIContext
getVoicePlatformFullCallID
in interface APIContext
public java.lang.String getVoicePlatformSessionID()
APIContext
getVoicePlatformSessionID
in interface APIContext
public java.lang.String getVuiPreference(java.lang.String sName_p)
APIContext
getVuiPreference
in interface APIContext
sName_p
- The name of the VUI Preference to be foundpublic boolean isTestCall()
APIContext
isTestCall
in interface APIContext
public void log(java.lang.String sMessage_p)
APIContext
log
in interface APIContext
sMessage_p
- The message to logpublic void logError(java.lang.String sMessage_p, java.lang.Throwable error_p)
APIContext
logError
in interface APIContext
sMessage_p
- A message to log at "error" levelerror_p
- The error that has occurredpublic void logError(java.lang.String sMessage_p)
APIContext
logError
in interface APIContext
sMessage_p
- A message to log at "error" levelpublic RemoteDataResult sendEmail(java.util.List<java.lang.String> recipients_p, java.lang.String sFromAddress_p, java.lang.String sSubject_p, java.lang.String sMessage_p) throws RemoteException
APIContext
sendEmail
in interface APIContext
recipients_p
- one or more email addresses to send the message to.sFromAddress_p
- the email address from which you want the message to look like it was sent.sSubject_p
- the subject line of the email.sMessage_p
- the body of the email.RemoteException
- if the asynchronous task could not be instigated; check the RemoteDataResult for further errors.public RemoteDataResult sendSMS(java.lang.String sRecipientNumber_p, java.lang.String sSenderNumber_p, java.lang.String sMessage_p) throws RemoteException
APIContext
sendSMS
in interface APIContext
sRecipientNumber_p
- the mobile number that you want to send the message to.sSenderNumber_p
- the number that you want to appear as the 'from' number.sMessage_p
- the body of the SMS message.RemoteException
- if the asynchronous task could not be instigated; check the RemoteDataResult for further errors.public void setAttachedCallData(java.lang.String sName_p, java.lang.String sValue_p)
APIContext
setAttachedCallData
in interface APIContext
sName_p
- The name of the attached data to savesValue_p
- The value to savepublic void setCLIData(java.lang.String sName_p, java.lang.String sValue_p)
APIContext
setCLIData
in interface APIContext
sName_p
- The name of the data you wish to setsValue_p
- The value to setpublic int getNumberOfCallsInLast2Weeks()
APIContext
getNumberOfCallsInLast2Weeks
in interface APIContext
public int getNumberOfCallsInLast4Weeks()
APIContext
getNumberOfCallsInLast4Weeks
in interface APIContext
public int getNumberOfCallsThisWeek()
APIContext
getNumberOfCallsThisWeek
in interface APIContext
public int getNumberOfCallsToday()
APIContext
getNumberOfCallsToday
in interface APIContext
public void setVariable(java.lang.String sName_p, java.lang.Object value_p)
APIContext
setVariable
in interface APIContext
sName_p
- The name of the variable.value_p
- The value. "null" can be passed to delete a variable.public void setVariable(java.lang.String sName_p, com.speechstorm.fish.sites.Prompt prompt_p)
APIContext
setVariable
in interface APIContext
sName_p
- The name of the variable.prompt_p
- The value. "null" can be passed to delete a variable.public void setVariable(java.lang.String sName_p, java.lang.String sValue_p)
APIContext
setVariable
in interface APIContext
sName_p
- The name of the variable.sValue_p
- The value. "null" can be passed to delete a variable.public void setVariable(java.lang.String sName_p, java.lang.String sValue_p, boolean bAttachToCallData_p)
APIContext
setVariable
in interface APIContext
sName_p
- The name of the variablesValue_p
- The value. "null" can be passed to delete a variable.bAttachToCallData_p
- True to attach the variable to call data, false otherwise.public void setVariable(java.lang.String sName_p, java.lang.String sValue_p, boolean bAttachToCallData_p, boolean bSetAsCLIData_p)
APIContext
setVariable
in interface APIContext
sName_p
- The name of the variablesValue_p
- The value. "null" can be passed to delete a variable.bAttachToCallData_p
- True to attach the variable to call data, false otherwise.bSetAsCLIData_p
- True to save variable to CLI Data, false otherwise.public void setConfidentialVariable(java.lang.String sName_p, java.lang.Object value_p)
APIContext
setConfidentialVariable
in interface APIContext
sName_p
- The name of the variablevalue_p
- The value. "null" can be passed to delete a variable.public void setVuiPreferenceForModule(java.lang.String sName_p, java.lang.String sValue_p)
APIContext
setVuiPreferenceForModule
in interface APIContext
sName_p
- The name of the VUI Preference you wish to setsValue_p
- The value you wish to set it topublic void startBusinessTask(java.lang.String sTaskName_p)
APIContext
startBusinessTask
in interface APIContext
sTaskName_p
- The name of the Business Task to report onpublic void releaseASR()
APIContext
releaseASR
in interface APIContext
public boolean isASRReleased()
APIContext
isASRReleased
in interface APIContext
public java.util.Map<java.lang.String,com.speechstorm.fish.scripting.plugins.Plugin> getPlugins()
APIContext
getPlugins
in interface APIContext
public java.lang.String prepareForContextTransferToWebIVR(int iTestSiteId_p)
prepareForContextTransferToWebIVR
in interface APIContext
iTestSiteId_p
- The test ID of the site you want to transfer topublic java.lang.String generateCTICodeForContextTransfer()
generateCTICodeForContextTransfer
in interface APIContext
public void retrieveContextFromCTI(java.lang.String sCTICode_p)
retrieveContextFromCTI
in interface APIContext
sCTICode_p
- The CTI code, previously generated from the "generateCTICodeForContextTransfer" functionpublic java.lang.String toJsonString(java.lang.Object object_p)
toJsonString
in interface APIContext
public NativeDataElement createNativePrompt(java.lang.String sFallbackText_p, java.lang.String sPayload_p, java.lang.String sContentType_p)
APIContext
createNativePrompt
in interface APIContext
public NativeDataElement createNativePrompt(java.lang.String sFallbackText_p, java.lang.String sPayload_p, java.lang.String sContentType_p, java.lang.String sTargetPlatform_i)
APIContext
createNativePrompt
in interface APIContext
public NativeDataElement createNativePrompt(java.lang.String sFallbackText_p, java.lang.String sPayload_p, java.lang.String sContentType_p, java.lang.String sTargetPlatform_i, java.lang.String sOptionalTypeFields_p)
APIContext
createNativePrompt
in interface APIContext