FreshserviceClient
Attributes
TRIGGER_OPERATIONS
module-attribute
TRIGGER_OPERATIONS: Dict[str, Dict[str, Any]] = {'OnTicketCreatedV2': {'operation_id': 'OnTicketCreatedV2', 'path': '/{connectionId}/trigger/api/v2/tickets', 'method': 'get', 'required_parameters': [], 'callback_payload_type': 'ListTicketResponse'}}
Classes
AddNoteResponse
dataclass
Response for Add a note to a ticket
CreateUpdateTicketResponse
dataclass
Response for Create a ticket
ListTicketResponse
dataclass
ListTicketResponse(created_at: Optional[str] = None, department_id: Optional[int] = None, due_by: Optional[str] = None, group_id: Optional[int] = None, id: Optional[int] = None, is_escalated: Optional[bool] = None, priority: Optional[int] = None, requester_id: Optional[int] = None, responder_id: Optional[int] = None, source: Optional[int] = None, spam: Optional[bool] = None, status: Optional[int] = None, subject: Optional[str] = None, type_: Optional[str] = None, updated_at: Optional[str] = None, description_text: Optional[str] = None, description: Optional[str] = None, to_emails: Optional[List[str]] = None)
Response for When a ticket is created
Attributes
created_at
class-attribute
instance-attribute
yyyy-MM-ddTHH:mm:ss.fffZ
group_id
class-attribute
instance-attribute
Id of Group to which the ticket is assigned.
is_escalated
class-attribute
instance-attribute
Set to true if an escalation was sent.
priority
class-attribute
instance-attribute
A number representing the priority of the ticket.
requester_id
class-attribute
instance-attribute
User-id of the requester. For existing contacts, requester_id can be passed instead of email.
responder_id
class-attribute
instance-attribute
Id of the agent to whom the ticket is assigned.
source
class-attribute
instance-attribute
A number representing the channel through which the ticket was created.
spam
class-attribute
instance-attribute
Set as true if the ticket is marked as spam.
status
class-attribute
instance-attribute
A number representing the status of the ticket.
type_
class-attribute
instance-attribute
Type property field as defined in ticket fields.
updated_at
class-attribute
instance-attribute
yyyy-MM-ddTHH:mm:ss.fffZ
description_text
class-attribute
instance-attribute
Description of the problem.
description
class-attribute
instance-attribute
HTML content of the ticket. Description and description_html should not be passed together.
CreateTicketRequest
dataclass
CreateTicketRequest(requester_id: Optional[int] = None, email: Optional[str] = None, phone: Optional[str] = None, name: Optional[str] = None, subject: Optional[str] = None, status: Optional[str] = None, priority: Optional[str] = None, description: Optional[str] = None, urgency: Optional[str] = None, impact: Optional[str] = None, source: Optional[str] = None)
Definition: CreateTicket_Request
Attributes
requester_id
class-attribute
instance-attribute
User-id of the requester. One of the Requester ID, Requester Email and Requester Phone is required
email
class-attribute
instance-attribute
Email of the requester. One of the Requester ID, Requester Email and Requester Phone is required
phone
class-attribute
instance-attribute
Phone number of the requester. One of the Requester ID, Requester Email and Requester Phone is required
name
class-attribute
instance-attribute
Name of the requester. This is a required field only if Requester Phone value is provided
priority
class-attribute
instance-attribute
The priority of the ticket (such as Low, Medium, or High).
description
class-attribute
instance-attribute
The description of the ticket.
urgency
class-attribute
instance-attribute
Urgency of the problem (such as Low, Medium or High).
impact
class-attribute
instance-attribute
Impact of the problem (such as Low, Medium or High).
UpdateTicketRequest
dataclass
UpdateTicketRequest(requester_id: Optional[int] = None, subject: Optional[str] = None, status: Optional[str] = None, priority: Optional[str] = None, urgency: Optional[str] = None, impact: Optional[str] = None, source: Optional[str] = None)
Definition: UpdateTicket_Request
Attributes
requester_id
class-attribute
instance-attribute
User-id of the requester. For existing contacts, requester_id can be passed instead of email.
priority
class-attribute
instance-attribute
The priority of the ticket (such as Low, Medium, or High).
urgency
class-attribute
instance-attribute
Urgency of the problem (such as Low, Medium or High).
impact
class-attribute
instance-attribute
Impact of the problem (such as Low, Medium or High).
AddNoteRequest
dataclass
TicketResponse
dataclass
TicketResponse(created_at: Optional[str] = None, deleted: Optional[bool] = None, department_id_value: Optional[int] = None, display_id: Optional[int] = None, due_by: Optional[str] = None, group_id: Optional[int] = None, id: Optional[int] = None, impact: Optional[int] = None, isescalated: Optional[bool] = None, owner_id: Optional[str] = None, priority: Optional[int] = None, requester_id: Optional[int] = None, responder_id: Optional[int] = None, source: Optional[int] = None, spam: Optional[bool] = None, status: Optional[int] = None, subject: Optional[str] = None, ticket_type: Optional[str] = None, to_email: Optional[str] = None, updated_at: Optional[str] = None, urgency: Optional[int] = None, description: Optional[str] = None, description_html: Optional[str] = None, status_name: Optional[str] = None, priority_name: Optional[str] = None, source_name: Optional[str] = None, responder_name: Optional[str] = None, to_emails: Optional[List[str]] = None, department_name: Optional[str] = None, assoc_problem_id: Optional[int] = None, assoc_change_id: Optional[int] = None, assoc_change_cause_id: Optional[int] = None, assoc_asset_id: Optional[int] = None, urgency_name: Optional[str] = None, impact_name: Optional[str] = None)
Definition: Ticket_Response
Attributes
created_at
class-attribute
instance-attribute
yyyy-MM-ddTHH:mm:ss.fffZ
deleted
class-attribute
instance-attribute
Set as true if the ticket is deleted/trashed. Deleted tickets will not be considered in any views except 'deleted' filter.
display_id
class-attribute
instance-attribute
Ticket Id specific to your account.
group_id
class-attribute
instance-attribute
Id of Group to which the ticket is assigned.
impact
class-attribute
instance-attribute
A number representing the impact of the problem.
isescalated
class-attribute
instance-attribute
Set to true if an escalation was sent.
owner_id
class-attribute
instance-attribute
Id of the agent to whom the problem is assigned.
priority
class-attribute
instance-attribute
A number representing the priority of the ticket.
requester_id
class-attribute
instance-attribute
User-id of the requester. For existing contacts, requester_id can be passed instead of email.
responder_id
class-attribute
instance-attribute
Id of the agent to whom the ticket is assigned.
source
class-attribute
instance-attribute
A number representing the channel through which the ticket was created.
spam
class-attribute
instance-attribute
Set as true if the ticket is marked as spam.
status
class-attribute
instance-attribute
A number representing the status of the ticket.
ticket_type
class-attribute
instance-attribute
Type property field as defined in ticket fields.
to_email
class-attribute
instance-attribute
Email address to which the incoming ticket email was sent.
updated_at
class-attribute
instance-attribute
yyyy-MM-ddTHH:mm:ss.fffZ
urgency
class-attribute
instance-attribute
A number representing the urgency of the problem.
description
class-attribute
instance-attribute
Description of the problem.
description_html
class-attribute
instance-attribute
HTML content of the ticket. Description and description_html should not be passed together.
status_name
class-attribute
instance-attribute
Status of the ticket.
priority_name
class-attribute
instance-attribute
Priority of the ticket.
source_name
class-attribute
instance-attribute
The channel through which the ticket was created.
responder_name
class-attribute
instance-attribute
Name of the agent to whom the ticket is assigned.
to_emails
class-attribute
instance-attribute
Email addresses to which the incoming ticket email was sent.
department_name
class-attribute
instance-attribute
Name of the department.
assoc_problem_id
class-attribute
instance-attribute
Id of the associated problem to the ticket.
assoc_change_id
class-attribute
instance-attribute
Id of the associated change to the problem.
assoc_change_cause_id
class-attribute
instance-attribute
Id of the change causing the ticket.
assoc_asset_id
class-attribute
instance-attribute
Id of the asset associated to the ticket.
urgency_name
class-attribute
instance-attribute
Urgency of the problem.
UpdateTicketResponse
dataclass
Definition: UpdateTicket_Response
FreshserviceClient
FreshserviceClient(connection_runtime_url: str, token_provider: Optional[TokenProvider] = None, options: Optional[ConnectorClientOptions] = None)
Bases: ConnectorClientBase
Typed client for freshservice connector.
Initialize a FreshserviceClient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connection_runtime_url
|
str
|
The connection runtime URL from Azure Portal. |
required |
token_provider
|
Optional[TokenProvider]
|
Optional token provider. Defaults to ManagedIdentityTokenProvider. |
None
|
options
|
Optional[ConnectorClientOptions]
|
Optional connector client options. |
None
|
Methods:
add_note_async
async
Add a note to a ticket
Add a private or public note to a ticket.
create_ticket_async
async
Create a ticket
Create a ticket.