Compartir a través de


SOPTransactionType

Description

An eConnect transaction type that decribes a sale order.

XML nodes

Remarks

The SOP Transaction schema allows you to use commissions, distributions, header level or detailed taxes, markdown amounts, and items with lot numbers. The guidelines to complete these operations are as follows:

Commissions   Use the <taSopHderIvcInsert> XML node to control how commissions are calculated. To let eConnect calculate commission amounts, set the autocreate commissions (CREATECOMM) element to 1. To manually calculate commission amounts, set CREATECOMM to 0 . If CREATECOMM is set to 0, you must use the <taSopCommissions> XML node to specify the commission amount

Warning: Manual updates to commissions are not supported. If you attempt to manually update commissions, an error will occur and the transaction will fail. A future release of eConnect will include this functionality.

Distributions   Use the <taSopHdrIvcInsert> XML node to control whether distributions are created. To allow default distributions to be created, set the create distribution (CREATEDIST) element to 1. The CREATEDIST element defaults to a value of 1. To manually create distributions, set CREATEDIST to 0. If CREATEDIST is set to 0, use the <taSopDistribution> XML node to specify the distributions.

Warning: Manual updates to distributions are not supported. If you attempt to manually update distributions, an error will occur and the transaction will fail. A future release of eConnect will include this functionality.

Taxes   Use the <taSopHdrIvcInsert> XML node to control how taxes are calculated. To use header level taxes, set the header level taxes (USINGHEADERLEVELTAXES) element to 1. To use detailed taxes, set USINGHEADERLEVELTAXES to 0. The default value for USINGHEADERLEVELTAXES is 0. If you set USINGHEADERLEVELTAXES to 1, be aware of the following:

  • Header level taxes only specify tax information when the line sequence element of the <taSopLineIvcTaxInsert> XML node is set to 0. To use header level taxes when the tax is set as "tax included in item price", you must include a sequence number in the tax node. eConnect automatically creates the 0 sequence number tax layer. As a result, the tax amount is not passed to either the header or the line, and it does not reduce the document amount or the subtotal. You must manually calculate the tax amount and specify that along with the reduced sales amount in the <taSopLineIvcTaxInsert> XML node. To simplify using "tax included in item price" you should set the CREATETAXES element of the <taSopHdrIvcInsert> node to 1. This allows eConnect to autocreate taxes. The following display how to populate select elements when using header level taxes and a tax detail of "tax include in item price":

    <taSopLineIvcTaxInsert>
    LNITMSEQ = 16384,/Required-Line item sequence/
    TAXDTLID = 'TAX IN ITEM',/*Required-the example uses 10% tax
    included in item price */
    SALESAMT = 454.55,
    STAXAMNT = 45.45
    <taSopHdrIvcInsert
    TAXAMNT  = 0,
    SUBTOTAL = 500, /Required/
    DOCAMNT  = 500, /Required/
    USINGHEADERLEVELTAXES = 1,
    CREATETAXES = 0
    

  • You can use header level taxes with invoices that will be posted without being transferred, or with orders that will be fully transferred to invoices and then posted. When an order is partially transferred to invoices or back orders, the tax is recalculated. There are no details with header level taxes so when taxes are recalculated on a partially transferred order, the tax information is lost and not carried forward.

  • If you do not use the miscellaneous tax (MSCTXAMNT) and freight taxes (FRTTXAMNT) elements in the <taSopLineIvcTaxInsert> XML node, you must set the sales tax amount (STAXAMNT) element with the actual sales tax amount. If MSCTXAMNT and FRTTXAMNT are used, STAXAMNT is not used.

  • If you use the <taSopLineIvcInsertComponent> XML node to manually update components, the update does not automatically recalculate taxes. To ensure the update recalculates taxes, include the <taSopHdrIvcInsert> node, and set the CREATETAXES element to 1.

Tax engine   eConnect includes a tax engine that allows you to automatically create taxes. If you use the tax engine, you no longer need to specify tax information in the tax nodes. The <taSopHdrIvcInsert> XML node contains six elements that control the tax engine. To use the tax engine, be aware of the following:

  • To use the tax engine, set the create taxes flag (CREATETAXES) element to 1 . If you are integrating your own taxes, set CREATETAXES to 0.

    Warning: Manual updates to taxes are not supported. If you attempt to manually update taxes, an error will occur and the transaction will fail. A future release of eConnect will include this functionality.

  • The freight tax schedule (FRTSCHID) and miscellaneous tax schedule (MSCSHID) elements mirror the tax schedule ID (TAXSCHID) element.

  • If the default tax schedule flag (DEFTAXSCHDS) element is set to 0, you must populate the TAXSCHID, FRTSCHID, and MSCSHID elements of the <taSopHdrIvcInsert> XML node. You must also set the item tax schedule ID (ITMTSHID) and the delivery method tax schedule ID (TAXSCHID) elements of the <taSopLineIvcInsert> XML node.

  • If the DEFTAXSCHDS element is set to 1, the tax schedule defined by setup will be the default. You must specify the shipping method (SHIPMTHD) element to provide the schedules used to create freight and miscellaneous tax for the SOP header. In addition, the ITMTSHID and TAXSCHID element of the <taSopLineIvcInsert> XML node must be excluded from the XML node or set to null. If you populate these two elements as blank (' ') it will blank out the schedules and no taxes will be created.

  • The freight taxable (FREIGTBLE) and miscellaneous amount taxable (MISCTBLE) elements in the <taSopHdrIvcInsert> XML node default to 0. Use these elements to indicate whether freight or miscellaneous charges are taxable. You set these elements to indicate whether these charges are taxable, nontaxable, or based on the customer's tax schedules. These are the same options available in the Microsoft Dynamics GP client.

  • The inventory item taxable (IVITMTXB) element of the <taSopLineIvcInsert> node defaults to 0. You use this element to indicate whether the individual freight charge is taxable, nontaxable or based on the customer's tax schedule. These are the same options available in the Microsoft Dynamics GP client.

    Hint: You may still use the tax nodes to calculate taxes. However, you no longer need to pass a sequence record of zero through the tax nodes. You only need a sequence record of zero when header level taxes are used. If you specify the taxes, the CREATETAXES element must be set to 0.

Markdown amounts   If you set the markdown percent (MRKDNPCT) of the <taSopLineIvcInsert> XML node, you must set the DEFPRICING element of the <taSopHdrIvcInsert> XML node to 1. This allows eConnect to calculate the DOCAMNT, SUBTOTAL, and mark down amount (MRKDNAMT) elements for the <taSopHdrIvcInsert> XML node.

When using the MRKDNAMT element of the <taSopLineIvcInsert> XML node, you should be aware that the SOP line and SOP header calculate the markdown amounts differently. The line markdown amount is per quantity. The header markdown amount is the total of the markdown amounts from each line item.

Lot numbers   eConnect allows you to auto-fulfill lot numbers when the inventory item is tracked as a lot item. When you use the <taSopLotAuto> XML node, it must be called before the <taSopLineIvcInsert> XML node. Set the AUTOALLOCATELOT element of the <taSopLineIvcInsert> XML node with one of the following values:

AUTOALLOCATELOT

Description

0

Auto: Fulfillment of lot numbers occurs automatically. This option uses the existing lot in IV00300. The <taSopLotAuto> XML node is not called.

1

Manual: Fulfillment of lot numbers uses the lot numbers specified by the <taSopLotAuto> XML node.

2

Mixed: Fulfillment of lot numbers uses the lot numbers specified by the <taSopLotAuto> XML node. Remaining quantities use the lots from IV00300.

Hint: The lot schema nodes also exist for purchase order receipts, inventory transactions, and inventory transfers.)

Pricing engine   The eConnect pricing engine allows you to calculate standard or extended pricing using the default pricing (DEFPRICING), extended pricing (DEFEXTPRICE), and the include extended pricing promotion (IncludePromo) elements of the <taSopLineIvcInsert> XML node and the DEFPRICING element of the <taSopHdrIvcInsert> XML node.

  • Set the DEFPRICING element to 1 to automatically calculate the unit price (UNITPRICE) and extended price (XTNDPRCE). The pricing engine does not require the UNITPRICE and XTNDPRCE elements.

  • Set the DEFEXTPRICE element to 1 to calculate the XTNDPRCE value. You must also specify the UNITPRICE.

  • When using extended pricing, set the IncludePromo element to 1 to apply the promotion applicable to that line. These include Percentage Off, Value Off, or Quantity Free.

  • Set the DEFPRICING element in the header to calculate the SUBTOTAL element from the <taSopLineIvcInsert> XML nodes. The pricing engine does not require the SUBTOTAL element.

    Warning: If you use Cost based pricing with a multicurrency transaction, you cannot use eConnect default pricing. Also, if you use Currency Amount pricing for a multicurrency transaction but have not set up a price for the specified currency, you cannot use the default pricing option. In both of these cases, you must pass in a price.

Business logic   The taCreateSopPaymentInsertRecord allows you to use a credit card order and to credit the card at the time the order ships. This enables eConnect to better handle deposits and recognize revenue. For example, you can transfer a portion of the credit card payment when the invoice is created. The revenue for the payment will be recognized when the invoice is posted and the product ships.

The stored procedure that handles the header uses the header document ID (DOCID) element to determine what appears on the header of the order or invoice. The DOCID element passed to the header does not affect what happens on the line. The business logic that uses the DOCID element of the line nodes exists in the stored procedure that handles lines. If the DOCID element is not specified in the line node, the stored procedure uses a default value. The settings for the default DOCID value determines how item allocation and fulfillment occurs.

If you use more than one taSopLineIvcInsert node in a document, you must order the entries by item number. Use the values in the ITEMNMBR element to sequence the taSopLineIncInsert nodes in the document.

Updating SOP documents   To update an existing SOP documents, you must comply with the following restrictions:

  • If you modify the header or line, you must resend the entire document. Elements that are excluded or left blank are updated to be empty. The result is that they look like they were removed from the document.

  • To update the quantity and reuse the lot number of a sales line that is a lot tracked item, you have to first delete the existing sales line. Use the taSopLineDelete node to delete the existing sales line.

  • To modify an existing SOP header, set the UpdateIfExists element to 1. You must include values for all elements of the SOP header document. Several elements use calculated values or cannot be modified from the header. These elements do not need to be included in the SOP header document:

    DOCID
    ORIGNUMB
    ORIGTYPE
    TAXAMNT
    MRKDNAMT
    CUSTNMBR
    SUBTOTAL
    DOCAMNT
    USER2ENT
    ADVPMNTS
    FRTTXAMT
    MSCTXAMT
    ORDRDATE
    MSTRNUMB
    APLYWITH
    WITHHAMT
    SALEDATE
    USINGHEADERLEVELTAXES
    COMMAMNT
    CURNCYID
    

  • eConnect validates the SOP header document during the update.

  • A SOP header update can recalculate taxes, commissions, and distributions by setting the appropriate elements to 1. You can also use multiple currency by setting rate changes and static string elements.

  • To modify an existing SOP line, set the UpdateIfExists element of the <taSopLineIvcInsert> XML node to 1. You must include all the SOP line elements in the update. This includes both the changed elements and the elements that are not being changed. You need to also consider the following:

    • If taxes or commissions do not need to be recreated, the SOP line can be passed by itself. Any related header information will be automatically recalculated.

    • If taxes or commissions need to be recalculated, include the SOP header and set the appropriate elements to 1.

    • To recalculate distributions form the SOP line, set the RecreateDist element to 1. The RecreateDist element is only used during updates and not for the initial creation of the line.

    • Multi currency is supported.

    • eConnect validates the new line using edit checks from the original line to ensure the new line is valid in situations where transfer have occurred.

  • To modify an existing SOP line component, set the UpdateIfExists element of the <taSopLineIncInsertComponent> XML node to 1. You must include all the SOP line component elements in the update. This includes both the changed elements and the elements that are not being changed. You need to also consider the following:

    • If taxes or commissions do not need to be recreated, the SOP line can be passed by itself. Any related header information will be automatically recalculated.

    • If taxes or commissions need to be recalculated, include the SOP header and set the appropriate elements to 1.

    • To recalculate distributions from the SOP line component, set the RecreateDist element to 1. The RecreateDist element is only used during updates and not for the initial creation of the component line.

  • You modify SOP payments and deposits to an existing transaction by supplying additional payment or deposit information in the <taCreateSopPaymentInsert> node. Populate the node in the manner as a new transaction. To modify an existing payment or deposit, set the Action element to 3. You should also consider the following:

    • When you modify an existing payment or deposit, the existing payment or deposit is removed and replaced with the new one you have supplied. This allows all modules to have reversing information so that the new information can be posted.

    • When adding or modifying payments or deposits, you must set the payment received (PYMTRCVD) element of the <taSopHdrIvcInsert> XML node with the total of all payments or deposits associated with the transaction being updated.

Quantity shortages    To use the quantity shortage option (QtyShrtOpt) element of the <taSopLineIvcInsert> XML node, you must remember the following restrictions:

  • eConnect only uses the QtyShrtOpt setting when the quantity available (quantity on hand less quantity available) is less than the value specified in the quantity ( QUANTITY) element.
  • If you are using invoices (SOPTYPE=3) and the QtyShrtOpt is not set to 2, you must set the DEFPRICING element of the <taSopHdrInvInsert> node to 1. This allows the DOCAMNT and/or SUBTOTAL elements to be automatically recalculated and populated with the correct values. This DEFPRICING restriction does not apply to orders.

Document structure

<eConnect>
    <SOPTransactionType>
        <eConnectProcessInfo />
        <taRequesterTrxDisabler_Items>
            <taRequesterTrxDisabler />
        </taRequesterTrxDisabler_Items>
        <taUpdateCreateItemRcd />
        <taUpdateCreateCustomerRcd />
        <taCreateCustomerAddress_Items>
            <taCreateCustomerAddress />
        </taCreateCustomerAddress_Items>
        <taSopSerial_Items>
            <taSopSerial />
        </taSopSerial_Items>
        <taSopLotAuto_Items>
            <taSopLotAuto />
        </taSopLotAuto_Items>
        <taSopLineIvcInsert_Items>
            <taSopLineIvcInsert />
        </taSopLineIvcInsert_Items>
        <taSopLineIvcInsertComponent_Items>
            <taSopLineIvcInsertComponent />
        </taSopLineIvcInsertComponent_Items>
        <taSopTrackingNum_Items>
            <taSopTrackingNum />
        </taSopTrackingNum_Items>
        <taSopCommissions_Items>
            <taSopCommissions />
        </taSopCommissions_Items>
        <taSopLineIvcTaxInsert_Items>
            <taSopLineIvcTaxInsert />
        </taSopLineIvcTaxInsert_Items>
        <taCreateSopPaymentInsertRecord_Items>
            <taCreateSopPaymentInsertRecord />
        </taCreateSopPaymentInsertRecord_Items>
        <taSopUserDefined />
        <taSopDistribution_Items>
            <taSopDistribution />
        </taSopDistribution_Items>
        <taAnalyticsDistribution_Items>
            <taAnalyticsDistribution />
        </taAnalyticsDistribution_Items>
        <taSopMultiBin_Items>
            <taSopMultiBin />
        </taSopMultiBin_Items>
        <taSopHdrIvcInsert />
        <taSopToPopLink />
        <taSopUpdateCreateProcessHold />
        <taCreateSOPTrackingInfo />
        <taMdaUpdate_Items>
            <taMdaUpdate />
        </taMdaUpdate_Items>
    </SOPTransactionType>
</eConnect>

See also