Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gorgias): action to create a ticket in gorgias #157

Closed
wants to merge 11 commits into from
48 changes: 39 additions & 9 deletions flows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4301,6 +4301,21 @@ integrations:
endpoint:
method: GET
path: /tickets
version: 1.0.1
actions:
create-ticket:
description: |
Creates a new ticket
input: CreateTicketInput
scopes:
- tickets:write
- account:read
- customers:write
- customers:read
endpoint:
method: POST
path: /ticket
output: Ticket
models:
Ticket:
id: number
Expand All @@ -4313,15 +4328,15 @@ integrations:
sms | twitter | twitter-direct-message | whatsapp | yotpo-review
closed_datetime: string | null
created_datetime: string | null
excerpt: string
excerpt?: string | undefined
external_id: string | null
from_agent: boolean
integrations: array | null
integrations?: array | null | undefined
is_unread: boolean
language: string | null
last_message_datetime: string | null
last_received_message_datetime: string | null
messages_count: number
messages_count?: number | undefined
messages: Message[]
meta: object | null
opened_datetime: string | null
Expand All @@ -4333,8 +4348,8 @@ integrations:
name: string
uri: string | null
decoration: object | null
created_datetime: string | null
deleted_datetime: string | null
created_datetime?: string | null | undefined
deleted_datetime?: string | null | undefined
spam: boolean | null
trashed_datetime: string | null
updated_datetime: string | null
Expand Down Expand Up @@ -4378,8 +4393,8 @@ integrations:
public: boolean
from_agent: boolean
sender: RecieverSender
receiver: RecieverSender
attachments: Attachment[]
receiver: RecieverSender | null
attachments: Attachment[] | null
meta: object | null
headers: object | null
actions: array | null
Expand All @@ -4389,8 +4404,8 @@ integrations:
failed_datetime: string | null
last_sending_error: object | null
deleted_datetime: string | null
replied_by: string | null
replied_to: string | null
replied_by?: string | null | undefined
replied_to?: string | null | undefined
AssigneeUser:
id: number
firstname: string
Expand Down Expand Up @@ -4418,6 +4433,21 @@ integrations:
content_type: string
public: boolean
extra: string | null
CreateTicketInput:
customer:
phone_number: string
email?: string | undefined
ticket:
messages: CreateTicketMessage[]
CreateTicketMessage:
attachments:
- url: string
name: string
size: number
content_type: string
body_html: string
body_text: string
id: string
greenhouse-basic:
syncs:
applications:
Expand Down
142 changes: 142 additions & 0 deletions integrations/gorgias/actions/create-ticket.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
<!-- BEGIN GENERATED CONTENT -->
# Create Ticket

## General Information

- **Description:** Creates a new ticket

- **Version:** 0.0.1
- **Group:** Others
- **Scopes:** `tickets:write, account:read, customers:write, customers:read`
- **Endpoint Type:** Action
- **Code:** [github.com](https://github.com/NangoHQ/integration-templates/tree/main/integrations/gorgias/actions/create-ticket.ts)


## Endpoint Reference

### Request Endpoint

`POST /ticket`

### Request Query Parameters

_No request parameters_

### Request Body

```json
{
"customer": {
"phone_number": "<string>",
"email?": "<string | undefined>"
},
"ticket": {
"messages": [
{
"attachments": {
"0": {
"url": "<string>",
"name": "<string>",
"size": "<number>",
"content_type": "<string>"
}
},
"body_html": "<string>",
"body_text": "<string>",
"id": "<string>"
}
]
}
}
```

### Request Response

```json
{
"id": "<number>",
"assignee_user": "<AssigneeUser | null>",
"channel": "<aircall | api | chat | contact_form | email | facebook | facebook-mention | facebook-messenger | facebook-recommendations | help-center | instagram-ad-comment | instagram-comment | instagram-direct-message | instagram-mention | internal-note | phone | sms | twitter | twitter-direct-message | whatsapp | yotpo-review>",
"closed_datetime": "<string | null>",
"created_datetime": "<string | null>",
"excerpt?": "<string | undefined>",
"external_id": "<string | null>",
"from_agent": "<boolean>",
"integrations?": "<array | null | undefined>",
"is_unread": "<boolean>",
"language": "<string | null>",
"last_message_datetime": "<string | null>",
"last_received_message_datetime": "<string | null>",
"messages_count?": "<number | undefined>",
"messages": [
{
"id": "<number>",
"uri": "<string>",
"message_id": "<string | null>",
"integration_id": "<number | null>",
"rule_id": "<number | null>",
"external_id": "<string | null>",
"ticket_id": "<number>",
"channel": "<aircall | api | chat | contact_form | email | facebook | facebook-mention | facebook-messenger | facebook-recommendations | help-center | instagram-ad-comment | instagram-comment | instagram-direct-message | instagram-mention | internal-note | phone | sms | twitter | twitter-direct-message | whatsapp | yotpo-review>",
"via": "<aircall | api | chat | contact_form | email | facebook | facebook-mention | facebook-messenger | facebook-recommendations | form | gorgias_chat | help-center | helpdesk | instagram | instagram-ad-comment | instagram-comment | instagram-direct-message | instagram-mention | internal-note | offline_capture | phone | rule | self_service | shopify | sms | twilio | twitter | twitter-direct-message | whatsapp | yotpo | yotpo-review | zendesk>",
"subject": "<string | null>",
"body_text": "<string | null>",
"body_html": "<string | null>",
"stripped_text": "<string | null>",
"stripped_html": "<string | null>",
"stripped_signature": "<string | null>",
"public": "<boolean>",
"from_agent": "<boolean>",
"sender": {
"id": "<number>",
"firstname": "<string>",
"lastname": "<string>",
"meta": "<object | null>",
"email": "<string | null>",
"name": "<string | null>"
},
"receiver": "<RecieverSender | null>",
"attachments": "<Attachment[] | null>",
"meta": "<object | null>",
"headers": "<object | null>",
"actions": "<array | null>",
"macros": "<array | null>",
"created_datetime": "<string | null>",
"opened_datetime": "<string | null>",
"failed_datetime": "<string | null>",
"last_sending_error": "<object | null>",
"deleted_datetime": "<string | null>",
"replied_by?": "<string | null | undefined>",
"replied_to?": "<string | null | undefined>"
}
],
"meta": "<object | null>",
"opened_datetime": "<string | null>",
"snooze_datetime": "<string | null>",
"status": "<open | closed>",
"subject": "<string | null>",
"tags": {
"0": {
"id": "<number>",
"name": "<string>",
"uri": "<string | null>",
"decoration": "<object | null>",
"created_datetime?": "<string | null | undefined>",
"deleted_datetime?": "<string | null | undefined>"
}
},
"spam": "<boolean | null>",
"trashed_datetime": "<string | null>",
"updated_datetime": "<string | null>",
"via": "<aircall | api | chat | contact_form | email | facebook | facebook-mention | facebook-messenger | facebook-recommendations | form | gorgias_chat | help-center | helpdesk | instagram | instagram-ad-comment | instagram-comment | instagram-direct-message | instagram-mention | internal-note | offline_capture | phone | rule | self_service | shopify | sms | twilio | twitter | twitter-direct-message | whatsapp | yotpo | yotpo-review | zendesk>",
"uri": "<string>"
}
```

## Changelog

- [Script History](https://github.com/NangoHQ/integration-templates/commits/main/integrations/gorgias/actions/create-ticket.ts)
- [Documentation History](https://github.com/NangoHQ/integration-templates/commits/main/integrations/gorgias/actions/create-ticket.md)

<!-- END GENERATED CONTENT -->

Loading
Loading