Connectors Reference

COSMO Bot

COSMO Bot increases your business success through more efficiency in everyday life. If you answer a standard question today, you are wasting time. In contact with your customers, this is often a good opportunity to get to know each other and establish a relationship. But internally, from employee to employee, or when there is simply too much to do, it is a luxury that not everyone can allow themselves. This Connector allows you to extend the bots functionality and integrate other systems.

 

Status: Preview

Tier: Premium

Version: 1.0

 

Actions:

Name

Summary

GetGlobalSettings ()

Get global settings

GetGlobalSettingsSchema ()

Get global settings schema

AskQuestion ([Optional]AskQuestionParameterRequest body Request body)

Ask COSMO Bot a question

ParseText ([Optional]ParseTextParameterRequest body Request body)

Convert COSMO Bot Script

Translate ([Optional]TranslateParameterRequest body Request body)

Translate (markdown friendly)

GetAllTopics ()

Get all topics

GetTopic ([Optional]GetTopicParameterRequest body Request body)

Get topic

GetAllAnswers ([Optional]GetAllAnswersParameterRequest body Request body)

Get all question-answer sets

GetExperts ([Optional]GetExpertsParameterRequest body Request body)

Get experts for a topic

AddExpert ([Optional]AddExpertParameterRequest body Request body)

Add an expert to a topic

RemoveExpert ([Optional]RemoveExpertParameterRequest body Request body)

Remove an expert from a topic

AddTopic ([Optional]AddTopicParameterRequest body Request body)

Add a new topic

RenameTopic ([Optional]RenameTopicParameterRequest body Request body)

Rename an existing topic

AddAnswer ([Optional]AddAnswerParameterRequest body Request body)

Add a new question-answer set

EditAnswer ([Optional]EditAnswerParameterRequest body Request body)

Edit an existing question-answer set

DeleteAnswer ([Optional]DeleteAnswerParameterRequest body Request body)

Delete a question-answer set

AddSubAnswer ([Optional]AddSubAnswerParameterRequest body Request body)

Create a shadow copy of a question-answer set

GetOpenTickets ([Optional]GetOpenTicketsParameterRequest body Request body)

Get open tickets

OpenTicketQuestion ([Optional]OpenTicketQuestionParameterRequest body Request body)

Open a ticket (question)

OpenTicketFeedback ([Optional]OpenTicketFeedbackParameterRequest body Request body)

Open a ticket (feedback)

CloseTicket ([Optional]CloseTicketParameterRequest body Request body)

Close a ticket

DeleteTrigger (integer id)

Delete a webhook

 

Triggers:

Name

Summary

OnNewTicket (OnNewTicketParameterRequest body Request body)

When a new ticket is created

OnResolvedTicket (OnResolvedTicketParameterRequest body Request body)

When a ticket is resolved

OnUpdatedTicketTopic (OnUpdatedTicketTopicParameterRequest body Request body)

When a ticket's topic is updated

OnNewAnswer (OnNewAnswerParameterRequest body Request body)

When a new question-answer set is created

OnUpdateAnswer (OnUpdateAnswerParameterRequest body Request body)

When a question-answer set is created or modified

OnAskedQuestion (OnAskedQuestionParameterRequest body Request body)

When a user asks a question

 

Objects:

Name

Summary

AddAnswerParameterRequest body

 

AddExpertParameterRequest body

 

AddSubAnswerParameterRequest body

 

AddTopicParameterRequest body

 

Answer

 

AskQuestionParameterRequest body

 

AskQuestionResponse

 

CloseTicketParameterRequest body

 

DeleteAnswerParameterRequest body

 

EditAnswerParameterRequest body

 

GetAllAnswersParameterRequest body

 

GetAllAnswersResponse

 

GetAllTopicsResponse

 

GetExpertsParameterRequest body

 

GetExpertsResponse

 

GetGlobalSettingsResponse

 

GetGlobalSettingsSchemaResponse

 

GetOpenTicketsParameterRequest body

 

GetOpenTicketsResponse

 

GetTopicParameterRequest body

 

GetTopicResponse

 

OnAskedQuestionParameterRequest body

 

OnNewAnswerParameterRequest body

 

OnNewTicketParameterRequest body

 

OnResolvedTicketParameterRequest body

 

OnUpdateAnswerParameterRequest body

 

OnUpdatedTicketTopicParameterRequest body

 

OpenTicketFeedbackParameterRequest body

 

OpenTicketFeedbackResponse

 

OpenTicketQuestionParameterRequest body

 

OpenTicketQuestionResponse

 

ParseTextParameterRequest body

 

ParseTextResponse

 

RemoveExpertParameterRequest body

 

RenameTopicParameterRequest body

 

Ticket

 

TranslateParameterRequest body

 

TranslateResponse

 

 

Actions:

GetGlobalSettings

Summary: Get global settings

Description: Gets the global settings from the connected instance.

 

Syntax:

COSMOBot.GetGlobalSettings ()

 

Returns:

          Type:GetGlobalSettingsResponse

 

GetGlobalSettingsSchema

Summary: Get global settings schema

Description:

 

Syntax:

COSMOBot.GetGlobalSettingsSchema ()

 

Returns:

          Type:GetGlobalSettingsSchemaResponse

 

AskQuestion

Summary: Ask COSMO Bot a question

Description: The bot will search through the knowledgebase and return the answer with the best match. Also returns the score.

 

Syntax:

COSMOBot.AskQuestion ([Optional]AskQuestionParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

AskQuestionParameterRequest body

 

 

False

 

Returns:

          Type:AskQuestionResponse

 

ParseText

Summary: Convert COSMO Bot Script

Description: Run the given text through the COSMO Bot Script parser.

 

Syntax:

COSMOBot.ParseText ([Optional]ParseTextParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

ParseTextParameterRequest body

 

 

False

 

Returns:

          Type:ParseTextResponse

 

Translate

Summary: Translate (markdown friendly)

Description: Translate the given text while respecting the COSMO Bot dialect Markdown syntax.

 

Syntax:

COSMOBot.Translate ([Optional]TranslateParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

TranslateParameterRequest body

 

 

False

 

Returns:

          Type:TranslateResponse

 

GetAllTopics

Summary: Get all topics

Description: Gets all topics from the connected bot instance.

 

Syntax:

COSMOBot.GetAllTopics ()

 

Returns:

          Type:GetAllTopicsResponse

 

GetTopic

Summary: Get topic

Description: Gets a specific topic from the connected instance.

 

Syntax:

COSMOBot.GetTopic ([Optional]GetTopicParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

GetTopicParameterRequest body

 

 

False

 

Returns:

          Type:GetTopicResponse

 

GetAllAnswers

Summary: Get all question-answer sets

Description: Gets all answers from the connected instance.

 

Syntax:

COSMOBot.GetAllAnswers ([Optional]GetAllAnswersParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

GetAllAnswersParameterRequest body

 

 

False

 

Returns:

          Type:GetAllAnswersResponse

 

GetExperts

Summary: Get experts for a topic

Description: Gets all expoerts from the connected instance.

 

Syntax:

COSMOBot.GetExperts ([Optional]GetExpertsParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

GetExpertsParameterRequest body

 

 

False

 

Returns:

          Type:GetExpertsResponse

 

AddExpert

Summary: Add an expert to a topic

Description: The bot will add the expert to the provided topic.

 

Syntax:

COSMOBot.AddExpert ([Optional]AddExpertParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

AddExpertParameterRequest body

 

 

False

 

Returns:

 

RemoveExpert

Summary: Remove an expert from a topic

Description: The bot will remove an expert from the provided topic. If no topic is given, the expert will be removed from all topics.

 

Syntax:

COSMOBot.RemoveExpert ([Optional]RemoveExpertParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

RemoveExpertParameterRequest body

 

 

False

 

Returns:

 

AddTopic

Summary: Add a new topic

Description: Adds a new topic to the connected instance.

 

Syntax:

COSMOBot.AddTopic ([Optional]AddTopicParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

AddTopicParameterRequest body

 

 

False

 

Returns:

 

RenameTopic

Summary: Rename an existing topic

Description: Rename a existing topic from the connected instance.

 

Syntax:

COSMOBot.RenameTopic ([Optional]RenameTopicParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

RenameTopicParameterRequest body

 

 

False

 

Returns:

 

AddAnswer

Summary: Add a new question-answer set

Description: Adds a new question-answer set to the connected instance.

 

Syntax:

COSMOBot.AddAnswer ([Optional]AddAnswerParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

AddAnswerParameterRequest body

 

 

False

 

Returns:

 

EditAnswer

Summary: Edit an existing question-answer set

Description: Edit an existing question-answer set from the connected instance.

 

Syntax:

COSMOBot.EditAnswer ([Optional]EditAnswerParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

EditAnswerParameterRequest body

 

 

False

 

Returns:

 

DeleteAnswer

Summary: Delete a question-answer set

Description: Delete an existing question-answer set from the connected instance.

 

Syntax:

COSMOBot.DeleteAnswer ([Optional]DeleteAnswerParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

DeleteAnswerParameterRequest body

 

 

False

 

Returns:

 

AddSubAnswer

Summary: Create a shadow copy of a question-answer set

Description: Adds a new shadow copy for the question-answer set specified by the short description. Careful! These shadow copies are deleted when the answer is updated. It is therefore recommended to automatically call this action using the "when a question-answer set is updated" trigger.

 

Syntax:

COSMOBot.AddSubAnswer ([Optional]AddSubAnswerParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

AddSubAnswerParameterRequest body

 

 

False

 

Returns:

 

GetOpenTickets

Summary: Get open tickets

Description: Gets all open tickets from the connected instance.

 

Syntax:

COSMOBot.GetOpenTickets ([Optional]GetOpenTicketsParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

GetOpenTicketsParameterRequest body

 

 

False

 

Returns:

          Type:GetOpenTicketsResponse

 

OpenTicketQuestion

Summary: Open a ticket (question)

Description: Open a new ticket on the connected instance.

 

Syntax:

COSMOBot.OpenTicketQuestion ([Optional]OpenTicketQuestionParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

OpenTicketQuestionParameterRequest body

 

 

False

 

Returns:

          Type:OpenTicketQuestionResponse

 

OpenTicketFeedback

Summary: Open a ticket (feedback)

Description: Open a new ticket of type feedback on the connected instance.

 

Syntax:

COSMOBot.OpenTicketFeedback ([Optional]OpenTicketFeedbackParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

OpenTicketFeedbackParameterRequest body

 

 

False

 

Returns:

          Type:OpenTicketFeedbackResponse

 

CloseTicket

Summary: Close a ticket

Description: Closes an open ticket on the connected instance.

 

Syntax:

COSMOBot.CloseTicket ([Optional]CloseTicketParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

CloseTicketParameterRequest body

 

 

False

 

Returns:

 

DeleteTrigger

Summary: Delete a webhook

Description:

 

Syntax:

COSMOBot.DeleteTrigger (integer id)

 

Parameters:

Name

Type

Summary

Required

Related Action

id

integer

 

 

True

 

Returns:

 

Triggers:

Trigger OnNewTicket

Summary: When a new ticket is created

Description: When a new Ticket is created.

 

Syntax:

COSMOBot.OnNewTicket (OnNewTicketParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

OnNewTicketParameterRequest body

 

 

True

 

Returns:

 

Trigger OnResolvedTicket

Summary: When a ticket is resolved

Description: When a existing Ticket is resolved.

 

Syntax:

COSMOBot.OnResolvedTicket (OnResolvedTicketParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

OnResolvedTicketParameterRequest body

 

 

True

 

Returns:

 

Trigger OnUpdatedTicketTopic

Summary: When a ticket's topic is updated

Description: When a topic of an existing Ticket is updated.

 

Syntax:

COSMOBot.OnUpdatedTicketTopic (OnUpdatedTicketTopicParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

OnUpdatedTicketTopicParameterRequest body

 

 

True

 

Returns:

 

Trigger OnNewAnswer

Summary: When a new question-answer set is created

Description: When a new question-answer set is created.

 

Syntax:

COSMOBot.OnNewAnswer (OnNewAnswerParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

OnNewAnswerParameterRequest body

 

 

True

 

Returns:

 

Trigger OnUpdateAnswer

Summary: When a question-answer set is created or modified

Description: When a question-answer set is created or modified.

 

Syntax:

COSMOBot.OnUpdateAnswer (OnUpdateAnswerParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

OnUpdateAnswerParameterRequest body

 

 

True

 

Returns:

 

Trigger OnAskedQuestion

Summary: When a user asks a question

Description: When a user asks a question.

 

Syntax:

COSMOBot.OnAskedQuestion (OnAskedQuestionParameterRequest body Request body)

 

Parameters:

Name

Type

Summary

Required

Related Action

Request body

OnAskedQuestionParameterRequest body

 

 

True

 

Returns:

 


 

AddAnswerParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

topic

string

 

 

shortDescription

string

 

 

questions

array of (string)

 

 

answerText

string

 

 


 

AddExpertParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

topic

string

 

 

expertEmail

string

 

 


 

AddSubAnswerParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

shortDescription

string

 

 

subShortDescription

string

 

 

subQuestions

array of (string)

 

 

subAnswerText

string

 

 


 

AddTopicParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

name

string

 

 

description

string

 

 

expertEmails

array of (string)

 

 


 

Answer

Summary:

Description:

 

          Properties:

Name

Type

Summary

topic

string

 

 

shortDescription

string

 

 

questions

array of (string)

 

 

answerText

string

 

 


 

AskQuestionParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

question

string

 

 

scoreThreshold

integer

 

Minimum score of an answer for it to be returned.


 

AskQuestionResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

foundAnswer

boolean

 

Whether COSMO Bot found an answer that matched the question.

isSubAnswer

boolean

 

Whether the returned answer is a sub answer.

isTranslated

boolean

 

Whether the question and returned answer was translated.

answer

Answer

 

 

score

integer

 

How confident the bot is that the returned answer is correct.


 

CloseTicketParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

ticketId

string

 

 

editorEmail

string

 

 

editorComment

string

 

 


 

DeleteAnswerParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

shortDescription

string

 

 


 

EditAnswerParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

shortDescription

string

 

 

newTopic

string

 

 

newShortDescription

string

 

 

newQuestions

array of (string)

 

 

newAnswerText

string

 

 


 

GetAllAnswersParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

filterByTopic

string

 

 

filterByShortDescription

string

 

 

filterByQuestionText

string

 

 

filterByAnswerText

string

 

 


 

GetAllAnswersResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

answers

array of (Answer)

 

 


 

GetAllTopicsResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

topics

array of (string)

 

 


 

GetExpertsParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

topic

string

 

 


 

GetExpertsResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

expertEmails

array of (string)

 

 


 

GetGlobalSettingsResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary


 

GetGlobalSettingsSchemaResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

schema

Schema

 

 

 

Schema

Summary:

Description:

 

          Properties:

Name

Type

Summary

 


 

GetOpenTicketsParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

filterByHoursSinceOpened

integer

 

Only get tickets that have been open for **longer** than x hours.

filterByHoursSinceOpenedMax

integer

 

Only get tickets that have been open for **less** than x hours.

filterByTopic

string

 

 

filterByExpertEmail

string

 

 


 

GetOpenTicketsResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

tickets

array of (Ticket)

 

 


 

GetTopicParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

topicName

string

 

 


 

GetTopicResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

topic

Topic

 

 

 

Topic

Summary:

Description:

 

          Properties:

Name

Type

Summary

name

string

 

 

description

string

 

 

 


 

OnAskedQuestionParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

url

string

 

 


 

OnNewAnswerParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

url

string

 

 


 

OnNewTicketParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

url

string

 

 


 

OnResolvedTicketParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

url

string

 

 


 

OnUpdateAnswerParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

url

string

 

 


 

OnUpdatedTicketTopicParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

url

string

 

 


 

OpenTicketFeedbackParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

userEmail

string

 

 

queryText

string

 

 

answerShortDescription

string

 

 

feedbackText

string

 

 


 

OpenTicketFeedbackResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

ticket

Ticket

 

 


 

OpenTicketQuestionParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

userEmail

string

 

 

queryText

string

 

 

topic

string

 

 


 

OpenTicketQuestionResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

ticket

Ticket

 

 


 

ParseTextParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

inputText

string

 

 

outputFormat

string

 

Values: [markdown, html, plain]


 

ParseTextResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

outputText

string

 

The parsed text returned by the COSMO Bot Script Parser.


 

RemoveExpertParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

expertEmail

string

 

 

topic

string

 

 


 

RenameTopicParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

name

string

 

The name of the existing topic to be renamed.

newName

string

 

The name that the topic will be renamed to.


 

Ticket

Summary:

Description:

 

          Properties:

Name

Type

Summary

ticketId

string

 

 

topic

string

 

 

ticketUrl

string

 

 

requesterEmail

string

 

 

expertEmails

array of (string)

 

 

queryText

string

 

 

feedbackText

string

 

This is empty if this ticket is not feedback.

answerShortDescription

string

 

This is empty if this ticket is not feedback.

answerText

string

 

This is empty if this ticket is not feedback.

dateTimeCreated

string(date-time)

 

 


 

TranslateParameterRequest body

Summary:

Description:

 

          Properties:

Name

Type

Summary

targetLanguageCode

string

 

The target language code (example: fr).

inputText

string

 

The text to translate.


 

TranslateResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

outputText

string