> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Process Ticket When Read

> When a user view/read a ticket, a number of action should be performed: set read status, escalation handling, remove notifications, etc.

Which actions will be performed depends on owner, caller and configuration
NsApiSlow threshold: 2000 ms.



## OpenAPI

````yaml /openapi/agent/openapi-v3-TicketAgent.json post /api/v1/Agents/Ticket/ProcessTicketWhenRead
openapi: 3.0.0
info:
  version: v1-Agents
  title: SuperOffice Agent API v1
  description: SuperOffice Agent API - TicketAgent
  contact:
    name: SuperOffice DevNet
    url: https://docs.superoffice.com/en/api/index.html
    email: sdk@superoffice.com
servers:
  - url: http://localhost:56350
  - url: https://localhost:56350
security: []
tags: []
externalDocs:
  description: >-
    The SuperOffice DevNet Community has more documentation, examples, and
    discussion forums.
  url: https://community.superoffice.com/en/developer/
paths:
  /api/v1/Agents/Ticket/ProcessTicketWhenRead:
    post:
      tags:
        - Ticket_Agent
      summary: Process Ticket When Read
      description: "When a user view/read a ticket, a number of action should be performed: set read status, escalation handling, remove notifications, etc.\n\nWhich actions will be performed depends on owner, caller and configuration\r\nNsApiSlow threshold: 2000 ms."
      operationId: v1TicketAgent_ProcessTicketWhenRead
      parameters:
        - name: $select
          in: query
          description: >-
            Optional comma separated list of properties to include in the
            result. Other fields are then nulled out to reduce payload size:
            "Name,department,category". Default = show all fields.
          required: false
          schema:
            type: string
        - name: Accept-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code.
          required: false
          schema:
            type: string
        - name: SO-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code. Overrides Accept-Language value.
          required: false
          schema:
            type: string
        - name: SO-Culture
          in: header
          description: >-
            Number, date formatting in a specified culture (iso2 language) code.
            Partially overrides SO-Language/Accept-Language value. Ignored if no
            Language set.
          required: false
          schema:
            type: string
        - name: SO-TimeZone
          in: header
          description: >-
            Specify the timezone code that you would like date/time responses
            converted to.
          required: false
          schema:
            type: string
        - name: SO-AppToken
          in: header
          description: >-
            The application token that identifies the partner app. Used when
            calling Online WebAPI from a server.
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.ProcessTicketWhenReadRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.ProcessTicketWhenReadRequest
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.ProcessTicketWhenReadRequest
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.ProcessTicketWhenReadRequest
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.ProcessTicketWhenReadRequest
          application/json-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.ProcessTicketWhenReadRequest
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.ProcessTicketWhenReadRequest
        description: TicketEntityId
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.TicketEntity'
            text/json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.TicketEntity'
            application/xml:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.TicketEntity'
            text/xml:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.TicketEntity'
            application/json-patch+json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.TicketEntity'
            application/merge-patch+json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.TicketEntity'
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.WebApi.v1.Carriers.TicketCarriers.ProcessTicketWhenReadRequest:
      description: >-
        ProcessTicketWhenRead: When a user view/read a ticket, a number of
        action should be performed: set read status, escalation handling, remove
        notifications, etc. Which actions will be performed depends on owner,
        caller and configuration
      type: object
      properties:
        TicketEntityId:
          format: int32
          type: integer
    SuperOffice.CRM.Services.TicketEntity:
      description: "The ticket entity is used for representing a service ticket\r\n<para />\r\nCarrier object for TicketEntity.\r\nServices for the TicketEntity Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.ITicketAgent\">Ticket Agent</see>."
      type: object
      properties:
        TicketId:
          format: int32
          description: The primary key (auto-incremented)
          type: integer
        Title:
          description: The title of the ticket.
          type: string
        CreatedAt:
          format: date-time
          description: When the ticket was created.
          type: string
        LastChanged:
          format: date-time
          description: The last time the ticket was modified.
          type: string
        ReadByOwner:
          format: date-time
          description: The datetime for when the ticket last was read by the owner.
          type: string
        ReadByCustomer:
          format: date-time
          description: The datetime for when the ticket was read by the customer.
          type: string
        FirstReadByOwner:
          format: date-time
          description: >-
            The datetime for when the ticket first was read by the current
            owner.
          type: string
        FirstReadByUser:
          format: date-time
          description: The datetime for when the ticket first was read by a user.
          type: string
        Activate:
          format: date-time
          description: When the ticket should be activated, if it is postponed.
          type: string
        ClosedAt:
          format: date-time
          description: When the ticket was closed.
          type: string
        RepliedAt:
          format: date-time
          description: >-
            The datetime for when the ticket was replied to. I.e. the first
            external message added to the ticket.
          type: string
        AlertTimeout:
          format: date-time
          description: >-
            The datetime for when the ticket should jump to the next
            alert_level.
          type: string
        Deadline:
          format: date-time
          description: Deadline for ticket.
          type: string
        CreatedBy:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.Associate'
        Author:
          description: >-
            A string representing the author of the ticket (same as author of
            first message).
          type: string
        OwnedBy:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.Associate'
        Category:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.TicketCategoryEntity'
        Slevel:
          description: The securitylevel of the ticket.
          enum:
            - Unknown
            - Internal
            - External
          type: string
        Priority:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.TicketPriorityEntity'
        BaseStatus:
          description: "The status of the ticket. I.e. active/closed/postponed/deleted \r\n<para>Use MDO List name \"ticketstatus\" to get list items.</para>"
          enum:
            - Unknown
            - Active
            - Closed
            - Postponed
            - Deleted
            - Merged
            - Spam
            - PostponedSpecific
            - Postponed1Hour
            - Postponed2Hours
            - Postponed3Hours
            - Postponed4Hours
            - PostponedDay
            - PostponedWeek
            - PostponedMonth
          type: string
        Status:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.TicketStatusEntity'
        Origin:
          description: What is the origin of this ticket
          enum:
            - Unknown
            - Email
            - SMS
            - Fax
            - Phone
            - Facebook
            - Twitter
            - Internal
            - CustomerCentre
            - EMarketing
            - AutoGenerated
            - Chat
            - Form
            - API
            - Flow
          type: string
        Person:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.Person'
        SecondaryPersons:
          description: "The secondary persons this ticket is connected to \r\n<para>Use MDO List name \"person_new\" to get list items.</para>"
          type: array
          items:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.Person'
        AlertLevel:
          format: int32
          description: >-
            The alert level for the ticket. Matches the level value of the
            ticket_alert table.
          type: integer
        ConnectId:
          format: int32
          description: >-
            If a ticket is connected to another ticket, this field is set to the
            id of the &apos;master&apos; ticket.
          type: integer
        ReadStatus:
          description: Whether the owner has read the ticket or not (red, yellow, green).
          enum:
            - Unknown
            - Green
            - Yellow
            - Red
          type: string
        TimeToReply:
          format: int32
          description: >-
            The time (minutes) between when the ticket was created and when it
            was replied to. Calculated based on priority&apos;s timeframe.
          type: integer
        RealTimeToReply:
          format: int32
          description: Same as time_to_reply, but not calculated based on priority.
          type: integer
        TimeToClose:
          format: int32
          description: >-
            The time (minutes) between when the ticket was created and when it
            was closed. Calculated based on priority&apos;s timeframe.
          type: integer
        RealTimeToClose:
          format: int32
          description: Same as time_to_close, but not calculated based on priority.
          type: integer
        TimeSpentInternally:
          format: int32
          description: >-
            The total time (seconds) within the priority's office hours the
            ticket has been in an open status (configurable), not including
            current state
          type: integer
        TimeSpentExternally:
          format: int32
          description: >-
            The total time (seconds) within the priority's office hours the
            ticket has been in a external waiting status (configurable), not
            including current state
          type: integer
        TimeSpentQueue:
          format: int32
          description: >-
            The total time (seconds) within the priority's office hours the
            ticket has been in a queue status, not including current state
          type: integer
        RealTimeSpentInternally:
          format: int32
          description: >-
            The total time (seconds) within 24x7 the ticket has been in an open
            status (configurable), not including current state
          type: integer
        RealTimeSpentExternally:
          format: int32
          description: >-
            The total time (seconds) within 24x7 the ticket has been in a
            external waiting status (configurable), not including current state
          type: integer
        RealTimeSpentQueue:
          format: int32
          description: >-
            The total time (seconds) within 24x7 hours the ticket has been in a
            queue status, not including current state
          type: integer
        TimeSpent:
          format: int32
          description: >-
            The total time (minutes). Aggregated time spent from ticket&apos;s
            messages. Read-only for external use.
          type: integer
        HasAttachment:
          description: Boolean indicating if this ticket has one or more attachments.
          type: boolean
        NumReplies:
          format: int32
          description: The number of replies (messages) to the customer for this request.
          type: integer
        NumMessages:
          format: int32
          description: The total number of messages for this request.
          type: integer
        FromAddress:
          description: The from-address used when this ticket got created, e.g. by email
          type: string
        Messages:
          description: >-
            TicketMessageId,CreatedAt,SLevel and Important for all the messages
            connected to this ticket. For message body see the
            TicketMessageEntity or the TicketMessage archive.
          type: array
          items:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.TicketMessage'
        Tags:
          description: An array containing the tags assigned to this request
          type: array
          items:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.Tag'
        Language:
          description: The language of the first external message
          type: string
        Sentiment:
          format: int32
          description: The sentiment index of the last external message
          type: integer
        SentimentConfidence:
          format: int32
          description: The sentiment confidence of the last external message
          type: integer
        SuggestedCategoryId:
          format: int32
          description: Suggestion for categorization, based on the text of the message (AI)
          type: integer
        SuggestedCategoryName:
          description: Suggested category from AI
          type: string
        OrigHumanCategoryId:
          format: int32
          description: >-
            Will contain the category id selected by the user, when having the
            choice of using the suggested category or manually selecting a
            category
          type: integer
        IconHint:
          description: Icon representing ticket's state
          type: string
        Sale:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.Sale'
        Project:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.Project'
        FormSubmission:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.TicketFormSubmission'
        TicketType:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.TicketType'
        ActiveStatusMonitorId:
          format: int32
          description: >-
            Active status monitor identity for related contact. This is a
            read-only property and is ignored on Save
          type: integer
        ExtraFields:
          description: "Deprecated: Use {SuperOffice.CRM.Services.TicketEntity.CustomFields} instead.\r\nExtra fields added to the carrier. This could be data from Plug-ins, the foreign key system, external applications, etc."
          type: object
          additionalProperties:
            type: string
        CustomFields:
          description: "Udef + Extra fields added to the carrier. Extra fields as defined by changes to database schema + user-defined fields as defined by admin.\r\nCustom fields combines user defined fields and extra fields into one bucket. \r\nThe individual {SuperOffice.CRM.Services.TicketEntity.ExtraFields} and <see cref=\"!:UserDefinedFields\">UserDefinedFields</see> properties are deprecated in favor of this\r\ncombined collection."
          type: object
          additionalProperties:
            type: string
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Services.Associate:
      description: "Carrier object for Associate.\r\nServices for the Associate Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IAssociateAgent\">Associate Agent</see>."
      type: object
      properties:
        AssociateId:
          format: int32
          description: Primary key
          type: integer
        Name:
          description: Initials, also login name, possibly database user name
          type: string
        PersonId:
          format: int32
          description: "Owning person record \r\n<para>Use MDO List name \"person\" to get list items.</para>"
          type: integer
        Rank:
          format: int32
          description: Rank order
          type: integer
        Tooltip:
          description: Tooltip or other description
          type: string
        Type:
          description: >-
            User type - 1 = internal user, 2 = resource, 3 = external user, 4 =
            anonymous, 5 = system
          enum:
            - Unknown
            - InternalAssociate
            - ResourceAssociate
            - ExternalAssociate
            - AnonymousAssociate
            - SystemAssociate
          type: string
        GroupIdx:
          format: int32
          description: >-
            Primary group membership, see UserGroupLink for secondary
            memberships
          type: integer
        FullName:
          description: >-
            The associate's culture formatted fullname (firstname, middleName
            and lastname)
          type: string
        FormalName:
          description: >-
            The associate's culture formatted formalname (firstname, middleName
            and lastname, title, mrmrs)
          type: string
        Deleted:
          description: >-
            If true, the user is retired and should have no rights, not appear
            in lists, etc.
          type: boolean
        EjUserId:
          format: int32
          description: >-
            ID of the ej user record corresponding to this associate; 0 for
            associates that are not ej users
          type: integer
        UserName:
          description: User name
          type: string
        ExtraFields:
          description: "Deprecated: Use {SuperOffice.CRM.Services.Associate.CustomFields} instead.\r\nExtra fields added to the carrier. This could be data from Plug-ins, the foreign key system, external applications, etc."
          type: object
          additionalProperties:
            type: string
        CustomFields:
          description: "Udef + Extra fields added to the carrier. Extra fields as defined by changes to database schema + user-defined fields as defined by admin.\r\nCustom fields combines user defined fields and extra fields into one bucket. \r\nThe individual {SuperOffice.CRM.Services.Associate.ExtraFields} and <see cref=\"!:UserDefinedFields\">UserDefinedFields</see> properties are deprecated in favor of this\r\ncombined collection."
          type: object
          additionalProperties:
            type: string
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Services.TicketCategoryEntity:
      description: "This entity describes the meta data for a ticket category, and provides special operations on it.\r\n<para />\r\nCarrier object for TicketCategoryEntity.\r\nServices for the TicketCategoryEntity Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IListAgent\">List Agent</see>."
      type: object
      properties:
        TicketCategoryId:
          format: int32
          description: The id of the ticket category. (primary key)
          type: integer
        ParentId:
          format: int32
          description: >-
            The parent category for this category. -1 if this is a toplevel
            category.
          type: integer
        Name:
          description: The (short) name of this category. E.g. &apos;support&apos;.
          type: string
        Fullname:
          description: >-
            The fullname (compiled from parents&apos; names) for this category.
            E.g. &apos;norway/product A/support&apos;.
          type: string
        CategoryMaster:
          format: int32
          description: The user associated with this category.
          type: integer
        Flags:
          description: A bitmask representing flags for this category.
          enum:
            - Unknown
            - Internal
            - OnlyLoggedInUsers
            - DefaultToCategoryMaster
            - ListInMain
            - RedelegateNewMsg
            - DelegateToOurContact
            - PropagateReplyTemplate
            - MembersOnly
            - NotifyMembers
            - AcceptWhenReplying
          type: string
        DelegateMethod:
          description: An integer indicating the delegation method for this category.
          enum:
            - Unknown
            - Even
            - Weighted
            - Unfair
            - Not
          type: string
        ExternalName:
          description: The external name for this category, used for the customer frontend.
          type: string
        ClosingStatus:
          description: Determines the default status used in the GUI when creating a ticket
          enum:
            - UserDefined
            - Active
            - Closed
            - Postponed
          type: string
        MsgClosingStatus:
          description: >-
            Determines the default status used in the GUI when adding a request
            to a ticket
          enum:
            - UserDefined
            - Active
            - Closed
            - Postponed
          type: string
        AssignmentLag:
          format: int32
          description: >-
            Number of minutes we shall override the assignment if a customer
            sends consecutive messages to this category
          type: integer
        ReplyTemplate:
          format: int32
          description: Reply template to merge with messages posted in this category
          type: integer
        NotificationEmail:
          description: >-
            Comma separated list of addresses to notify when requests are
            redelegated to (unassigned) in this category.
          type: string
        DefaultTicketStatus:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.TicketStatusEntity'
        DefaultMessageStatus:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.TicketStatusEntity'
        EffectiveReplyTemplateId:
          format: int32
          description: >-
            Id of reply template to merge into messages, whose ticket belongs to
            this category. Also takes into account 'Apply to subcategories' on
            parent categories. This is a calculated, readonly field.
          type: integer
        ExtraFields:
          description: "Deprecated: Use {SuperOffice.CRM.Services.TicketCategoryEntity.CustomFields} instead.\r\nExtra fields added to the carrier. This could be data from Plug-ins, the foreign key system, external applications, etc."
          type: object
          additionalProperties:
            type: string
        CustomFields:
          description: "Udef + Extra fields added to the carrier. Extra fields as defined by changes to database schema + user-defined fields as defined by admin.\r\nCustom fields combines user defined fields and extra fields into one bucket. \r\nThe individual {SuperOffice.CRM.Services.TicketCategoryEntity.ExtraFields} and <see cref=\"!:UserDefinedFields\">UserDefinedFields</see> properties are deprecated in favor of this\r\ncombined collection."
          type: object
          additionalProperties:
            type: string
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Services.TicketPriorityEntity:
      description: "Entity for a ticket priority. This entity describes the meta data for a ticket priority, and provides special operations on it.\r\n<para />\r\nCarrier object for TicketPriorityEntity.\r\nServices for the TicketPriorityEntity Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IListAgent\">List Agent</see>."
      type: object
      properties:
        TicketPriorityId:
          format: int32
          description: The primary key (auto-incremented)
          type: integer
        Name:
          description: The name of the priority.
          type: string
        Status:
          description: The status (normal/deleted) of the priority.
          enum:
            - Unknown
            - Normal
            - Deleted
          type: string
        Flags:
          description: A bitmask of flags.
          enum:
            - Unknown
            - External
            - Default
            - AlertSchedule
          type: string
        SortOrder:
          format: int32
          description: Indicates the sort order for this priority. 1 is first, 100 is last
          type: integer
        TicketRead:
          description: >-
            This field indicates what to do with the escalation chain when the
            request is read
          enum:
            - None
            - Stop
            - Continue
            - Restart
          type: string
        ChangedOwner:
          description: >-
            This field indicates what to do with the escalation chain when the
            request changes owner (manually)
          enum:
            - None
            - Stop
            - Continue
            - Restart
          type: string
        TicketNewinfo:
          description: >-
            This field indicates what to do with the escalation chain when the
            request gets new info
          enum:
            - None
            - Stop
            - Continue
            - Restart
          type: string
        TicketClosed:
          description: >-
            This field indicates what to do with the escalation chain when the
            request is closed
          enum:
            - None
            - Stop
            - Continue
            - Restart
          type: string
        TicketChangedPriority:
          description: >-
            This field indicates what to do with the escalation chain when the
            request is changed into this priority
          enum:
            - None
            - Stop
            - Continue
            - Restart
          type: string
        TicketNew:
          description: >-
            This field indicates what to do with the escalation chain when a new
            request is registered
          enum:
            - None
            - Stop
            - Continue
            - Restart
          type: string
        Deadline:
          format: int32
          description: Deadline to add if escalated (minutes)
          type: integer
        MonStart:
          format: date-time
          description: >-
            The work hour start for Mondays. Note that only the time part of the
            DateTime is used
          type: string
        MonStop:
          format: date-time
          description: >-
            The work hour start for Mondays. Note that only the time part of the
            DateTime is used
          type: string
        TueStart:
          format: date-time
          description: >-
            The work hour start for Tuesdays. Note that only the time part of
            the DateTime is used
          type: string
        TueStop:
          format: date-time
          description: >-
            The work hour stop for Tuesdays. Note that only the time part of the
            DateTime is used
          type: string
        WedStart:
          format: date-time
          description: >-
            The work hour start for Wednesdays. Note that only the time part of
            the DateTime is used
          type: string
        WedStop:
          format: date-time
          description: >-
            The work hour stop for Wednesdays. Note that only the time part of
            the DateTime is used
          type: string
        ThuStart:
          format: date-time
          description: >-
            The work hour start for Thursdays. Note that only the time part of
            the DateTime is used
          type: string
        ThuStop:
          format: date-time
          description: >-
            The work hour stop for Thursdays. Note that only the time part of
            the DateTime is used
          type: string
        FriStart:
          format: date-time
          description: >-
            The work hour start for Fridays. Note that only the time part of the
            DateTime is used
          type: string
        FriStop:
          format: date-time
          description: >-
            The work hour stop for Fridays. Note that only the time part of the
            DateTime is used
          type: string
        SatStart:
          format: date-time
          description: >-
            The work hour start for Saturdays. Note that only the time part of
            the DateTime is used
          type: string
        SatStop:
          format: date-time
          description: >-
            The work hour stop for Saturdays. Note that only the time part of
            the DateTime is used
          type: string
        SunStart:
          format: date-time
          description: >-
            The work hour start for Sundays. Note that only the time part of the
            DateTime is used
          type: string
        SunStop:
          format: date-time
          description: >-
            The work hour stop for Sundays. Note that only the time part of the
            DateTime is used
          type: string
        NonDates:
          description: >-
            Dates which the escalation time should not be running. Note that
            only the day of the year (day and month) is used. So the year and
            time part is not used even if this is a DateTime. Exception - it IS
            possible to include a year here, for dates that should not repeat
            every year
          type: array
          items:
            format: date-time
            type: string
        EscalationLevels:
          description: Escalation levels bound to the parent priority
          type: array
          items:
            $ref: >-
              #/components/schemas/SuperOffice.CRM.Services.TicketPriorityEscalationLevelEntity
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Services.TicketStatusEntity:
      description: "Entity for a ticket status. This entity describes the meta data for a ticket status, and provides special operations on it.\r\n<para />\r\nCarrier object for TicketStatusEntity.\r\nServices for the TicketStatusEntity Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IListAgent\">List Agent</see>."
      type: object
      properties:
        TicketStatusId:
          format: int32
          description: The primary key (auto-incremented)
          type: integer
        Name:
          description: Name of user defined ticket status
          type: string
        Status:
          description: >-
            The &apos;classic&apos; ticket status. I.e.
            active/closed/postponed/deleted
          enum:
            - Unknown
            - Active
            - Closed
            - Postponed
            - Deleted
            - Merged
            - Spam
            - PostponedSpecific
            - Postponed1Hour
            - Postponed2Hours
            - Postponed3Hours
            - Postponed4Hours
            - PostponedDay
            - PostponedWeek
            - PostponedMonth
          type: string
        TimeCounter:
          description: >-
            Which field in ticket we count time spent on (queue, internal,
            external)
          enum:
            - None
            - Internally
            - Externally
            - Queue
          type: string
        NoEmailReopen:
          description: Whether inbound emails can reopen requests with this status or not
          type: boolean
        IsDefault:
          description: >-
            Indicates if status is default one as there might be more than one
            status with same internal status
          type: boolean
        UsedInQueue:
          description: If set, status is used in GetNext calculations
          type: boolean
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Services.Person:
      description: "Carrier object for Person.\r\nServices for the Person Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IPersonAgent\">Person Agent</see>."
      type: object
      properties:
        Position:
          description: >-
            The position. This is a predefined SuperOffice value, different from
            Title
          type: string
        PersonId:
          format: int32
          description: Primary key
          type: integer
        Mrmrs:
          description: e.g. Mrs   sex_title
          type: string
        Firstname:
          description: First name
          type: string
        Lastname:
          description: Last name
          type: string
        MiddleName:
          description: Middle name or 'van' etc.
          type: string
        Title:
          description: Title
          type: string
        Description:
          description: Info text/description on person.
          type: string
        Email:
          description: First email on contact person.
          type: string
        FullName:
          description: >-
            Get the persons full name (internal name used in clients for
            employees).
          type: string
        DirectPhone:
          description: Returns the direct phone that belong to the contact person.
          type: string
        FormalName:
          description: >-
            Get formal name for a person, as used in labels. (Full name + person
            title + academic title)
          type: string
        CountryId:
          format: int32
          description: Country
          type: integer
        ContactId:
          format: int32
          description: Owning contact ID
          type: integer
        ContactName:
          description: The persons company name
          type: string
        Retired:
          format: int32
          description: >-
            1 = the user is retired and should have no rights, not appear in
            lists, etc.
          type: integer
        Rank:
          format: int32
          description: Display sort sequence for default sort order
          type: integer
        ActiveInterests:
          format: int32
          description: >-
            Number of records in pintr table; select count(*) from pintr pi
            where pi.person_id = this.person_id == activeInterests is always
            true
          type: integer
        ContactDepartment:
          description: The persons contact department
          type: string
        ContactCountryId:
          format: int32
          description: The persons contact country id
          type: integer
        ContactOrgNr:
          description: The persons contact organization number
          type: string
        FaxPhone:
          description: Returns the fax phone that belong to the contact person.
          type: string
        MobilePhone:
          description: Returns the mobile phone that belong to the contact person.
          type: string
        ContactPhone:
          description: Returns the direct phone that belong to the persons contact.
          type: string
        AssociateName:
          description: Name of the person's owner
          type: string
        AssociateId:
          format: int32
          description: Id of the item's owner (Associate id)
          type: integer
        UsePersonAddress:
          description: If 1, use person's address for mailing instead of company address
          type: boolean
        ContactFax:
          description: Actual phone number as eneterd by the user
          type: string
        Kanafname:
          description: Kana first name, used in Japanese versions only
          type: string
        Kanalname:
          description: Kana last name, used in Japanese versions only
          type: string
        Post1:
          description: Postal address, used in Japanese versions only
          type: string
        Post2:
          description: Postal address, used in Japanese versions only
          type: string
        Post3:
          description: Postal address, used in Japanese versions only
          type: string
        EmailName:
          description: E-mail description
          type: string
        ContactFullName:
          description: Company full name + department
          type: string
        ActiveErpLinks:
          format: int32
          description: How many active ERP links are there for this person?
          type: integer
        TicketPriorityId:
          format: int32
          description: Ticket priority ID
          type: integer
        SupportLanguageId:
          format: int32
          description: Support priority ID
          type: integer
        SupportAssociateId:
          format: int32
          description: Our support contact for this person
          type: integer
        CategoryName:
          description: The category list item name
          type: string
        PersonNumber:
          description: Alphanumeric user field
          type: string
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Services.TicketMessage:
      description: "The TicketMessage carrier is used for representing a service ticket message\r\n<para />\r\nCarrier object for TicketMessage.\r\nServices for the TicketMessage Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.ITicketAgent\">Ticket Agent</see>."
      type: object
      properties:
        TicketMessageId:
          format: int32
          description: The primary key (auto-incremented)
          type: integer
        CreatedAt:
          format: date-time
          description: When the message was posted.
          type: string
        Slevel:
          description: The securitylevel of the message.
          enum:
            - Unknown
            - Internal
            - External
          type: string
        Important:
          description: If this message is important or not.
          type: boolean
        Author:
          description: >-
            A string representing the author of the message. Could be a
            user&apos;s name, or a persons email address.
          type: string
        PersonId:
          format: int32
          description: Primary key
          type: integer
        PersonFullName:
          description: >-
            Get the persons full name (internal name used in clients for
            employees).
          type: string
        ContactId:
          format: int32
          description: Primary key
          type: integer
        ContactName:
          description: Contact name
          type: string
        ContactDepartment:
          description: Department
          type: string
        NumAttachments:
          format: int32
          description: Number of attachments in the message
          type: integer
        EmailHeader:
          description: The email header is saved in this field as raw text
          type: string
        MessageHeaders:
          description: >-
            Contains the message headers, like To, Cc, Bcc information, or
            custom headers
          type: array
          items:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.TicketMessageHeader'
        Language:
          description: The language this message is in, based on some kind of analysis
          type: string
        Sentiment:
          format: int32
          description: >-
            Sentiment index, 100 = completely happy; -100 = suicidally unhappy;
            0 = no idea
          type: integer
        SentimentConfidence:
          format: int32
          description: Confidence of sentiment index, 0 = no idea, 100 = completely sure
          type: integer
        CreatedBy:
          format: int32
          description: >-
            The id of the user who posted the message. The value 1 (system user)
            for externally posted messages.
          type: integer
        ChangedAt:
          format: date-time
          description: When the message was changed.
          type: string
        Badge:
          description: Badge to explicitly determine how a message was generated
          enum:
            - Unknown
            - Reply
            - Forward
            - Comment
            - Incoming
            - Outgoing
          type: string
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Services.Tag:
      description: "Carrier object for Tag.\r\nServices for the Tag Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IListAgent\">List Agent</see>."
      type: object
      properties:
        Id:
          format: int32
          description: The Id of the ListItem
          type: integer
        Name:
          description: The name of the ListItem
          type: string
        ToolTip:
          description: The tooltip of the ListItem
          type: string
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Services.Sale:
      description: "Carrier object for Sale.\r\nServices for the Sale Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.ISaleAgent\">Sale Agent</see>."
      type: object
      properties:
        ContactName:
          description: Contact name
          type: string
        SaleDate:
          format: date-time
          description: (expected / lost / won) sales date
          type: string
        SaleId:
          format: int32
          description: Primary key
          type: integer
        Probability:
          format: int32
          description: Actual probability, may differ from the one in the list
          type: integer
        Title:
          description: Sale heading (short description?)
          type: string
        Amount:
          format: double
          description: Total sale amount
          type: number
        Currency:
          description: Currency the sale was made in.
          type: string
        ProjectName:
          description: Project name
          type: string
        AssociateFullName:
          description: The sale's owner
          type: string
        Description:
          description: The sales description
          type: string
        Status:
          description: The sale's status, indicating wether the sale is open, sold or lost.
          enum:
            - Unknown
            - Open
            - Sold
            - Lost
            - Stalled
            - SaintAll
          type: string
        WeightedAmount:
          format: double
          description: The weighted amount ( amount *  probability / 100)
          type: number
        ProjectId:
          format: int32
          description: Optional project reference
          type: integer
        EarningPercent:
          format: double
          description: Earning as percent of total
          type: number
        Earning:
          format: double
          description: Earning on sale
          type: number
        ContactId:
          format: int32
          description: Optional contact reference
          type: integer
        AssociateId:
          format: int32
          description: The sale's owner id
          type: integer
        PersonId:
          format: int32
          description: The sale's contact persons id
          type: integer
        SaleTypeId:
          format: int32
          description: The sale's type id
          type: integer
        SaleTypeName:
          description: The sale's type name
          type: string
        PersonFullName:
          description: The name of the person this sale belongs to.
          type: string
        Completed:
          description: >-
            The Sale completed state. The completed state is either Started or
            Completed. NotStarted is treated as Started. The value maps to the
            Done database field.
          enum:
            - Unknown
            - NotStarted
            - Started
            - Completed
          type: string
        ActiveErpLinks:
          format: int32
          description: The number of active erp links
          type: integer
        NextDueDate:
          format: date-time
          description: >-
            Next due date, this is a denormalization of 'closest future activity
            date, or most recent if no future activities'. Maintained by the
            system, but very convenient for searching.
          type: string
        Number:
          description: Alphanumeric user field
          type: string
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Services.Project:
      description: "Carrier object for Project.\r\nServices for the Project Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IProjectAgent\">Project Agent</see>."
      type: object
      properties:
        ProjectId:
          format: int32
          description: Primary key
          type: integer
        Name:
          description: Project name
          type: string
        Description:
          description: The projects description
          type: string
        URL:
          description: URL address
          type: string
        Type:
          description: The project type.
          type: string
        AssociateId:
          format: int32
          description: The project owner id (associate id)
          type: integer
        AssociateFullName:
          description: The project owner
          type: string
        TypeId:
          format: int32
          description: ''
          type: integer
        Updated:
          format: date-time
          description: Last updated date  in UTC.
          type: string
        StatusId:
          format: int32
          description: The projects status id
          type: integer
        Status:
          description: The projects status
          type: string
        TextId:
          format: int32
          description: The id of the description
          type: integer
        PublishTo:
          format: date-time
          description: Publication valid to (inclusive)
          type: string
        PublishFrom:
          format: date-time
          description: Publication valid from (inclusive)
          type: string
        IsPublished:
          description: ''
          type: boolean
        URLName:
          description: Visible field
          type: string
        ProjectNumber:
          description: Automatically generated number
          type: string
        ActiveErpLinks:
          format: int32
          description: The number of active erp links
          type: integer
        EventId:
          format: int32
          description: Reserved field for Lyyti event when project is linked to an event.
          type: integer
        StartDate:
          format: date-time
          description: >-
            Reserved field for Lyyti event when project is linked to an event,
            is the event start date.
          type: string
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Services.TicketFormSubmission:
      description: "Class representing form submission related to ticket.\r\n<para />\r\nCarrier object for TicketFormSubmission."
      type: object
      properties:
        FormSubmissionId:
          format: int32
          description: Primary key
          type: integer
        EmailAddress:
          description: The email address of the person who submitted
          type: string
        Status:
          description: What is the status of this submission
          enum:
            - Unknown
            - InProgress
            - EmailVerification
            - Submitted
            - Processed
            - Failed
          type: string
    SuperOffice.CRM.Services.TicketType:
      description: "Ticket Type - light read-only version of TicketTypeEntity.\r\n<para />\r\nCarrier object for TicketType.\r\nServices for the TicketType Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IListAgent\">List Agent</see>."
      type: object
      properties:
        TicketTypeId:
          format: int32
          description: Primary key
          type: integer
        Name:
          description: The list item
          type: string
        Icon:
          description: Name of the icon
          type: string
        DefaultTicketStatus:
          format: int32
          description: Default ticket status for new tickets
          type: integer
        DefaultTicketPriority:
          format: int32
          description: Default ticket priority for new tickets
          type: integer
        IsDefault:
          description: Is this Ticket Type marked as default
          type: boolean
        ShowInNew:
          description: Enables this request type to be accessible in +New in top bar
          type: boolean
        ExcludeSignature:
          description: Do not insert user signature automatically
          type: boolean
        ExcludeEmailRecipients:
          description: Create request without initially having to send outbound e-mail
          type: boolean
        ExternalAsDefault:
          description: Ability to set external access level for this request type
          type: boolean
        VisibleForGroups:
          description: Array of references to the visible for groups
          type: array
          items:
            format: int32
            type: integer
        ReplyForwardNoSignature:
          description: Do not insert user signature when replying or forwarding the message
          type: boolean
        ReplyExternalAsDefault:
          description: Set external access level when replying the message
          type: boolean
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Security.TableRight:
      description: "Wraps a table right together with an explanatory reason.\r\nCode can indicate why access is restricted."
      type: object
      properties:
        Mask:
          type: string
        Reason:
          type: string
    SuperOffice.CRM.Security.FieldProperty:
      description: >-
        Class holding properties like field length, field type about a field in
        the carrier.
      type: object
      properties:
        FieldRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldRight'
        FieldType:
          type: string
        FieldLength:
          format: int32
          description: ''
          type: integer
    SuperOffice.CRM.Services.TicketPriorityEscalationLevelEntity:
      description: "Entity for ticket priority escalation level. Entity describes properties/actions when escalation(alert) happens. Alert is raised according to TicketPriority timing intervals\r\n<para />\r\nCarrier object for TicketPriorityEscalationLevelEntity.\r\nServices for the TicketPriorityEscalationLevelEntity Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IListAgent\">List Agent</see>."
      type: object
      properties:
        TicketAlertId:
          format: int32
          description: The primary key (auto-incremented)
          type: integer
        AlertLevel:
          format: int32
          description: The alert level (strictly ascending number).
          type: integer
        AlertTimeout:
          format: int32
          description: The time (in minutes) before ticket is escalated to next level.
          type: integer
        Action:
          format: int32
          description: >-
            Bitmap indicating what should be done when escalating *to* this
            level.
          type: integer
        DelegateTo:
          format: int32
          description: >-
            If ticket should be redelegated on escalation, this field contains
            the id of the target user.
          type: integer
        ScriptId:
          format: int32
          description: Script that can be executed then the ticket alert action occur.
          type: integer
        EmailTo:
          description: >-
            If an email should be sent when escalating, this field will contain
            the recipient email address.
          type: string
        SmsTo:
          description: >-
            If an sms should be sent when escalating, this field will contain
            the recipient email address.
          type: string
        ReplyTemplateIdCustomer:
          format: int32
          description: >-
            Reference to the reply template used in this alert, for mail to
            customer
          type: integer
        ReplyTemplateIdUser:
          format: int32
          description: >-
            Reference to the reply template used in this alert, for mail to
            owner of ticket
          type: integer
        ReplyTemplateIdCatmast:
          format: int32
          description: >-
            Reference to the reply template used in this alert, for mail to
            category master
          type: integer
        ReplyTemplateIdEmail:
          format: int32
          description: >-
            Reference to the reply template used in this alert, for mail to
            custom address
          type: integer
        RtiCustomerSms:
          format: int32
          description: >-
            Reference to the reply template used in this alert, for sms to
            customer
          type: integer
        ReplyTemplateIdUserSms:
          format: int32
          description: >-
            Reference to the reply template used in this alert, for sms to owner
            of ticket
          type: integer
        ReplyTemplateIdCatmastSms:
          format: int32
          description: >-
            Reference to the reply template used in this alert, for sms to
            category master
          type: integer
        ReplyTemplateIdSms:
          format: int32
          description: >-
            Reference to the reply template used in this alert, for sms to
            custom address
          type: integer
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Services.TicketMessageHeader:
      description: "Contains information about a header connected to a ticket message\r\n<para />\r\nCarrier object for TicketMessageHeader."
      type: object
      properties:
        Id:
          format: int32
          description: Id
          type: integer
        Name:
          description: >-
            The name of the header. This can for example be To, Cc or other
            custom headers that is set up in Service
          type: string
        Value:
          description: >-
            The value of the header. Can for example be an email address, or a
            custom header extracted from emails
          type: string
        StdItem:
          description: >-
            If this has a value, it indicates that a standard header text from
            the language database should be used - and witch one to use
          enum:
            - None
            - Forward
            - UnnamedAttachmentBlocked
            - NoAutoReply
            - SentAutoReplyToCustomersA
            - SentAutoReplyToCustomersB
            - CustomerReadFAQ
            - ReplyTemplate
          type: string
        StdItemCol:
          description: >-
            If this is 1, concatenate the standard item text with header name
            field, if 2 use header value field instead. If this col is 0, use
            the empty field - preferably the value column.
          enum:
            - None
            - Name
            - Value
          type: string
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Security.FieldRight:
      description: "Wraps the field right together with an explanatory reason.\r\nAlso adds logical operators to the field rights so that they can be easily combined."
      type: object
      properties:
        Mask:
          type: string
        Reason:
          type: string

````

## Related topics

- [SuperOffice.WebApi.Data.Ticket ProcessTicketWhenReadRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.Ticket_ProcessTicketWhenReadRequest.md)
- [SuperOffice.WebApi.Agents.TicketAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.TicketAgent.md)
- [SuperOffice.WebApi.Agents.ITicketAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.ITicketAgent.md)
- [Ticket](/en/automation/crmscript/reference/CRMScript.Native.Ticket.md)
- [Request to publish](/en/developer-portal/create-app/request-to-publish.md)
