OTRS

Version: 2.0.0

OTRS is a modern, flexible ticket and process management system.

Connect OTRS with LogicHub

  1. Navigate to Automations > Integrations.
  2. Search for OTRS.
  3. Click Details, then the + icon. Enter the required information in the following fields.
    • Label: Enter a connection name.
    • Reference Values: Define variables here to templatize integration connections and actions. For example, you can use https://www.{{hostname}}.com where, hostname is a variable defined in this input. For more information on how to add data, see 'Add Data' Input Type for Integrations.
    • Verify SSL: Select option to verify connecting server's SSL certificate (Default is Verify SSL Certificate).
    • Remote Agent: Run this integration using the LogicHub Remote Agent.
    • Server URL: The Server URL to connect to the OTRS.
    • Server Time Zone (Optional): The Server time zone to connect to the OTRS. Example: -04:00.If provided, This time will be added to created after/before input parameter of ticket get action.
    • Username: The Username to connect to the OTRS.
    • Password: The Password to connect to the OTRS.
  4. After you've entered all the details, click Connect.

Actions for OTRS

Ticket Create

Create a ticket and return the created ticket id.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
TitleJinja-templated text containing title for ticket.Required
QueueJinja-templated text containing queue for ticket.Required
Customer UserJinja-templated text containing value for Customer User.Required
StateJinja-templated text containing State to lookup. (Default is NEW)Optional
PriorityJinja-templated text containing priority to lookup. (Default is NORMAL)Optional
TypeJinja-templated text containing type for ticket.Optional
Article SubjectJinja-templated text containing article subject for ticket.Optional
Article BodyJinja-templated text containing article body for ticket.Optional
Article Content TypeJinja-templated text containing article content type for ticket (Default is text/html; charset=utf8)Optional
Attachment DetailsJinja-templated text containing File names and File IDs in JSON format (file_name key is optional). Example: [{"file_name": "{{file_name_1}"}, "file_id": "{{file_id_1}}"}, {"file_id": "{{file_id_2}}"}]Optional
Dynamic FieldJinja-templated text containing the Dynamic Field parameter of Ticket. Example: {{otrs_dynamic_field}}Optional
Number of retries requiredNumber of retries required (Default is 2)Optional

Output

JSON containing the following items:

{
  "ticket_id": "606028",
  "error": null,
  "has_error": false
}

Ticket Create (Deprecated)

Create a ticket and return the created ticket ID.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
TitleJinja-templated text containing title for a ticket.Required
QueueJinja-templated text containing queue for a ticket.
Customer UserColumn name from the parent table to lookup value for Customer User.
StateSelect a value for State to lookup. (Default is NEW).
PrioritySelect a value for priority to lookup. (Default is NORMAL).
TypeJinja-templated text containing type for a ticket.Optional
Article SubjectJinja-templated text containing article subject for a ticket.Optional
Article BodyJinja-templated text containing article body for a ticket.Optional
Attachment DetailsJinja-templated text containing File names and File IDs in JSON format (file_name key is optional). Example: [{"file_name": "{{file_name_1}"}, "file_id": "{{file_id_1}}"}, {"file_id": "{{file_id_2}}"}].Optional
Dynamic FieldJinja-templated text containing the Dynamic Field parameter of Ticket. Example: {{otrs_dynamic_field}}Optional
Number of retries requiredNumber of retries required to create a ticket.Optional

Output

A JSON object containing multiple rows of result:

  • has_error: True/False
  • error: message/null
  • result: Ticket ID.
{
  "ticket_id": "606028",
  "error": null,
  "has_error": false
}

Ticket Update

Update a ticket and return the updated ticket id.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
Ticket IDJinja-templated text containing coma separated Ticket ID.Required
TitleJinja-templated text containing title for ticket.Optional
QueueJinja-templated text containing queue for ticket.Optional
StateJinja-templated text containing State to lookup.Optional
PriorityJinja-templated text containing priority to lookup.Optional
ServiceJinja-templated text containing service to lookup.Optional
TypeJinja-templated text containing type for ticket.Optional
Article SubjectJinja-templated text containing article subject for ticket.Optional
Article BodyJinja-templated text containing article body for ticket.Optional
Article Content TypeJinja-templated text containing article content type for ticket (Default is text/html; charset=utf8)Optional
Attachment DetailsJinja-templated text containing File names and File IDs in JSON format (file_name key is optional). Example: [{"file_name": "{{file_name_1}"}, "file_id": "{{file_id_1}}"}, {"file_id": "{{file_id_2}}"}]Optional
Dynamic FieldJinja-templated text containing the Dynamic Field parameter of Ticket. Example: {{otrs_dynamic_field}}Optional
Number of retries requiredNumber of retries required (Default is 2)Optional

Output

JSON containing the following items:

{
  "ticket_id": "606028",
  "error": null,
  "has_error": false
}

Ticket Update (Deprecated)

Update a ticket and return the updated ticket ID.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
Ticket IDJinja-templated text containing comma-separated Ticket ID.Required
TitleJinja-templated text containing title for a ticket.Required
QueueJinja-templated text containing queue for a ticket.Required
StateSelect a value for State to lookup. (Default is NEW).Optional
PrioritySelect a value for priority to lookup. (Default is NORMAL).Optional
TypeJinja-templated text containing type for a ticket.Optional
Article SubjectJinja-templated text containing article subject for a ticket.Optional
Article BodyJinja-templated text containing article body for a ticket.Optional
Attachment DetailsJinja-templated text containing File names and File IDs in JSON format (file_name key is optional). Example: [{"file_name": "{{file_name_1}"}, "file_id": "{{file_id_1}}"}, {"file_id": "{{file_id_2}}"}].Optional
Dynamic FieldJinja-templated text containing the Dynamic Field parameter of Ticket. Example: {{otrs_dynamic_field}}Optional
Number of retries requiredNumber of retries required to update a ticket.Optional

Output

A JSON object containing multiple rows of result:

  • has_error: True/False
  • error: message/null
  • result: Ticket ID.
{
  "ticket_id": "606028",
  "error": null,
  "has_error": false
}

Ticket Get

Return ticket entries by ID.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
Ticket IDJinja-templated text containing Ticket ID.
Include ArticalsSelect option to request OTRS to include all Articles (Default is 'True').Optional
Include AttachmentsSelect option to request OTRS to include all Attachments (Default is 'True').Optional
HTML Body As AttachmentSelect option to request OTRS for 'HTML body as attachment' , If enabled the HTML body version of each article is added to the attachments (Default is 'True').Optional
Download AttachmentsAutomatically download attachments.Doing so may significantly increase processing time (Default is 'True' to get attachment).Optional
Article Sender TypeJinja-templated text containing article sender type. Example: {{article_sender_type_column}}.Optional
Article OrderJinja-templated text containing order of the articles. Example: {{article_order_column}}.Optional
Article LimitMaximum numbers of the articles to return per row.Optional
Number of retries requiredNumber of retries required to get a ticket.Optional

Output

A JSON object containing multiple rows of result:

  • has_error: True/False
  • error: message/null
  • result: Ticket Details.
{
  "result": {
    "py/object": "pyotrs.lib.Ticket",
    "fields": {
      "Age": 25586,
      "PriorityID": "1",
      "ServiceID": "",
      "Type": "100 - ****",
      "Responsible": "root@localhost",
      "StateID": "4",
      "ResponsibleID": "1",
      "ChangeBy": "402",
      "EscalationTime": "0",
      "OwnerID": "402",
      "Changed": "2021-01-04 07:23:08",
      "TimeUnit": 0,
      "RealTillTimeNotUsed": "0",
      "GroupID": "26",
      "Owner": "abc_abc",
      "CustomerID": "CID",
      "TypeID": "12",
      "Created": "2021-01-04 04:19:47",
      "Priority": "1 very low",
      "UntilTime": 0,
      "EscalationUpdateTime": "0",
      "Queue": "Q_CUOL_Srbvbte",
      "QueueID": "21",
      "State": "open",
      "Title": "title",
      "CreateBy": "402",
      "TicketID": "605361",
      "StateType": "open",
      "UnlockTimeout": "1609759169",
      "EscalationResponseTime": "0",
      "EscalationSolutionTime": "0",
      "LockID": "1",
      "TicketNumber": "7605358",
      "ArchiveFlag": "n",
      "Lock": "unlock",
      "SLAID": "",
      "CustomerUserID": "[email protected]"
    },
    "tid": 605361,
    "articles": [],
    "dynamic_fields": [
      {
        "py/object": "pyotrs.lib.DynamicField",
        "name": "01a",
        "value": null,
        "search_patterns": [
          null
        ],
        "search_operator": "Equals"
      },
      {
        "py/object": "pyotrs.lib.DynamicField",
        "name": "02caa",
        "value": null,
        "search_patterns": [
          null
        ],
        "search_operator": "Equals"
      },
      {
        "py/object": "pyotrs.lib.DynamicField",
        "name": "0ctos",
        "value": null,
        "search_patterns": [
          null
        ],
        "search_operator": "Equals"
      },
      {
        "py/object": "pyotrs.lib.DynamicField",
        "name": "0on",
        "value": null,
        "search_patterns": [
          null
        ],
        "search_operator": "Equals"
      },
      {
        "py/object": "pyotrs.lib.DynamicField",
        "name": "uiid",
        "value": null,
        "search_patterns": [
          null
        ],
        "search_operator": "Equals"
      },
      {
        "py/object": "pyotrs.lib.DynamicField",
        "name": "hgjg",
        "value": null,
        "search_patterns": [
          null
        ],
        "search_operator": "Equals"
      },
      {
        "py/object": "pyotrs.lib.DynamicField",
        "name": "hghjg",
        "value": null,
        "search_patterns": [
          null
        ],
        "search_operator": "Equals"
      },
      {
        "py/object": "pyotrs.lib.DynamicField",
        "name": "786hgg",
        "value": null,
        "search_patterns": [
          null
        ],
        "search_operator": "Equals"
      },
      {
        "py/object": "pyotrs.lib.DynamicField",
        "name": "hggjh",
        "value": null,
        "search_patterns": [
          null
        ],
        "search_operator": "Equals"
      },
      {
        "py/object": "pyotrs.lib.DynamicField",
        "name": "hggvbhj",
        "value": null,
        "search_patterns": [
          null
        ],
        "search_operator": "Equals"
      },
      {
        "py/object": "pyotrs.lib.DynamicField",
        "name": "ghjg",
        "value": null,
        "search_patterns": [
          null
        ],
        "search_operator": "Equals"
      },
      {
        "py/object": "pyotrs.lib.DynamicField",
        "name": "fyuffj",
        "value": null,
        "search_patterns": [
          null
        ],
        "search_operator": "Equals"
      },
      {
        "py/object": "pyotrs.lib.DynamicField",
        "name": "gfgghfh",
        "value": null,
        "search_patterns": [
          null
        ],
        "search_operator": "Equals"
      },
      {
        "py/object": "pyotrs.lib.DynamicField",
        "name": "dfhgfcgjvj",
        "value": null,
        "search_patterns": [
          null
        ],
        "search_operator": "Equals"
      },
      {
        "py/object": "pyotrs.lib.DynamicField",
        "name": "dfh",
        "value": null,
        "search_patterns": [
          null
        ],
        "search_operator": "Equals"
      }
    ]
  },
  "error": null,
  "has_error": false
}

Ticket Search

Return a list of ticket ids.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
TitleJinja-templated text containing title for ticket.Optional
QueueJinja-templated text containing comma separated list of queues for tickets to search.Optional
Queue IDJinja-templated text containing comma separated list of queue ids for tickets to search.Optional
TypeJJinja-templated text containing comma separated list of types for tickets to search.Optional
Type IDJinja-templated text containing comma separated list of type ids for tickets to search.Optional
StateJinja-templated text containing comma separated list of states for tickets to search.Optional
State IDJinja-templated text containing comma separated list of state ids for tickets to search.Optional
State TypeJinja-templated text containing comma separated list of state types for tickets to search.Optional
State Type IDJinja-templated text containing comma separated list of state type ids for tickets to search.Optional
Created AfterJinja-templated text containing datetime to search tickets created after specified time. Example: 2016-01-09 00:00:01Optional
Created BeforeJinja-templated text containing datetime to search tickets created before specified time. Example: 2021-02-08 00:00:01Optional
Created Within Past X MinutesNumber of minutes to search tickets created less than X minutes ago. Example: 120Optional
Number of retries requiredNumber of retries required to search tickets.Optional

Output

A JSON object containing multiple rows of result:

  • has_error: True/False
  • error: message/null
  • result: List Of Ticket IDs.
{
  "error": null,
  "has_error": false,
  "result": "123456"
}

Release Notes

  • v2.0.0 - Updated architecture to support IO via filesystem
  • v1.3.1 -
    • Deprecated old version of Ticket Create and Ticket Update actions.
    • Change Customer User, State and Priority fields to Jinja-templated fields in Ticket Create and Ticket Update actions.
    • Added optional field Service in Ticket Update action.
  • v1.2.9 - Fixed timeout bug.
  • v1.2.8 - Bug Fix - Resolved the default value error in dynamic field.
  • v1.2.7 - Added dynamic field parameter in Ticket Create and Ticket Update actions.

© 2017-2021 LogicHub®. All Rights Reserved.