[
	{
		"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",
		"mandatory": true,
		"not_in_use": false,
		"description": "Sender identification"
	},
	{
		"from_static": "logius",
		"to": "ApplicationArea/Receiver/LogicalID",
		"description": "Receiver identification, (use value ”logius”)"
	},
	{
		"from_function": "dt.currentUtcString()",
		"to": "ApplicationArea/CreationDateTime"
	},
	{
		"to": "DataArea/Process/ActionCriteria/ActionExpression[@actionCode=\"documenttype=\"]",
		"from_static": "Sales Order"
	},
	{
		"to": "DataArea/Process/ActionCriteria/ChangeStatus/Reason",
		"from_static": "debug"
	},
	{
		"from": "ord",
		"to": "/ProcessSalesOrder/DataArea/SalesOrder",
		"array": [
			{
				"to": "SalesOrderHeader/DocumentID/ID",
				"from": "ord.order_id"
			},
			{
				"to": "SalesOrderHeader/Note[@type=\"pickingNoteComment\"]",
				"from": ""
			},
			{
				"to": "SalesOrderHeader/Note[@type=\"deliveryNoteCommentBeforeLines\"]",
				"from": "ord.note"
			},
			{
				"to": "SalesOrderHeader/Note[@type=\"deliveryNoteCommentAfterLines\"]",
				"from": ""
			},
			{
				"to": "SalesOrderHeader/Note[@type=\"freightNoteComment\"]",
				"from": ""
			},
			{
				"to": "SalesOrderHeader/Note[@type=\"freightVAS\" @status=\"commentID\"]",
				"from": ""
			},
			{
				"to": "SalesOrderHeader/Note[@type=\"additionalComment1\"]",
				"from": "ord.json_data"
			},
			{
				"to": "SalesOrderHeader/Note[@type=\"additionalComment2\"]",
				"from": ""
			},
			{
				"to": "SalesOrderHeader/Note[@type=\"passThrough\" @status=\"commentID\"]",
				"from": ""
			},
			{
				"to": "SalesOrderHeader/DocumentReference[@type=\"sendersReference2\"]/DocumentID/ID",
				"from": "ord.our_reference"
			},
			{
				"to": "SalesOrderHeader/DocumentReference[@type=\"sendersReference3\"]/DocumentDateTime",
				"from": "ord.json_data.first_delivery_date"
			},
			{
				"to": "SalesOrderHeader/DocumentReference[@type=\"sendersReference4\"]/DocumentID/ID",
				"from": ""
			},
			{
				"to": "SalesOrderHeader/DocumentReference[@type=\"customersReference1\"]/DocumentID/ID",
				"from": "ord.your_reference"
			},
			{
				"to": "SalesOrderHeader/DocumentReference[@type=\"customersReference2\"]/DocumentID/ID",
				"from": "ord.json_data.your_reference_of_delivery"
			},
			{
				"to": "SalesOrderHeader/DocumentReference[@type=\"infoCode\"]/DocumentID/ID",
				"from": "ord.info"
			},
			{
				"to": "SalesOrderHeader/DocumentReference[@type=\"combinedPicking\"]/DocumentID/ID",
				"from": "ord.way_of_delivery"
			},
			{
				"to": "SalesOrderHeader/DocumentReference[@type=\"GTD\"]/DocumentID/ID",
				"from": ""
			},
			{
				"to": "SalesOrderHeader/DocumentReference[@type=\"orderClass1\"]/DocumentID/ID",
				"from": "ord.json_data.mark"
			},
			{
				"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": ""
			},
			{
				"to": "SalesOrderHeader/Party[@role=\"pickUpPoint\"]/Contact/Address/AttentionOfName",
				"from": "ord.delivery_address"
			},
			{
				"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": ""
			},
			{
				"to": "SalesOrderHeader/Party[@role=\"seller\"]/Contact/Address/AttentionOfName",
				"from": "ord.delivery_company_id"
			},
			{
				"to": "SalesOrderHeader/Party[@role=\"senderOrganization\"]/Contact/Address/AttentionOfName",
				"from": "ord.json_data.dealer_company_id"
			},
			{
				"to": "SalesOrderHeader/Party[@role=\"receiverOrganization\"]/Contact/Address/AttentionOfName",
				"from": "ord.invoicing_company_id"
			},
			{
				"to": "SalesOrderHeader/Party[@role=\"endCustomer\"]/Contact/Address/AttentionOfName",
				"from": ""
			},
			{
				"to": "SalesOrderHeader/Party[@role=\"sender\"]/Contact/Address/AttentionOfName",
				"from": "ord.json_data.dealer_company_id"
			},
			{
				"to": "SalesOrderHeader/CustomerParty/PartyIDs/ID[schemeName=\"\"]",
				"from": "ord.company_id"
			},
			{
				"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": ""
			},
			{
				"to": "SalesOrderHeader/CustomerParty/Contact/Address/AttentionOfName",
				"from": "ord.company_id"
			},
			{
				"to": "SalesOrderHeader/CustomerParty/Contact/Address/CareOfName",
				"from": ""
			},
			{
				"to": "SalesOrderHeader/CustomerParty/Contact/Address/AddressLine[@sequence=\"1\"]",
				"from": "ord.order_address"
			},
			{
				"to": "SalesOrderHeader/CustomerParty/Contact/Address/CityName",
				"from": "ord.order_address"
			},
			{
				"to": "SalesOrderHeader/CustomerParty/Contact/Address/CountrySubDivisionCode",
				"from": "ord.order_address"
			},
			{
				"to": "SalesOrderHeader/CustomerParty/Contact/Address/CountryCode",
				"from": "ord.order_address"
			},
			{
				"to": "SalesOrderHeader/CustomerParty/Contact/Address/PostalCode",
				"from": "ord.order_address"
			},
			{
				"to": "SalesOrderHeader/CustomerParty/UserArea/PaymentTerm/PaymentTermType",
				"from": ""
			},
			{
				"to": "SalesOrderHeader/SupplierParty/Contact/Address/AttentionOfName",
				"from": "ord.json_data.supplier_id"
			},
			{
				"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": ""
			},
			{
				"to": "SalesOrderHeader/ShipToParty/Contact[@languageCode=\"fifi\"]/Address/AddressLine[@sequence=\"1\"]",
				"from": "ord.delivery_address"
			},
			{
				"to": "SalesOrderHeader/ShipToParty/Contact[@languageCode=\"fi-fi\"]/Address/CityName",
				"from": "ord.delivery_address"
			},
			{
				"to": "SalesOrderHeader/ShipToParty/Contact[@languageCode=\"fi-fi\"]/Address/CountrySubDivisionCode",
				"from": "ord.delivery_address"
			},
			{
				"to": "SalesOrderHeader/ShipToParty/Contact[@languageCode=\"fi-fi\"]/Address/CountryCode",
				"from": "ord.delivery_address"
			},
			{
				"to": "SalesOrderHeader/ShipToParty/Contact[@languageCode=\"fi-fi\"]/Address/PostalCode",
				"from": "ord.delivery_address"
			},
			{
				"to": "SalesOrderHeader/BillToParty/Contact/Address/AttentionOfName",
				"from": "ord.invoicing_company_id"
			},
			{
				"to": "SalesOrderHeader/CarrierParty/AccountID",
				"from": ""
			},
			{
				"to": "SalesOrderHeader/CarrierParty/Contact/Address/AttentionOfName",
				"from": "ord.delivery_company_id"
			},
			{
				"to": "SalesOrderHeader/PayFromParty/Contact/Address/AttentionOfName",
				"from": "ord.invoicing_company_id"
			},
			{
				"to": "SalesOrderHeader/TransportationTerm/ShipmentServiceLevelCode",
				"from": ""
			},
			{
				"to": "SalesOrderHeader/TransportationTerm/FreightTermCode",
				"from": "ord.json_data.freight_charges_payer"
			},
			{
				"to": "SalesOrderHeader/PaymentTerm/Note",
				"from": ""
			},
			{
				"to": "SalesOrderHeader/PaymentTerm/Term/ID",
				"from": ""
			},
			{
				"to": "SalesOrderHeader/PaymentTerm/UserArea/Tax/BasisAmount[@currencyID=\"EUR\"]",
				"from": ""
			},
			{
				"to": "SalesOrderHeader/PaymentTerm/UserArea/Tax/Amount[@currencyID=\"EUR\"]",
				"from": "ord.vat_price"
			},
			{
				"to": "SalesOrderHeader/RequestedShipDateTime",
				"from": ""
			},
			{
				"to": "SalesOrderHeader/PromisedDeliveryDateTime",
				"from": "ord.json_data.first_delivery_date"
			},
			{
				"from": "sor",
				"to": "/ProcessSalesOrder/DataArea/SalesOrder/SalesOrderLine",
				"array": [
					{
						"to": "LineNumber",
						"from": "ordr.row_number"
					},
					{
						"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": ""
					},
					{
						"to": "DocumentReference[@type=\"customersReference1\"]/DocumentID/ID",
						"from": "ordr.json_data.customer_project"
					},
					{
						"to": "DocumentReference[@type=\"parentLine\"]/LineNumber",
						"from": ""
					},
					{
						"to": "DocumentReference[@type=\"rowStatus\"]/Status/Reason",
						"from": ""
					},
					{
						"to": "Item/ItemID/ID",
						"from": "ordr.project_id"
					},
					{
						"to": "Item/Description[@type=\"itemName\"]",
						"from": ""
					},
					{
						"to": "Item/Classification[@type=\"criticalRow\"]/Description",
						"from": "ordr.waiting_for_delivery"
					},
					{
						"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": ""
					},
					{
						"to": "SerializedLot/Lot/EffectiveTimePeriod/EndDateTime",
						"from": "ordr.json_data.est_manufacture_date"
					},
					{
						"to": "SerializedLot/Lot/Quantity[@unitCode=\"PCE\"]",
						"from": "ordr.order_amount"
					},
					{
						"to": "SerializedLot/Lot/SerialNumber",
						"from": "ordr.production_lot"
					},
					{
						"to": "SerializedLot/Lot/Disposition/Code",
						"from": ""
					},
					{
						"to": "SerializedLot/Lot/UserArea/DocumentReference/RequestedQuantity",
						"from": "ordr.json_data.order_amount_2"
					},
					{
						"to": "SerializedLot/Lot/UserArea/DocumentReference/Quantity[@type=\"backorder\"]",
						"from": ""
					},
					{
						"to": "QualifiedAmount[type=\"discount\"]/Percentage",
						"from": "ordr.discount_percent"
					},
					{
						"to": "PartialShipmentAllowedIndicator",
						"from": ""
					},
					{
						"to": "DropShipmentAllowedIndicator",
						"from": ""
					},
					{
						"to": "Tax/BasisAmount[@currencyID=\"EUR\"]",
						"from": "ordr.unit_price"
					},
					{
						"to": "Tax/Calculation/Description",
						"from": "ordr.vat_percent"
					},
					{
						"to": "Tax/Amount[@currencyID=\"EUR\"]",
						"from": "ordr.json_data.price_with_vat__unit"
					},
					{
						"to": "Tax[@type=\"line\"]/UserArea/BasisAmount[@currencyID=\"EUR\"]",
						"from": ""
					},
					{
						"to": "BackOrderIndicator",
						"from": ""
					},
					{
						"to": "SalesOrderSubline/LineNumber",
						"from": ""
					},
					{
						"to": "SalesOrderSubline/Item/ItemID/ID",
						"from": "ordr.product_id"
					},
					{
						"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": ""
					},
					{
						"to": "SalesOrderSubline/Item/Lot/SerialNumber",
						"from": "ordr.json_data.serial_number"
					},
					{
						"to": "SalesOrderSubline/Item/Lot/Disposition/Code",
						"from": ""
					},
					{
						"to": "SalesOrderSubline/ParentLineNumber",
						"from": ""
					},
					{
						"to": "UserArea/ShipmentDateTime",
						"from": "ordr.actual_delivery_date"
					},
					{
						"to": "UserArea/LoadingDateTime",
						"from": ""
					}
				]
			}
		]
	}
]