[
	{
    "to": "/ProcessSalesOrder",
    "namespace": "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.openapplications.org/oagis/9\" languageCode=\"en-US\" versionID=\"release\" releaseID=\"release\" systemEnvironmentCode=\"Production\" xsi:schemaLocation=\"http://www.openapplications.org/oagis/9 http://distribution.logiasoftware.fi/public/oagis/schema/9_5_1/BODs/ProcessSalesOrder/ProcessSalesOrder.xsd\""
	},
	{
		"from_static": "norex",
		"to": "ApplicationArea/Sender/LogicalID",
		"description": "Sender identification",
		"mandatory": true,
		"not_in_use": false
	},
	{
		"from_static": "logius",
		"to": "ApplicationArea/Receiver/LogicalID",
		"description": "Receiver identification, (use value ”logius”)"
	},
	{
		"from_function": "dt.currentUtcString()",
		"to": "ApplicationArea/CreationDateTime"
	},
	{
		"from_static": "Sales Order",
		"to": "DataArea/Process/ActionCriteria/ActionExpression[@actionCode=\"documenttype=\"]"
	},
	{
		"from_static": "debug",
		"to": "DataArea/Process/ActionCriteria/ChangeStatus/Reason"
	},
  {
		"from": "so",
    "to": "/ProcessSalesOrder/DataArea/SalesOrder",
    "array": [
        {
            "from": "so_sales_order_id",
            "to": "SalesOrderHeader/DocumentID/ID"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/Note[@type=\"pickingNoteComment\"]"
        },
        {
            "from": "so_notes",
            "to": "SalesOrderHeader/Note[@type=\"deliveryNoteCommentBeforeLines\"]"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/Note[@type=\"deliveryNoteCommentAfterLines\"]"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/Note[@type=\"freightNoteComment\"]"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/Note[@type=\"freightVAS\" @status=\"commentID\"]"
        },
        {
            "from": "so_additional_data",
            "to": "SalesOrderHeader/Note[@type=\"additionalComment1\"]"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/Note[@type=\"additionalComment2\"]"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/Note[@type=\"passThrough\" @status=\"commentID\"]"
        },
        {
            "from": "so_our_reference",
            "to": "SalesOrderHeader/DocumentReference[@type=\"sendersReference2\"]/DocumentID/ID"
        },
        {
            "from": "so_first_delivery_date",
            "to": "SalesOrderHeader/DocumentReference[@type=\"sendersReference3\"]/DocumentDateTime"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/DocumentReference[@type=\"sendersReference4\"]/DocumentID/ID"
        },
        {
            "from": "so_your_reference",
            "to": "SalesOrderHeader/DocumentReference[@type=\"customersReference1\"]/DocumentID/ID"
        },
        {
            "from": "so_your_reference_of_delivery",
            "to": "SalesOrderHeader/DocumentReference[@type=\"customersReference2\"]/DocumentID/ID"
        },
        {
            "from": "so_info",
            "to": "SalesOrderHeader/DocumentReference[@type=\"infoCode\"]/DocumentID/ID"
        },
        {
            "from": "so_way_of_delivery",
            "to": "SalesOrderHeader/DocumentReference[@type=\"combinedPicking\"]/DocumentID/ID"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/DocumentReference[@type=\"GTD\"]/DocumentID/ID"
        },
        {
            "from": "so_mark",
            "to": "SalesOrderHeader/DocumentReference[@type=\"orderClass1\"]/DocumentID/ID"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/DocumentReference[@type=\"orderClass1\"]/Description"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/Attachment/EmbeddedData[@mimeCode=\"BASE64\"]"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/Attachment/URI"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/Attachment/FileName"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/Attachment/FileType"
        },
        {
            "from": "so_delivery_address",
            "to": "SalesOrderHeader/Party[@role=\"pickUpPoint\"]/Contact/Address/AttentionOfName"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/Party[@role=\"pickUpPoint\"]/Contact/Address/CareOfName"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/Party[@role=\"pickUpPoint\"]/Contact/Address/CityName"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/Party[@role=\"pickUpPoint\"]/Contact/Address/CountryCode"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/Party[@role=\"pickUpPoint\"]/Contact/Address/PostalCode"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/Party[@role=\"warehouse\"]/PartyIDs/ID"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/Party[@role=\"principal\"]/Contact/Address/ID"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/Party[@role=\"principal\"]/Contact/Address/AttentionOfName"
        },
        {
            "from": "so_delivery_company_id",
            "to": "SalesOrderHeader/Party[@role=\"seller\"]/Contact/Address/AttentionOfName"
        },
        {
            "from": "so_dealer_company_id",
            "to": "SalesOrderHeader/Party[@role=\"senderOrganization\"]/Contact/Address/AttentionOfName"
        },
        {
            "from": "so_invoicing_company_id",
            "to": "SalesOrderHeader/Party[@role=\"receiverOrganization\"]/Contact/Address/AttentionOfName"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/Party[@role=\"endCustomer\"]/Contact/Address/AttentionOfName"
        },
        {
            "from": "so_dealer_company_id",
            "to": "SalesOrderHeader/Party[@role=\"sender\"]/Contact/Address/AttentionOfName"
        },
        {
            "from": "so_company_id",
            "to": "SalesOrderHeader/CustomerParty/PartyIDs/ID[schemeName=\"\"]"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/CustomerParty/PartyIDs/TaxID"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/CustomerParty/PartyIDs/BICID"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/CustomerParty/Contact/TelephoneCommunication/FormattedNumber"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/CustomerParty/Contact/EmailAddressCommunication/EmailAddressID"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/CustomerParty/Contact/Address/ID"
        },
        {
            "from": "so_company_id",
            "to": "SalesOrderHeader/CustomerParty/Contact/Address/AttentionOfName"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/CustomerParty/Contact/Address/CareOfName"
        },
        {
            "from": "so_order_address",
            "to": "SalesOrderHeader/CustomerParty/Contact/Address/AddressLine[@sequence=\"1\"]"
        },
        {
            "from": "so_order_address",
            "to": "SalesOrderHeader/CustomerParty/Contact/Address/CityName"
        },
        {
            "from": "so_order_address",
            "to": "SalesOrderHeader/CustomerParty/Contact/Address/CountrySubDivisionCode"
        },
        {
            "from": "so_order_address",
            "to": "SalesOrderHeader/CustomerParty/Contact/Address/CountryCode"
        },
        {
            "from": "so_order_address",
            "to": "SalesOrderHeader/CustomerParty/Contact/Address/PostalCode"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/CustomerParty/UserArea/PaymentTerm/PaymentTermType"
        },
        {
            "from": "so_supplier_id",
            "to": "SalesOrderHeader/SupplierParty/Contact/Address/AttentionOfName"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/ShipToParty/Contact[@languageCode=\"fi-fi\"]/MobileTelephoneCommunication/FormattedNumber"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/ShipToParty/Contact[@languageCode=\"fi-fi\"]/Address/ID"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/ShipToParty/Contact[@languageCode=\"fifi\"]/Address/AttentionOfName"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/ShipToParty/Contact[@languageCode=\"fi-fi\"]/Address/CareOfName"
        },
        {
            "from": "so_delivery_address",
            "to": "SalesOrderHeader/ShipToParty/Contact[@languageCode=\"fifi\"]/Address/AddressLine[@sequence=\"1\"]"
        },
        {
            "from": "so_delivery_address",
            "to": "SalesOrderHeader/ShipToParty/Contact[@languageCode=\"fi-fi\"]/Address/CityName"
        },
        {
            "from": "so_delivery_address",
            "to": "SalesOrderHeader/ShipToParty/Contact[@languageCode=\"fi-fi\"]/Address/CountrySubDivisionCode"
        },
        {
            "from": "so_delivery_address",
            "to": "SalesOrderHeader/ShipToParty/Contact[@languageCode=\"fi-fi\"]/Address/CountryCode"
        },
        {
            "from": "so_delivery_address",
            "to": "SalesOrderHeader/ShipToParty/Contact[@languageCode=\"fi-fi\"]/Address/PostalCode"
        },
        {
            "from": "so_invoicing_company_id",
            "to": "SalesOrderHeader/BillToParty/Contact/Address/AttentionOfName"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/CarrierParty/AccountID"
        },
        {
            "from": "so_delivery_company_id",
            "to": "SalesOrderHeader/CarrierParty/Contact/Address/AttentionOfName"
        },
        {
            "from": "so_invoicing_company_id",
            "to": "SalesOrderHeader/PayFromParty/Contact/Address/AttentionOfName"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/TransportationTerm/ShipmentServiceLevelCode"
        },
        {
            "from": "so_freight_charges_payer",
            "to": "SalesOrderHeader/TransportationTerm/FreightTermCode"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/PaymentTerm/Note"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/PaymentTerm/Term/ID"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/PaymentTerm/UserArea/Tax/BasisAmount[@currencyID=\"EUR\"]"
        },
        {
            "from": "so_vat_total",
            "to": "SalesOrderHeader/PaymentTerm/UserArea/Tax/Amount[@currencyID=\"EUR\"]"
        },
        {
            "from": "",
            "to": "SalesOrderHeader/RequestedShipDateTime"
        },
        {
            "from": "so_first_delivery_date",
            "to": "SalesOrderHeader/PromisedDeliveryDateTime"
        },
        {
            "from": "sor",
            "to": "/ProcessSalesOrder/DataArea/SalesOrder/SalesOrderLine",
            "array": [
                {
                    "from": "sor_row_number",
                    "to": "LineNumber"
                },
                {
                    "from": "",
                    "to": "Note[@type=\"pickingNoteComment\"]"
                },
                {
                    "from": "",
                    "to": "Note[@type=\"deliveryNoteComment\"]"
                },
                {
                    "from": "",
                    "to": "Note[@type=\"freightNoteComment\"]"
                },
                {
                    "from": "",
                    "to": "Note[@type=\"freightVAS\"]"
                },
                {
                    "from": "",
                    "to": "Note[@type=\"warehouseVAS\"]"
                },
                {
                    "from": "",
                    "to": "Note[@type=\"parcelLabelComment\"]"
                },
                {
                    "from": "",
                    "to": "Note[@type=\"passThrough\" @status=\"commentID\"]"
                },
                {
                    "from": "",
                    "to": "DocumentReference[@actionCode=\"documettype=\"]/DocumentID/ID"
                },
                {
                    "from": "sor_customer_project",
                    "to": "DocumentReference[@type=\"customersReference1\"]/DocumentID/ID"
                },
                {
                    "from": "",
                    "to": "DocumentReference[@type=\"parentLine\"]/LineNumber"
                },
                {
                    "from": "",
                    "to": "DocumentReference[@type=\"rowStatus\"]/Status/Reason"
                },
                {
                    "from": "sor_project_id",
                    "to": "Item/ItemID/ID"
                },
                {
                    "from": "",
                    "to": "Item/Description[@type=\"itemName\"]"
                },
                {
                    "from": "sor_waiting_for_delivery",
                    "to": "Item/Classification[@type=\"criticalRow\"]/Description"
                },
                {
                    "from": "",
                    "to": "Item/Packaging/Dimensions/WeightRange/MaximumWeightMeasure[@unitCode=\"GRM\"]"
                },
                {
                    "from": "",
                    "to": "SerializedLot/Lot/LotIDs/ID[@sequenceName=\"supplier\"]"
                },
                {
                    "from": "",
                    "to": "SerializedLot/Lot/LotIDs/ID[@sequenceName=\"crossDocking\"]"
                },
                {
                    "from": "sor_est_manufacture_date",
                    "to": "SerializedLot/Lot/EffectiveTimePeriod/EndDateTime"
                },
                {
                    "from": "sor_ordered_amount",
                    "to": "SerializedLot/Lot/Quantity[@unitCode=\"PCE\"]"
                },
                {
                    "from": "sor_production_lot",
                    "to": "SerializedLot/Lot/SerialNumber"
                },
                {
                    "from": "",
                    "to": "SerializedLot/Lot/Disposition/Code"
                },
                {
                    "from": "sor_order_amount_2",
                    "to": "SerializedLot/Lot/UserArea/DocumentReference/RequestedQuantity"
                },
                {
                    "from": "",
                    "to": "SerializedLot/Lot/UserArea/DocumentReference/Quantity[@type=\"backorder\"]"
                },
                {
                    "from": "sor_discount_percentage",
                    "to": "QualifiedAmount[type=\"discount\"]/Percentage"
                },
                {
                    "from": "",
                    "to": "PartialShipmentAllowedIndicator"
                },
                {
                    "from": "",
                    "to": "DropShipmentAllowedIndicator"
                },
                {
                    "from": "sor_price__unit",
                    "to": "Tax/BasisAmount[@currencyID=\"EUR\"]"
                },
                {
                    "from": "sor_vat_percentage",
                    "to": "Tax/Calculation/Description"
                },
                {
                    "from": "sor_price_with_vat__unit",
                    "to": "Tax/Amount[@currencyID=\"EUR\"]"
                },
                {
                    "from": "",
                    "to": "Tax[@type=\"line\"]/UserArea/BasisAmount[@currencyID=\"EUR\"]"
                },
                {
                    "from": "",
                    "to": "BackOrderIndicator"
                },
                {
                    "from": "",
                    "to": "SalesOrderSubline/LineNumber"
                },
                {
                    "from": "sor_product_id",
                    "to": "SalesOrderSubline/Item/ItemID/ID"
                },
                {
                    "from": "",
                    "to": "SalesOrderSubline/Item/Description"
                },
                {
                    "from": "",
                    "to": "SalesOrderSubline/Item/Lot/LotIDs/ID[@sequenceName=\"supplier\"]"
                },
                {
                    "from": "",
                    "to": "SalesOrderSubline/Item/Lot/EffectiveTimePeriod/EndDateTime"
                },
                {
                    "from": "",
                    "to": "SalesOrderSubline/Item/Lot/Quantity[@unitCode\"PCE\"]"
                },
                {
                    "from": "sor_serial_number",
                    "to": "SalesOrderSubline/Item/Lot/SerialNumber"
                },
                {
                    "from": "",
                    "to": "SalesOrderSubline/Item/Lot/Disposition/Code"
                },
                {
                    "from": "",
                    "to": "SalesOrderSubline/ParentLineNumber"
                },
                {
                    "from": "sor_delivery_date",
                    "to": "UserArea/ShipmentDateTime"
                },
                {
                    "from": "",
                    "to": "UserArea/LoadingDateTime"
                }
            ]
        }
    ]
}]
