<a id=“SuperOffice_WebApi_Agents_IAIAgent”></a> Interface IAIAgent
Namespace: SuperOffice.WebApi.AgentsAssembly: SuperOffice.WebApi.dll AI services, such as Translation, Statistics, Sentiment analysis, backed by calls to Public Cloud providers
Implements
IAgentBase, IDisposableMethods
<a id=“SuperOffice_WebApi_Agents_IAIAgent_AnalyzeBizCardImageAsync_System_Byte___System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> AnalyzeBizCardImageAsync(byte[], bool, RequestOptions)
Returns contact and person information from an image. Merges results with matching database records if merge = trueParameters
image byte[]
Image data containg a business card
mergeWithDatabase bool
Merge results from analysis with matching database records? True: match company/person names and set ids on returned entities.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BizCard> Returns a Contact and a Person entity.<a id=“SuperOffice_WebApi_Agents_IAIAgent_AnalyzeBizCardTextAsync_System_String_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> AnalyzeBizCardTextAsync(string, bool, RequestOptions)
Extract contact and person information from text. Merge results with matching database records if merge = trueParameters
text string
Text that contains useful contact and person information.
mergeWithDatabase bool
Merge results from analysis with matching database records? True: match company/person names and set ids on returned entities.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BizCard> Returns a Contact and a Person entity.<a id=“SuperOffice_WebApi_Agents_IAIAgent_AnswerAcceptedAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> AnswerAcceptedAsync(string, RequestOptions)
Signal that answer was inserted into response- feedback is logged and used to improve the answer algorithm.Parameters
trackingId string
The id of the answer that you are giving feedback to.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return value<a id=“SuperOffice_WebApi_Agents_IAIAgent_AnswerAsync_System_String_System_String_SuperOffice_WebApi_Data_RagType_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> AnswerAsync(string, string, RagType, int, RequestOptions)
Returns an answer.Parameters
namespaceName string
Defines the search domain used for generating answer. e.g. ‘ServiceCopilot’
query string
Question. The search query to answer.
type RagType
Filter results based on content type. Default: None = no filtering
top int
Max Number of results to use in generating answer.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<RagAnswer> Generated answer based on query.<a id=“SuperOffice_WebApi_Agents_IAIAgent_AnswerFeedbackAsync_System_String_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> AnswerFeedbackAsync(string, bool, RequestOptions)
Send feedback on answer - feedback is logged and used to improve the answer algorithm.Parameters
trackingId string
The id of the answer that you are giving feedback to.
isThumbsUp bool
True = Like, False = Dislike.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return value<a id=“SuperOffice_WebApi_Agents_IAIAgent_AnswerUsingContextAsync_System_String_System_String_SuperOffice_WebApi_Data_RagContextIds_SuperOffice_WebApi_Data_RagType_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> AnswerUsingContextAsync(string, string, RagContextIds, RagType, int, RequestOptions)
Returns an answer based on the query, and provided context.Parameters
namespaceName string
Defines the search domain used for generating answer. e.g. ‘ServiceCopilot’
query string
Question. The search query to answer.
contextIds RagContextIds
The IDs of the current context for contact, person, project, sale, and ticket.
type RagType
Filter results based on content type. Default: None = no filtering
top int
Max Number of results to use in generating answer.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<RagAnswer> Generated answer based on query.<a id=“SuperOffice_WebApi_Agents_IAIAgent_CancelIndexingAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> CancelIndexingAsync(string, RequestOptions)
Cancel the current re-indexing job on a given namespace. Leaves data in inconsistent state, because removal of old data is skipped.Parameters
namespaceName string
Identifies the namespace to stop indexing in.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<RagStatus> Status of the indexing run after cancellation.<a id=“SuperOffice_WebApi_Agents_IAIAgent_ClearChatbotTurnsAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> ClearChatbotTurnsAsync(string, RequestOptions)
Clears the stored history of chat messages for a given chat_id. Chat_id is usually derived from soproto + current id, but could also be arbitrary nameParameters
chatId string
identifies this chat = arbitrary name (e.g. user-defined) or the soprotocol + id (e.g. ticket-123, contact-43, diary)
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return value<a id=“SuperOffice_WebApi_Agents_IAIAgent_CreateDefaultCopilotDataSourceEntityAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultCopilotDataSourceEntityAsync(RequestOptions)
Set default values into a new CopilotDataSourceEntity. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<CopilotDataSourceEntity> A blank CopilotDataSourceEntity<a id=“SuperOffice_WebApi_Agents_IAIAgent_CreateDefaultCopilotEntityAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultCopilotEntityAsync(RequestOptions)
Set default values into a new CopilotEntity. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<CopilotEntity> A blank CopilotEntity<a id=“SuperOffice_WebApi_Agents_IAIAgent_CreateTextForAppointmentAsync_SuperOffice_WebApi_Data_AppointmentEntity_System_String_SuperOffice_WebApi_RequestOptions_”></a> CreateTextForAppointmentAsync(AppointmentEntity, string, RequestOptions)
Generate agenda text for an appointment based on appointment’s company category, title, person, etc.Parameters
appointment AppointmentEntity
The appointment object to generate text for.
isoLangCode string
Language returned text should be in. Blank = do not specify language.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<string> Agenda text in markdown format<a id=“SuperOffice_WebApi_Agents_IAIAgent_DeleteCopilotDataSourceEntityAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteCopilotDataSourceEntityAsync(int, RequestOptions)
Deletes the CopilotDataSourceEntityParameters
copilotDataSourceEntityId int
The identity of the CopilotDataSourceEntity
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_IAIAgent_DeleteCopilotEntityAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteCopilotEntityAsync(int, RequestOptions)
Deletes the CopilotEntityParameters
copilotEntityId int
The identity of the CopilotEntity
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_IAIAgent_DetectLanguageAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> DetectLanguageAsync(string, RequestOptions)
Given a (reasonably short) text, detect the language it is written inParameters
text string
Text to be analyzed; there may be a cost-per-character so do not send a book here
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<string> ISO Language code, such as NO, US, ES, FR<a id=“SuperOffice_WebApi_Agents_IAIAgent_DetectSentimentAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> DetectSentimentAsync(string, RequestOptions)
Detect the sentiment of a (reasonably short) text. Sentiment analysis may cause a translation to be made, since sentiment analysis only supports a limited set of languagesParameters
text string
Text to be analyzed
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<Sentiment> The sentiment information: score (-100 to +100) and confidence<a id=“SuperOffice_WebApi_Agents_IAIAgent_ExpandTextAsync_System_String_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> ExpandTextAsync(string, int, string, RequestOptions)
Generate a longer version of a textParameters
text string
Text to embiggen
percentBigger int
How much to embiggen.
isoLangCode string
Language returned text should be in. Blank = do not specify language.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<string> Expanded version of the text<a id=“SuperOffice_WebApi_Agents_IAIAgent_GetChatbotPromptSuggestionsAsync_System_String_System_String_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetChatbotPromptSuggestionsAsync(string, string, int, RequestOptions)
Return one or more suggested prompts as actions to display in an empty chat windowParameters
isoLangCode string
ISO2 Language code (‘en’, ‘no’, ‘de’…) for suggestions in response
soProtocol string
Context for suggestions (‘contact.main.activities’)
currentId int
current company/person/project id - used for context in suggestions
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ChatbotTurn> Contains zero or more BotActions, and welcome message in Bot response<a id=“SuperOffice_WebApi_Agents_IAIAgent_GetChatbotResponseAsync_System_String_System_String_System_String_System_String_SuperOffice_WebApi_Data_ChatbotTurn___System_String_SuperOffice_WebApi_RequestOptions_”></a> GetChatbotResponseAsync(string, string, string, string, ChatbotTurn[], string, RequestOptions)
Return a chatbot response given prompt and previous turns. Stores the new turn in the history for the chatIdParameters
chatId string
identifies this chat = arbitrary name (e.g. user-defined) or the soprotocol + id (e.g. ticket-123, contact-43, diary)
isoLangCode string
ISO2 Language code (‘en’, ‘no’, ‘de’…) for suggestions in response
userPrompt string
User question for chatbot
displayValue string
User question for display - optional - null = use userPrompt
previousTurns ChatbotTurn[]
Chat history - all previous turns in chronological order
apiUrl string
CRM API endpoint URL for chatbot to make callbacks to. ‘https://example.com/superoffice/api/’
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ChatbotTurn> Returns new turn that client can append to its local history.<a id=“SuperOffice_WebApi_Agents_IAIAgent_GetChatbotTurnsAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetChatbotTurnsAsync(string, RequestOptions)
Returns stored history of chat messages for a given chat_id. Chat_id is usually derived from soproto + current id, but could also be arbitrary name.Parameters
chatId string
identifies this chat = arbitrary name (e.g. user-defined) or the soprotocol + id (e.g. ticket-123, contact-43, diary)
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ChatbotTurn[]> Array containing zero or more turns. If you got zero turns, call GetChatbotPromptSuggestions to get an initial turn from the bot.<a id=“SuperOffice_WebApi_Agents_IAIAgent_GetCopilotDataSourceEntityAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetCopilotDataSourceEntityAsync(int, RequestOptions)
Gets a specific CopilotDataSourceEntity object.Parameters
copilotDataSourceEntityId int
The identifier of the CopilotDataSourceEntity object
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<CopilotDataSourceEntity> CopilotDataSourceEntity<a id=“SuperOffice_WebApi_Agents_IAIAgent_GetCopilotEntityAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetCopilotEntityAsync(int, RequestOptions)
Gets a specific CopilotEntity object.Parameters
copilotEntityId int
The identifier of the CopilotEntity object
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<CopilotEntity> CopilotEntity<a id=“SuperOffice_WebApi_Agents_IAIAgent_GetFirstFormDesignCssFromImageAsync_System_Byte___System_String_SuperOffice_WebApi_RequestOptions_”></a> GetFirstFormDesignCssFromImageAsync(byte[], string, RequestOptions)
Starts a form design analysis from an image, returning the properties for a single CSS class.Parameters
image byte[]
Image data to analyze for design
cssClass string
The CSS class to generate styles for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<FormDesignCss> Returns CSS properties for a single CSS class, and the internal state for the analyzer.<a id=“SuperOffice_WebApi_Agents_IAIAgent_GetFirstFormDesignCssFromUrlAsync_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetFirstFormDesignCssFromUrlAsync(string, string, RequestOptions)
Starts a form design analysis from a URL, returning the properties for a single CSS class.Parameters
url string
Url of the web page to extract style from.
cssClass string
The CSS class to generate styles for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<FormDesignCss> Returns CSS properties for a single CSS class, and the internal state for the analyzer.<a id=“SuperOffice_WebApi_Agents_IAIAgent_GetFormDesignCssFromImageAsync_System_Byte___System_String___SuperOffice_WebApi_RequestOptions_”></a> GetFormDesignCssFromImageAsync(byte[], string[], RequestOptions)
Returns Form Designer CSS based on the look of a pictureParameters
image byte[]
Image data to analyze for design
cssClasses string[]
List of CSS classes to generate styles for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<FormDesignCarrier> Returns CSS rules and confidence score.<a id=“SuperOffice_WebApi_Agents_IAIAgent_GetFormDesignCssFromUrlAsync_System_String_System_String___SuperOffice_WebApi_RequestOptions_”></a> GetFormDesignCssFromUrlAsync(string, string[], RequestOptions)
Returns Form Designer properties based on the look of a web pageParameters
url string
Url of the web page to extract style from.
cssClasses string[]
List of CSS classes to generate styles for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<FormDesignCarrier> Returns CSS rules and confidence score.<a id=“SuperOffice_WebApi_Agents_IAIAgent_GetFormDesignFromImageAsync_System_Byte___SuperOffice_WebApi_RequestOptions_”></a> GetFormDesignFromImageAsync(byte[], RequestOptions)
Returns Form Designer properties based on the look of a pictureParameters
image byte[]
Image data to analyze for design
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<StringDictionary> Returns a Form Designer properties.<a id=“SuperOffice_WebApi_Agents_IAIAgent_GetFormDesignFromUrlAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetFormDesignFromUrlAsync(string, RequestOptions)
Returns Form Designer properties based on the look of a web pageParameters
url string
Url of the web page to extract style from.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<StringDictionary> Returns a Form Designer properties.<a id=“SuperOffice_WebApi_Agents_IAIAgent_GetIndexingStatusAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetIndexingStatusAsync(string, RequestOptions)
Get the current status.Parameters
namespaceName string
Identifies the namespace to store content in.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<RagStatus> Status of the indexing run - may be cancelled if another run is in progress.<a id=“SuperOffice_WebApi_Agents_IAIAgent_GetNextFormDesignCssAsync_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetNextFormDesignCssAsync(string, string, RequestOptions)
Returns another CSS class, continuing the CSS generation, one class at a time.Parameters
state string
Internal state from the analyzer, from the previous call.
cssClass string
The CSS class to generate styles for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<FormDesignCss> Returns CSS properties for a single CSS class, and the updated internal state for the analyzer.<a id=“SuperOffice_WebApi_Agents_IAIAgent_GetSummarizeContactPromptAsync_System_Int32_System_Int32_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetSummarizeContactPromptAsync(int, int, string, string, RequestOptions)
Return the prompt used to get a short summary of the activities on a contact. Does not call the chatbot for a response. Used for transfering a summary to a chat session.Parameters
contactId int
Contact id to summarize
numSentences int
Length of summary
summary string
Chatbot’s summary of the contact activities
isoLangCode string
Language returned text should be in. Blank = do not specify language.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ChatbotTurn> Display text and Prompt used to generate a short summary of the activities on a contact.<a id=“SuperOffice_WebApi_Agents_IAIAgent_GetSummarizeSalePromptAsync_System_Int32_System_Int32_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetSummarizeSalePromptAsync(int, int, string, string, RequestOptions)
Return the prompt used to get a short summary of the activities on a sale. Does not call the chatbot for a response. Used for transfering a summary to a chat session.Parameters
saleId int
Sale id to summarize
numSentences int
Length of summary
summary string
Chatbot’s summary of the sale activities
isoLangCode string
Language returned text should be in
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ChatbotTurn> Display text and Prompt used to generate a short summary of the activities on a sale.<a id=“SuperOffice_WebApi_Agents_IAIAgent_GetSummarizeTicketPromptAsync_System_Int32_System_Int32_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetSummarizeTicketPromptAsync(int, int, string, string, RequestOptions)
Return the prompt used to get a short summary of the messages on a ticket. Does not call the chatbot for a response. Used for transfering a summary to a chat session.Parameters
ticketId int
Ticket id to summarize
numSentences int
Length of summary
summary string
Chatbot’s summary of the ticket
isoLangCode string
Language returned text should be in
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ChatbotTurn> Display text and Prompt used to generate a short summary of the messages on a ticket.<a id=“SuperOffice_WebApi_Agents_IAIAgent_GetTrainingStatusAsync_SuperOffice_WebApi_RequestOptions_”></a> GetTrainingStatusAsync(RequestOptions)
Calling the HugoAI endpoint to fetch the current training status.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<CategorizationStatusResponse> Carrier to describe the current status of HugoAI categorization<a id=“SuperOffice_WebApi_Agents_IAIAgent_GuessCategoryAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GuessCategoryAsync(int, RequestOptions)
Given a ticket’s id, guess the ticket category it should be placed in. Currently this is based on the first message in the ticketParameters
ticketId int
Id of ticket to guess category for
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<int> Suggested ticket category ID<a id=“SuperOffice_WebApi_Agents_IAIAgent_ParseQueryIntoRestrictionsAsync_System_String_System_String_SuperOffice_WebApi_Data_NaturalLanguageSearch_SuperOffice_WebApi_RequestOptions_”></a> ParseQueryIntoRestrictionsAsync(string, string, NaturalLanguageSearch, RequestOptions)
Return archive restrictions based on a natural language query.Parameters
query string
What the user asked for.
currents string
Current context prompt. e.g. Current company name and id, what selection are we looking at?
previousQuery NaturalLanguageSearch
Previous query, if applicable. NULL if no previous query.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<NaturalLanguageSearch> Returns archive restrictions and columns for the query. Pass this result in as the previous query on the next call to continue the conversation.<a id=“SuperOffice_WebApi_Agents_IAIAgent_RemovePhotoBackgroundAsync_System_Byte___System_String_SuperOffice_WebApi_RequestOptions_”></a> RemovePhotoBackgroundAsync(byte[], string, RequestOptions)
Returns an image with the background removed, leaving only the main subjectParameters
image byte[]
Image to be cleaned. JPG or PNG.
returnContentType string
Accept content-type. Default “application/octet-stream”. Could also be “application/pdf”, “text/plain”, “text/html”, or “multipart/related”
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<byte[]> Image with background removed<a id=“SuperOffice_WebApi_Agents_IAIAgent_RephraseTextAsync_System_String_SuperOffice_WebApi_Data_AiTextStyle_System_String_SuperOffice_WebApi_RequestOptions_”></a> RephraseTextAsync(string, AiTextStyle, string, RequestOptions)
Generate a new version of a textParameters
text string
Text to transform
style AiTextStyle
New style to transform text into (Rephrase, Correct, Casual, Formal)
isoLangCode string
Language returned text should be in. Blank = do not specify language.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<string> New version of the text<a id=“SuperOffice_WebApi_Agents_IAIAgent_SaveCopilotDataSourceEntityAsync_SuperOffice_WebApi_Data_CopilotDataSourceEntity_SuperOffice_WebApi_RequestOptions_”></a> SaveCopilotDataSourceEntityAsync(CopilotDataSourceEntity, RequestOptions)
Updates the existing CopilotDataSourceEntity or creates a new CopilotDataSourceEntity if the id parameter is 0.Parameters
copilotDataSourceEntity CopilotDataSourceEntity
The CopilotDataSourceEntity that is saved.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<CopilotDataSourceEntity> New or updated CopilotDataSourceEntity<a id=“SuperOffice_WebApi_Agents_IAIAgent_SaveCopilotEntityAsync_SuperOffice_WebApi_Data_CopilotEntity_SuperOffice_WebApi_RequestOptions_”></a> SaveCopilotEntityAsync(CopilotEntity, RequestOptions)
Updates the existing CopilotEntity or creates a new CopilotEntity if the id parameter is 0.Parameters
copilotEntity CopilotEntity
The CopilotEntity that is saved.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<CopilotEntity> New or updated CopilotEntity<a id=“SuperOffice_WebApi_Agents_IAIAgent_SearchAsync_System_String_System_String_SuperOffice_WebApi_Data_RagType_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> SearchAsync(string, string, RagType, int, RequestOptions)
Returns semantic search results from vector database.Parameters
namespaceName string
Defines the search domain. e.g. ‘ServiceCopilot’.
query string
Search query.
type RagType
Filter results based on a specific content type. Default: None = no filtering
top int
Max Number of results to return.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<RagResult[]> Array containing vector search results<a id=“SuperOffice_WebApi_Agents_IAIAgent_StartRagIndexingAsync_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> StartRagIndexingAsync(string, string, RequestOptions)
Kicks off a batch task to update the RAG indexParameters
namespaceName string
Defines the search domain. e.g. ‘ServiceCopilot’.
sourceId string
(Optional) Identifies the data source to update. Blank = all sources
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<int> The batch task id<a id=“SuperOffice_WebApi_Agents_IAIAgent_SummarizeContactAsync_System_Int32_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> SummarizeContactAsync(int, int, string, RequestOptions)
Generate a short summary of the activities on a contactParameters
contactId int
Contact id to summarize
numSentences int
Length of summary
isoLangCode string
Language returned text should be in. Blank = do not specify language.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<string> Short summary of the activities on a contact - in HTML.<a id=“SuperOffice_WebApi_Agents_IAIAgent_SummarizeSaleAsync_System_Int32_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> SummarizeSaleAsync(int, int, string, RequestOptions)
Generate a short summary of the activities on a saleParameters
saleId int
Sale id to summarize
numSentences int
Length of summary
isoLangCode string
Language returned text should be in. Blank = do not specify language.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<string> Short summary of the activities on a sale - in HTML.<a id=“SuperOffice_WebApi_Agents_IAIAgent_SummarizeTextAsync_System_String_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> SummarizeTextAsync(string, int, string, RequestOptions)
Generate a short summary of a textParameters
text string
Text to summarize
percentSmaller int
How much to shorten.
isoLangCode string
Language returned text should be in. Blank = do not specify language.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<string> Short summary of the text<a id=“SuperOffice_WebApi_Agents_IAIAgent_SummarizeTicketAsync_System_Int32_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> SummarizeTicketAsync(int, int, string, RequestOptions)
Generate a short summary of the messages on a ticketParameters
ticketId int
Ticket id to summarize
numSentences int
Length of summary
isoLangCode string
Language returned text should be in
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<string> Short summary of the messages on a ticket - in HTML.<a id=“SuperOffice_WebApi_Agents_IAIAgent_TrainCategoryGuesserAsync_System_Int32_System_Int32_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> TrainCategoryGuesserAsync(int, int, int, RequestOptions)
The category guesser training API will be called with an array of CategorizationTrainingItem during the (background, Batch) execution of this callParameters
selectionId int
Id of selection of tickets, to retrieve training data from
maxItems int
Maximum number of tickets to retrieve data from
maxTextLength int
Maximum length of PlainTextBody or any other large text, truncated to nearest word boundary
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<string> Placeholder for result… should this be a BatchTaskId? maybe not useful?<a id=“SuperOffice_WebApi_Agents_IAIAgent_TranslateAsync_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> TranslateAsync(string, string, RequestOptions)
Translate a text from one language to another. Language of the text is automatically detected.Parameters
text string
Text to be translated. Language of the text is automatically detected.
targetLanguage string
ISO Language code (such as FR) to translate the text into
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<string> Translated text<a id=“SuperOffice_WebApi_Agents_IAIAgent_TranslateEntityAsync_System_String_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> TranslateEntityAsync(string, int, string, RequestOptions)
Retrieve, format and translate text for an entity to a specified languageParameters
entityName string
Name of entity to get the text to be translated; eg., ‘ticketMessage’
entityId int
Identifier for the entity to get text to be translated
targetLanguage string
ISO Language code (such as FR) to translate the text into
requestOptions RequestOptions
Override language/culture codes on this request.