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

# Get Next Suggested Appointment By Sale

> Gets the next suggested appointment for a given sale (or rather a given sale's guide).

NsApiSlow threshold: 2000 ms.



## OpenAPI

````yaml /openapi/agent/openapi-v3-AppointmentAgent.json post /api/v1/Agents/Appointment/GetNextSuggestedAppointmentBySale
openapi: 3.0.0
info:
  version: v1-Agents
  title: SuperOffice Agent API v1
  description: SuperOffice Agent API - AppointmentAgent
  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/Appointment/GetNextSuggestedAppointmentBySale:
    post:
      tags:
        - Appointment_Agent
      summary: Get Next Suggested Appointment By Sale
      description: >-
        Gets the next suggested appointment for a given sale (or rather a given
        sale's guide).


        NsApiSlow threshold: 2000 ms.
      operationId: v1AppointmentAgent_GetNextSuggestedAppointmentBySale
      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.AppointmentCarriers.GetNextSuggestedAppointmentBySaleRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.AppointmentCarriers.GetNextSuggestedAppointmentBySaleRequest
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.AppointmentCarriers.GetNextSuggestedAppointmentBySaleRequest
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.AppointmentCarriers.GetNextSuggestedAppointmentBySaleRequest
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.AppointmentCarriers.GetNextSuggestedAppointmentBySaleRequest
          application/json-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.AppointmentCarriers.GetNextSuggestedAppointmentBySaleRequest
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.AppointmentCarriers.GetNextSuggestedAppointmentBySaleRequest
        description: SaleId, CurrentAppointmentId, SkipCompleteCheck
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.SuggestedAppointment
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.SuggestedAppointment
            application/xml:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.SuggestedAppointment
            text/xml:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.SuggestedAppointment
            application/json-patch+json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.SuggestedAppointment
            application/merge-patch+json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.SuggestedAppointment
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.WebApi.v1.Carriers.AppointmentCarriers.GetNextSuggestedAppointmentBySaleRequest:
      description: >-
        GetNextSuggestedAppointmentBySale: Gets the next suggested appointment
        for a given sale (or rather a given sale's guide).
      type: object
      properties:
        SaleId:
          format: int32
          type: integer
        CurrentAppointmentId:
          format: int32
          type: integer
        SkipCompleteCheck:
          type: boolean
    SuperOffice.CRM.Services.SuggestedAppointment:
      description: "Carrier object for SuggestedAppointment.\r\nServices for the SuggestedAppointment Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IAppointmentAgent\">Appointment Agent</see>."
      type: object
      properties:
        AutoSuggest:
          format: int32
          description: Should this appointment be auto-suggested
          type: integer
        Deleted:
          format: int32
          description: >-
            0 -> record is active 1 -> record is 'deleted' and should not be
            shown in lists
          type: integer
        DaysFuture:
          format: int32
          description: How many days into the future the appointment should be scheduled
          type: integer
        Tooltip:
          description: Tooltip / description
          type: string
        Text:
          description: The suggested text of the new appointment
          type: string
        TaskId:
          format: int32
          description: Type of the suggested appointment
          type: integer
        SuggestedAppointmentId:
          format: int32
          description: Primary key
          type: integer
        SaleTypeStageLinkId:
          format: int32
          description: >-
            Link to saleTypeStageLink, the anchor for sale guide items. Either
            this OR projectAnchorId should be set, not both at the same time.
          type: integer
        RegisteredAssociateId:
          format: int32
          description: Registered by whom
          type: integer
        Rank:
          format: int32
          description: Rank, controls rank of non-instantiated items in Guide
          type: integer
        ProjectTypeStatusLinkId:
          format: int32
          description: >-
            Link to projectTypeStatusLink, the anchor for project guide items.
            Either this OR saleAnchorId should be set, not both at the same
            time.
          type: integer
        Name:
          description: Item name, visible in Guide
          type: string
        Duration:
          format: int32
          description: Duration in minutes of suggested appointment
          type: integer
        Associate:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.Associate'
        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.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.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.Appointment GetNextSuggestedAppointmentBySaleRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.Appointment_GetNextSuggestedAppointmentBySaleRequest.md)
- [NSAppointmentAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSAppointmentAgent.md)
- [SuperOffice.WebApi.Agents.AppointmentAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AppointmentAgent.md)
- [SuperOffice.WebApi.Agents.IAppointmentAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IAppointmentAgent.md)
- [Get Suggested Appointment Entity](/en/api/reference/restful/agent/appointment_agent/get-suggested-appointment-entity.md)
- [Get Suggested Appointment](/en/api/reference/restful/agent/appointment_agent/get-suggested-appointment.md)
