OTRS

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

Integration with LogicHub

Connecting with OTRS

To connect to OTRS following details are required:

  • Label: 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.
  • 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.

Actions with OTRS

Ticket Create

Create a ticket and return the created ticket ID.

Inputs to this action:

  • Connection: Choose a connection that you have created.
  • Jinja Template Title: Jinja-templated text containing title for a ticket.
  • Jinja Template Queue: Jinja-templated text containing queue for a ticket.
  • Customer User: Column name from the parent table to lookup value for Customer User.
  • State (Optional): Select a value for State to lookup. (Default is NEW)
  • Priority (Optional): Select a value for priority to lookup. (Default is NORMAL)
  • Jinja Template Type (Optional): Jinja-templated text containing type for a ticket.
  • Jinja Template Article Subject (Optional): Jinja-templated text containing article subject for a ticket.
  • Jinja Template Article Body (Optional): Jinja-templated text containing article body for a ticket.
  • Jinja Template Attachment Details (Optional): Jinja-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}}"}].

Output of action:
json containing following items:

  • 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.

Inputs to this action:

  • Connection: Choose a connection that you have created.
  • Jinja Template Ticket ID: Jinja-templated text containing comma-separated Ticket ID.
  • Jinja Template Title: Jinja-templated text containing title for a ticket.
  • Jinja Template Queue: Jinja-templated text containing queue for a ticket.
  • State (Optional): Select a value for State to lookup. (Default is NEW)
  • Priority (Optional): Select a value for priority to lookup. (Default is NORMAL)
  • Jinja Template Type (Optional): Jinja-templated text containing type for a ticket.
  • Jinja Template Article Subject (Optional): Jinja-templated text containing article subject for a ticket.
  • Jinja Template Article Body (Optional): JJinja-templated text containing article body for a ticket.
  • Jinja Template Attachment Details (Optional): Jinja-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}}"}].

Output of action:
json containing following items:

  • 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.

Inputs to this action:

  • Connection: Choose a connection that you have created.
  • Jinja Template Ticket ID: Jinja-templated text containing Ticket ID.
  • Include Articals (Optional): Select option to request OTRS to include all Articles (Default is 'True').
  • Include Attachments (Optional): Select option to request OTRS to include all Attachments (Default is 'True')
  • HTML Body As Attachment (Optional): Select 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').
  • Download Attachments (Optional): Automatically download attachments.Doing so may significantly increase processing time (Default is 'True' to get attachment).
  • Jinja Template Article Sender Type (Optional): Jinja-templated text containing article sender type. Example: {{article_sender_type_column}}.
  • Jinja Template Article Order (Optional): Jinja-templated text containing order of the articles. Example: {{article_order_column}}.
  • Article Limit (Optional): Maximum numbers of the articles to return per row.

Output of action:
json containing following items:

  • 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": "[email protected]",
      "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.

Inputs to this action:

  • Connection: Choose a connection that you have created.
  • Jinja Template Title (Optional): Jinja-templated text containing title for ticket.
  • Jinja Template Queue (Optional): Jinja-templated text containing comma separated list of queues for tickets to search.
  • Jinja Template Queue ID (Optional): Jinja-templated text containing comma separated list of queue ids for tickets to search.
  • Jinja Template Type (Optional): JJinja-templated text containing comma separated list of types for tickets to search.
  • Jinja Template Type ID (Optional): Jinja-templated text containing comma separated list of type ids for tickets to search.
  • Jinja Template State (Optional): Jinja-templated text containing comma separated list of states for tickets to search.
  • Jinja Template State ID (Optional): Jinja-templated text containing comma separated list of state ids for tickets to search.
  • Jinja Template State Type (Optional): Jinja-templated text containing comma separated list of state types for tickets to search.
  • Jinja Template State Type ID (Optional): Jinja-templated text containing comma separated list of state type ids for tickets to search.
  • Jinja Template Created After (Optional): Jinja-templated text containing datetime to search tickets created after specified time. Example: 2016-01-09 00:00:01
  • Jinja Template Created Before (Optional): Jinja-templated text containing datetime to search tickets created before specified time. Example: 2021-02-08 00:00:01
  • Jinja Template Created Within Past X Minutes (Optional): Number of minutes to search tickets created less than X minutes ago. Example: 120

Output of action:
json containing following items:

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

Did this page help you?