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

# Create Quote Line From Product

> Create a quoteline based on a product.

NsApiSlow threshold: 5000 ms.



## OpenAPI

````yaml /openapi/agent/openapi-v3-QuoteAgent.json post /api/v1/Agents/Quote/CreateQuoteLineFromProduct
openapi: 3.0.0
info:
  version: v1-Agents
  title: SuperOffice Agent API v1
  description: SuperOffice Agent API - QuoteAgent
  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/Quote/CreateQuoteLineFromProduct:
    post:
      tags:
        - Quote_Agent
      summary: Create Quote Line From Product
      description: |-
        Create a quoteline based on a product.

        NsApiSlow threshold: 5000 ms.
      operationId: v1QuoteAgent_CreateQuoteLineFromProduct
      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.QuoteCarriers.CreateQuoteLineFromProductRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.CreateQuoteLineFromProductRequest
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.CreateQuoteLineFromProductRequest
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.CreateQuoteLineFromProductRequest
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.CreateQuoteLineFromProductRequest
          application/json-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.CreateQuoteLineFromProductRequest
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.CreateQuoteLineFromProductRequest
        description: QuoteAlternativeId, Product
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.QuoteLine'
            text/json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.QuoteLine'
            application/xml:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.QuoteLine'
            text/xml:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.QuoteLine'
            application/json-patch+json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.QuoteLine'
            application/merge-patch+json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.QuoteLine'
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.WebApi.v1.Carriers.QuoteCarriers.CreateQuoteLineFromProductRequest:
      description: 'CreateQuoteLineFromProduct: Create a quoteline based on a product.'
      type: object
      properties:
        QuoteAlternativeId:
          format: int32
          type: integer
        Product:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.Product'
    SuperOffice.CRM.Services.QuoteLine:
      description: "Information about a connection to the ERP system.\r\n<para />\r\nCarrier object for QuoteLine.\r\nServices for the QuoteLine Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IQuoteAgent\">Quote Agent</see>."
      type: object
      properties:
        QuoteLineId:
          format: int32
          description: Primary key
          type: integer
        ERPQuoteLineKey:
          description: >-
            The foreign key to the quoteline in ERP system (if it has such a
            representation).
          type: string
        QuoteAlternativeId:
          format: int32
          description: >-
            The alternative this line is part of, the conceptual Parent in CRM
            database.
          type: integer
        ERPProductKey:
          description: >-
            Foreign key of product+pricelist this line is based on. Can be blank
            since the QuoteLine doesn’t have to be connected to a product.
          type: string
        Status:
          description: >-
            If there was a problem with for instance calculation, this field is
            set to warning or error. Typically shown as an icon. QuoteStatus is
            an enum with statuses: OK, OKWithInfo, Warning, Error.
          enum:
            - Ok
            - OkWithInfo
            - Warning
            - Error
          type: string
        Reason:
          description: >-
            If QuoteStatus is not OK, then this field contains a localized
            explanation that the user can be shown.
          type: string
        Quantity:
          format: double
          description: >-
            How many units; this is a decimal field since you might want to
            offer fractional units (2.5kg, or 0.5PC).
          type: number
        DeliveredQuantity:
          format: double
          description: How many units have been delivered - updated by ERP system.
          type: number
        Rank:
          format: int32
          description: QuoteLines can be re-ordered, so we must track the ordering.
          type: integer
        Name:
          description: >-
            The name of the product. Is stored here if the user changes the
            value from the product in the pricelist, or just enters a QuoteLine
            without a product link.
          type: string
        Description:
          description: >-
            A longer description for the product. Is stored here if the user
            changes the value from the product in the pricelist, or just enters
            a QuoteLine without a product link.
          type: string
        Code:
          description: >-
            A value the salesmen use to quickly find the correct product. Is
            stored here if the user changes the value from the product in the
            pricelist, or just enters a QuoteLine without a product link.
          type: string
        QuantityUnit:
          description: >-
            What is the unit (meter, ton, bushel, microsecond, gradus, τρυβλίον,
            五合枡, دونم or whatever); Connector handles conversion relative to
            PriceUnit if they are different.
          type: string
        PriceUnit:
          description: >-
            What is the unit (meter, ton, bushel, microsecond, gradus, τρυβλίον,
            五合枡, دونم or whatever); read-only for lines that originate in
            defined products.
          type: string
        ItemNumber:
          description: >-
            Norwegian: «Postnummer». Specific numbers from some hierarchy, for
            instance '1.4.3.2'. Is stored here if the user changes the value
            from the product in the pricelist, or just enters a QuoteLine
            without a product link.
          type: string
        Url:
          description: >-
            A url to the product info. Can be empty. Is stored here if the user
            changes the value from the product in the pricelist, or just enters
            a QuoteLine without a product link.
          type: string
        ProductCategoryKey:
          description: >-
            Either a List id to an id from a connector provided list, or, if the
            connection doesn't support lists, a text. Is stored here if the user
            changes the value from the product in the pricelist, or just enters
            a QuoteLine without a product link.
          type: string
        ProductFamilyKey:
          description: >-
            Either a List id to an id from a connector provided list, or, if the
            connection doesn't support lists, a text. Is stored here if the user
            changes the value from the product in the pricelist, or just enters
            a QuoteLine without a product link.
          type: string
        ProductTypeKey:
          description: >-
            Either a List id to an id from a connector provided list, or, if the
            connection doesn't support lists, a text. Is stored here if the user
            changes the value from the product in the pricelist, or just enters
            a QuoteLine without a product link.
          type: string
        Supplier:
          description: >-
            The name of the supplier. Is stored here if the user changes the
            value from the product in the pricelist, or just enters a QuoteLine
            without a product link.
          type: string
        SupplierCode:
          description: >-
            The suppliers' code or part number for this product. Is stored here
            if the user changes the value from the product in the pricelist, or
            just enters a QuoteLine without a product link.
          type: string
        Thumbnail:
          description: >-
            A small image of the product, typically used to show in a list.
            Base64 encoded png.
          type: string
        VATInfo:
          description: >-
            Tax/VAT information, Extra info about VAT that the connector might
            insert, and the users might want to specify on the quote. The core
            CRM product has no business logic for this field, it is wholly up to
            connectors to use it.
          type: string
        VAT:
          format: double
          description: >-
            Tax/VAT - THIS IS A PERCENTAGE. The connector is responsible for
            populating this field; the percentage will be used to calculate VAT
            amounts available as merge fields in the document templates (but
            amounts are never stored in the database).
          type: number
        UnitCost:
          format: double
          description: >-
            The cost price per unit for this product. May be filled in by
            connector if it has the Provide-Cost capability.
          type: number
        UnitMinimumPrice:
          format: double
          description: >-
            The minimum price this line can be sold for (to limit discounting).
            Will come from the connector. List price per unit must exceed the
            minimum price per unit.
          type: number
        UnitListPrice:
          format: double
          description: >-
            The standard list price; as given by ERP Connector, OR overridden by
            user
          type: number
        ExtraInfo:
          description: >-
            Extra information, supplied by QuoteConnector, used by a future
            dynamic GUI extension
          type: array
          items:
            $ref: >-
              #/components/schemas/SuperOffice.CRM.Services.ProductExtraDataField
        RawExtraInfo:
          description: >-
            Read-only extra information in plain text, supplied by
            QuoteConnector, used by a future dynamic GUI extension
          type: string
        IsSubscription:
          description: Is this a subscription product, sold in repeating intervals/amounts?
          type: boolean
        SubscriptionUnit:
          description: >-
            Either a List id to an id from a connector provided list, or, if the
            connection doesn’t support lists, a text with the actual
            subscription unit.
          type: string
        SubscriptionQuantity:
          format: double
          description: >-
            The default number of SubscriptionUnits to suggest when creating
            quote lines from this product
          type: number
        SubscriptionStart:
          format: date-time
          description: Start date for subscription, as offered
          type: string
        ERPDiscountPercent:
          format: double
          description: >-
            The discount the system calculates based on customer / quantity /
            whatever. Can be overrided by the salesman in the field
            'DiscountPercent' or 'DiscountAmount'. Both fields
            ERPDiscountPercent and ERPDiscountAmount will be filled out. If
            UserValueOverride is set to ‘None’ then the value is copied to
            DiscountPercent. The Percentage is given in integer form, i.e. ‘12%’
            is represented as ‘12’.
          type: number
        ERPDiscountAmount:
          format: double
          description: >-
            The discount the system calculates based on customer / quantity /
            whatever. Can be overrided by the salesman in the field
            'DiscountPercent' or 'DiscountAmount'. If UserValueOverride is set
            to ‘None’ then the value is copied to DiscountAmount. Both fields
            ERPDiscountPercent and ERPDiscountAmount will be filled out.
          type: number
        DiscountPercent:
          format: double
          description: >-
            The discount for the line, in percent. Both ‘DiscountPercent’ and
            ‘DiscountAmount’ shall be filled out, but the UserValueOverride
            field must be set to the field the user actually changed last. If
            this field is filled out by the user, it overrides any discount
            suggested by the connector. If the user has not filled this in, the
            system will copy the ERP discount amount to this field. The
            Percentage is given in integer form, i.e. ‘12%’ is represented as
            ‘12’.
          type: number
        DiscountAmount:
          format: double
          description: >-
            The discount for the line, in whatever currency the sale is in. Both
            ‘DiscountPercent’ and ‘DiscountAmount’ shall be filled out, but the
            UserValueOverride field must be set to the field the user actually
            changed last. If this field is filled out by the user, it overrides
            any discount suggested by the connector. If the user has not filled
            this in, the system will copy the ERP discount amount to this field.
          type: number
        UserValueOverride:
          description: >-
            Has the pre-calculated (from ERP) price information been overridden,
            and how. If the user has filled out the discountpercentage field,
            then the UserValueOverride field is set to OverridePercent. (The
            DiscountAmount, EarningPercent, EarningAmount and TotalPrice fields
            are calculated based on the DiscountPercent.)
          enum:
            - None
            - Total
            - DiscountPercent
            - DiscountAmount
            - EarningPercent
            - EarningAmount
          type: string
        EarningPercent:
          format: double
          description: >-
            The earning, in percent. Both ‘EarningAmount and ‘EarningPercent
            shall be filled out, but the UserValueOverride field must be set to
            the field the user actually changed last. The Percentage is given in
            integer form, i.e. ‘12%’ is represented as ‘12’.
          type: number
        EarningAmount:
          format: double
          description: >-
            The earning, in whatever currency the sale is in. Both
            ‘EarningAmount and ‘EarningPercent shall be filled out, but the
            UserValueOverride field must be set to the field the user actually
            changed last.
          type: number
        SubTotal:
          format: double
          description: Value to help the user interface, is equal to 'Quantity * ListPrice'
          type: number
        TotalPrice:
          format: double
          description: >-
            TotalPrice  = SubTotal - DiscountAmount or TotalPrice = (UnitCost *
            Quantity) + EarningAmount, according to what the user changed last.
          type: number
        Rights:
          description: >-
            Field1=right&Field2=right, etc. of any fields that have non-standard
            field access rights. Rights can be one of: N (=None or Hidden), R
            (=Read-only), W (=Writeable), M (=Mandatory). The fields will mostly
            be from the Quoteline table, but some added fields that are
            conceptually part of the quoteline, like Image will also be possibly
            to set rights on. Will be used by SuperOffice to control the user
            interface when showing the record.
          type: string
        Rule:
          description: >-
            The names of one or more calculation rules that are in effect for
            this line, comma-separated case-insensitive
          type: string
        ExtraField1:
          description: >-
            This a simple field for adding information that the Connector can
            provide, and that the qoute document need to display.
          type: string
        ExtraField2:
          description: >-
            This a simple field for adding information that the Connector can
            provide, and that the qoute document need to display.
          type: string
        ExtraField3:
          description: >-
            This a simple field for adding information that the Connector can
            provide, and that the qoute document need to display.
          type: string
        ExtraField4:
          description: >-
            This a simple field for adding information that the Connector can
            provide, and that the qoute document need to display.
          type: string
        ExtraField5:
          description: >-
            This a simple field for adding information that the Connector can
            provide, and that the qoute document need to display.
          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.Product:
      description: "Information about a Product from the ERP system. This may be fetched from SuperOffice Product table through the SO Connector\r\n<para />\r\nCarrier object for Product.\r\nServices for the Product Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IQuoteAgent\">Quote Agent</see>."
      type: object
      properties:
        ProductId:
          format: int32
          description: Primary key
          type: integer
        ERPProductKey:
          description: >-
            Reference/foreign key to the product in the given pricelist in the
            product supplier system, if it exists there.
          type: string
        ERPPriceListKey:
          description: >-
            Foreign key to the price list that this product is a part of, or the
            primary key of the pricelist if this is a built-in pricelist.
          type: string
        Name:
          description: The name to use in the user interface.
          type: string
        Description:
          description: >-
            The description to use, with potentially several lines. Will be used
            as tool-tip to use in the list user interface too.
          type: string
        Code:
          description: The product code / article number in the product supplier system.
          type: string
        PriceUnit:
          description: >-
            What is the unit (meter, ton, bushel, microsecond, gradus, τρυβλίον,
            五合枡, دونم or whatever); read-only for lines that originate in
            defined products
          type: string
        QuantityUnit:
          description: >-
            What is the unit (meter, ton, bushel, microsecond, gradus, τρυβλίον,
            五合枡, دونم or whatever); Connector handles conversion relative to
            PriceUnit if they are different
          type: string
        IsSubscription:
          description: Is this a subscription product, sold in repeating intervals/amounts?
          type: boolean
        SubscriptionUnit:
          description: >-
            Either a List id to an id from a connector provided list, or, if the
            connection doesn’t support lists, a text with the actual
            subscription unit.
          type: string
        DefaultSubscriptionQuantity:
          format: double
          description: >-
            The default number of SubscriptionUnits to suggest when creating
            quote lines from this product
          type: number
        ItemNumber:
          description: >-
            Line item number, NOR: «Postnummer». Specific numbers from some
            hierarchy, for instance “1.4.3.2P”. Typically used to sort the items
            in the quote by some standard way.
          type: string
        Url:
          description: URL to product information web page.
          type: string
        ProductCategoryKey:
          description: >-
            Either a List id to an id from a connector provided list, or, if the
            connection doesn’t support lists, a text with the actual product
            category.
          type: string
        ProductFamilyKey:
          description: >-
            Either a List id to an id from a connector provided list, or, if the
            connection doesn't support lists, a text with the actual product
            family.
          type: string
        ProductTypeKey:
          description: >-
            Either a List id to an id from a connector provided list, or, if the
            connection doesn’t support lists, a text with the actual product
            type.
          type: string
        VAT:
          format: double
          description: >-
            Tax/VAT if available from ERP system. THIS IS A PERCENTAGE. In the
            Superoffice product register, this field is available in the product
            admin GUI.
          type: number
        VATInfo:
          description: >-
            A field for putting VATInfo you need to show in the final
            quoteDocument, like the VAT type that is used. Not used in any
            business logic in SuperOffice; available to document templates.
          type: string
        UnitCost:
          format: double
          description: >-
            The cost price. Might not be given, use Decimal.MinValue to signal
            this.
          type: number
        UnitMinimumPrice:
          format: double
          description: >-
            The minimum price this salesman can offer to his customer. This
            might be cost price if there is no policy. Might not be given, use
            Decimal.MinValue to signal this.
          type: number
        UnitListPrice:
          format: double
          description: >-
            (Basic Price, normal price, standard price.) This is the basic price
            from which the discount is computed from. The ListPrice will stay
            the same even when a larger amount is ordered.
          type: number
        InAssortment:
          description: >-
            True for products that should currently be offered, false when the
            product is discontinued and should not ordinarily be offered. When
            false the product no longer appears in search results.
          type: boolean
        Supplier:
          description: >-
            In SuperOffice, an id from the contact table, when saved as an ERP
            cache, the name of the supplier
          type: string
        SupplierCode:
          description: Suppliers part code/number or other key-like field
          type: string
        Rights:
          description: >-
            Field1=right&Field2=right, etc. of any fields that have non-standard
            field access rights. Rights can be one of: N (=None or Hidden), R
            (=Read-only), W (=Writeable), M (=Mandatory). The fields will mostly
            be from the Quoteline table, but some added fields that are
            conceptually part of the quoteline, like Image will also be possibly
            to set rights on. Will be used by SuperOffice to control the user
            interface when showing the record.
          type: string
        Rule:
          description: >-
            The names of one or more calculation rules that are in effect for
            this line, comma-separated case-insensitive. Will NOT be used by
            SuperOffice.
          type: string
        ExtraInfo:
          description: >-
            Extra information, supplied by QuoteConnector, used by a future
            dynamic GUI extension
          type: array
          items:
            $ref: >-
              #/components/schemas/SuperOffice.CRM.Services.ProductExtraDataField
        RawExtraInfo:
          description: >-
            Read-only extra information in plain text, supplied by
            QuoteConnector, used by a future dynamic GUI extension
          type: string
        ExtraField1:
          description: >-
            This a simple field for adding information that the Connector can
            provide, and that the qoute document need to display.
          type: string
        ExtraField2:
          description: >-
            This a simple field for adding information that the Connector can
            provide, and that the qoute document need to display.
          type: string
        ExtraField3:
          description: >-
            This a simple field for adding information that the Connector can
            provide, and that the qoute document need to display.
          type: string
        ExtraField4:
          description: >-
            This a simple field for adding information that the Connector can
            provide, and that the qoute document need to display.
          type: string
        ExtraField5:
          description: >-
            This a simple field for adding information that the Connector can
            provide, and that the qoute document need to display.
          type: string
        InStock:
          format: double
          description: >-
            Negative numbers will be interpreted as how many is ordered. Might
            not be available.
          type: number
        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.ProductExtraDataField:
      description: "A way to show some simple extra data on a product, typically to hep the user to identify the correct product. Basically a bucket of additional info that the ERP system would like to store and show in the user interface. Information placed here is shown in the GUI if the “provide-extra-data” capability is true.\r\n<para />\r\nCarrier object for ProductExtraDataField.\r\nServices for the ProductExtraDataField Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IQuoteAgent\">Quote Agent</see>."
      type: object
      properties:
        Name:
          description: Label for the field
          type: string
        Value:
          description: >-
            Value for the field. If type is string, it can contain
            formatspecifiers (use this for displaying numbers correctly as the
            user's computer is set up).
          type: string
        Type:
          description: String, url, image. How the value should be interpreted.
          enum:
            - String
            - Url
            - Image
          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.Quote CreateQuoteLineFromProductRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.Quote_CreateQuoteLineFromProductRequest.md)
- [NSQuoteAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSQuoteAgent.md)
- [SuperOffice.WebApi.Agents.QuoteAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.QuoteAgent.md)
- [Create Quote Line](/en/api/reference/restful/agent/quote_agent/create-quote-line.md)
- [Create And Save Quote Lines](/en/api/reference/restful/agent/quote_agent/create-and-save-quote-lines.md)
- [Adding products to a quote](/en/api/plugins/quote-connectors/adding-products.md)
