{
	"name": "form/nc/erp-sync/cxml/save/order-sales-xml-convert.json",
	"info-": "created by xml-to-json-definition-convert.lua",
	"line_break": " ",
	"main_data_tag": "ord",
	"namespace": "",
	"import_path": "C:/nc/sandvik/order-sales/import/sales-order/",
	"import_path_mac": "/Volumes/nc/work/tekpal/Sandvik-SAP-edi/import/sales-order/",
	"export_path": "C:/nc/sandvik/order-sales/export/order-confirmation/conf-.xml",
	"export_path_mac": "/Volumes/nc/work/tekpal/Sandvik-SAP-edi/export/order-confirmation/conf-.xml",
	"append_file": true,
	"export_text": true,
	"create_empty_tag": true,
	"missing_allowed_data_tag_warning": false,
	"charset": "UTF-8",
	"decimal_separator": ".",
	"indent": "\t",
	"stylesheet": "",
	"convert": [
		{
			"field": "ord",
			"tag": "cXML",
			"attribute": {
				"payloadID": "011D01323B7B1FD0A282FAEAB003BF12",
				"timestamp": "2025-09-02T16:14:04",
				"version": "1.2.066"
			},
			"content": [
				{
					"tag": "Header",
					"content": [
						{
							"tag": "From",
							"content": [
								{
									"tag": "Credential",
									"attribute": {
										"domain": "NetworkID"
									},
									"content": [
										{
											"tag": "Identity",
											"text": "AN11167947425-T"
										}
									]
								},
								{
									"tag": "Credential",
									"attribute": {
										"domain": "SystemID"
									},
									"content": [
										{
											"tag": "Identity",
											"text": "S4QCLNT400"
										}
									]
								}
							]
						},
						{
							"tag": "To",
							"content": [
								{
									"tag": "Credential",
									"attribute": {
										"domain": "NetworkID"
									},
									"content": [
										{
											"tag": "Identity",
											"text": "AN11236273760-T",
											"info-": "toimittajan tunnus, alkuvaiheessa SMC Hollanti. Jos ei täsmää siihen, kenttä pitää olla tyhjä"
										}
									]
								},
								{
									"tag": "Correspondent",
									"content": [
										{
											"tag": "Contact",
											"attribute": {
												"role": "correspondent"
											},
											"content": [
												{
													"tag": "Name",
													"text": "SUOMEN TEKNIIKKAPALVELU OY",
													"attribute": {
														"xml:lang": "EN"
													}
												},
												{
													"tag": "PostalAddress",
													"content": [
														{
															"tag": "Street",
															"text": "7 AHJOTIE"
														},
														{
															"tag": "City",
															"text": "MULTIA"
														},
														{
															"tag": "Country",
															"text": "Finland",
															"attribute": {
																"isoCountryCode": "FI"
															}
														}
													]
												},
												{
													"tag": "Email",
													"attribute": {
														"name": ""
													}
												}
											]
										}
									]
								}
							]
						},
						{
							"tag": "Sender",
							"content": [
								{
									"tag": "Credential",
									"attribute": {
										"domain": "AribaNetworkUserId"
									},
									"content": [
										{
											"tag": "Identity",
											"text": "sysadmin@ariba.com"
										}
									]
								},
								{
									"tag": "UserAgent",
									"info-": "toimittajan välimies",
									"text": "Ariba Supplier"
								}
							]
						}
					]
				},
				{
					"tag": "Request",
					"attribute": {
						"deploymentMode": "test"
					},
					"content": [
						{
							"tag": "OrderRequest",
							"content": [
								{
									"tag": "OrderRequestHeader",
									"attribute": {
										"type": "new",
										"orderDate": {
											"field": "ord.order_date",
											"data_type": "date",
											"format": "%Y-%m-%dT%H:%M:%S%z2",
											"info-": "%z is +0200, but we need +02:00 so we use special %z2 format",
											"text": "2025-09-02T12:00:00+02:00"
										},
										"orderID": { "text": "4500035561", "field": "ord.company_reference_number", "import_field-": "ord.order_id" },
										"orderType": "regular",
										"orderVersion": "1"
									},
									"content": [
										{
											"tag": "Total",
											"content": [
												{
													"field": "ord.price_without_vat",
													"extra_import_field": ["ord.price_with_vat"],
													"tag": "Money",
													"text": "676.40",
													"attribute": {
														"currency": { "text": "EUR", "field": "ord.currency_id" }
													}
												}
											]
										},
										{
											"tag": "ShipTo",
											"content": [
												{
													"tag": "Address",
													"attribute": {
														"addressID": "DIC1",
														"addressIDDomain": "buyerLocationID",
														"isoCountryCode": "NL"
													},
													"content": [
														{
															"tag": "Name",
															"text": "Eindhoven SMCL (HUB)",
															"attribute": {
																"xml:lang": "EN"
															}
														},
														{
															"tag": "PostalAddress",
															"attribute": {
																"name": "default"
															},
															"content": [
																{
																	"tag": "Street",
																	"text": "De Schakel 40-50"
																},
																{
																	"tag": "City",
																	"text": "EINDHOVEN"
																},
																{
																	"tag": "Municipality"
																},
																{
																	"tag": "PostalCode",
																	"text": "5651 GH"
																},
																{
																	"tag": "Country",
																	"attribute": {
																		"isoCountryCode": "NL"
																	}
																}
															]
														}
													]
												},
												{
													"tag": "IdReference",
													"attribute": {
														"domain": "buyerLocationID",
														"identifier": "DIC1"
													}
												},
												{
													"tag": "IdReference",
													"attribute": {
														"domain": "stockLocationID",
														"info-": "asdasdasd",
														"identifier": "8888"
													}
												}
											]
										},
										{
											"tag": "BillTo",
											"import_field": "ord.company_id",
											"from_static": "SMC HOLLANTI",
											"content": [
												{
													"tag": "Address",
													"attribute": {
														"addressID": "1861",
														"isoCountryCode": "IE"
													},
													"content": [
														{
															"tag": "Name",
															"text": "Sandvik Mining and Construction",
															"attribute": {
																"xml:lang": "EN"
															}
														},
														{
															"tag": "PostalAddress",
															"content": [
																{
																	"tag": "Street",
																	"text": "4th Floor Dockline"
																},
																{
																	"tag": "City",
																	"text": "Dublin 1"
																},
																{
																	"tag": "Municipality"
																},
																{
																	"tag": "State",
																	"text": "D"
																},
																{
																	"tag": "PostalCode",
																	"text": "D01 K8N7"
																},
																{
																	"tag": "Country",
																	"attribute": {
																		"isoCountryCode": "IE"
																	}
																}
															]
														},
														{
															"tag": "Phone",
															"content": [
																{
																	"tag": "TelephoneNumber",
																	"content": [
																		{
																			"tag": "CountryCode",
																			"attribute": {
																				"isoCountryCode": "IE"
																			}
																		},
																		{
																			"tag": "AreaOrCityCode"
																		},
																		{
																			"tag": "Number"
																		}
																	]
																}
															]
														},
														{
															"tag": "Fax",
															"content": [
																{
																	"tag": "TelephoneNumber",
																	"content": [
																		{
																			"tag": "CountryCode",
																			"attribute": {
																				"isoCountryCode": "IE"
																			}
																		},
																		{
																			"tag": "AreaOrCityCode"
																		},
																		{
																			"tag": "Number"
																		}
																	]
																}
															]
														}
													]
												},
												{
													"tag": "IdReference",
													"attribute": {
														"domain": "buyerID",
														"identifier": "1861"
													}
												}
											]
										},
										{
											"tag": "BusinessPartner",
											"attribute": {
												"type": "organization",
												"role": "soldTo"
											},
											"content": [
												{
													"tag": "Address",
													"attribute": {
														"addressID": "1400",
														"addressIDDomain": "buyerAccountID",
														"isoCountryCode": "IE"
													},
													"content": [
														{
															"tag": "Name",
															"text": "Sandvik Mining and Construction",
															"attribute": {
																"xml:lang": "EN"
															}
														},
														{
															"tag": "PostalAddress",
															"content": [
																{
																	"tag": "Street",
																	"text": "4th Floor Dockline"
																},
																{
																	"tag": "City",
																	"text": "Dublin 1"
																},
																{
																	"tag": "State",
																	"text": "D"
																},
																{
																	"tag": "PostalCode",
																	"text": "D01 K8N7"
																},
																{
																	"tag": "Country",
																	"attribute": {
																		"isoCountryCode": "IE"
																	}
																}
															]
														},
														{
															"tag": "Phone",
															"content": [
																{
																	"tag": "TelephoneNumber",
																	"content": [
																		{
																			"tag": "CountryCode",
																			"attribute": {
																				"isoCountryCode": "IE"
																			}
																		},
																		{
																			"tag": "AreaOrCityCode"
																		},
																		{
																			"tag": "Number"
																		}
																	]
																}
															]
														},
														{
															"tag": "Fax",
															"content": [
																{
																	"tag": "TelephoneNumber",
																	"content": [
																		{
																			"tag": "CountryCode",
																			"attribute": {
																				"isoCountryCode": "IE"
																			}
																		},
																		{
																			"tag": "AreaOrCityCode"
																		},
																		{
																			"tag": "Number"
																		}
																	]
																}
															]
														}
													]
												},
												{
													"tag": "IdReference",
													"attribute": {
														"domain": "buyerAccountID",
														"identifier": "1400"
													}
												}
											]
										},
										{
											"tag": "LegalEntity",
											"content": [
												{
													"tag": "IdReference",
													"attribute": {
														"domain": "CompanyCode",
														"identifier": "1861"
													},
													"content": [
														{
															"tag": "Description",
															"text": "Sandvik Mining and Construction",
															"attribute": {
																"xml:lang": "EN"
															}
														}
													]
												}
											]
										},
										{
											"tag": "OrganizationalUnit",
											"content": [
												{
													"tag": "IdReference",
													"attribute": {
														"domain": "PurchasingOrganization",
														"identifier": "1400"
													},
													"content": [
														{
															"tag": "Description",
															"text": "SMCL P \n&\n S PARTSERV",
															"attribute": {
																"xml:lang": "EN"
															}
														}
													]
												}
											]
										},
										{
											"tag": "OrganizationalUnit",
											"content": [
												{
													"tag": "IdReference",
													"attribute": {
														"domain": "PurchasingGroup",
														"identifier": "102"
													},
													"content": [
														{
															"tag": "Description",
															"text": "Fionna Langan",
															"attribute": {
																"xml:lang": "EN"
															}
														}
													]
												}
											]
										},
										{
											"tag": "PaymentTerm",
											"attribute": {
												"payInNumberOfDays": { "text": "75", "field": "ord.terms_of_payment_id" }
											},
											"content": [
												{
													"tag": "Discount",
													"content": [
														{
															"tag": "DiscountPercent",
															"attribute": {
																"percent": "0.000"
															}
														}
													]
												}
											]
										},
										{
											"tag": "Contact",
											"attribute": {
												"addressID": "0001002101",
												"addressIDDomain": "buyerID",
												"role": "supplierCorporate"
											},
											"content": [
												{
													"tag": "Name",
													"text": "SUOMEN TEKNIIKKAPALVELU OY",
													"attribute": {
														"xml:lang": "EN"
													}
												},
												{
													"tag": "PostalAddress",
													"content": [
														{
															"tag": "Street",
															"text": "7 AHJOTIE"
														},
														{
															"tag": "City",
															"text": "MULTIA"
														},
														{
															"tag": "Municipality"
														},
														{
															"tag": "State",
															"text": "08"
														},
														{
															"tag": "PostalCode",
															"text": "42600"
														},
														{
															"tag": "Country",
															"attribute": {
																"isoCountryCode": "FI"
															}
														}
													]
												},
												{
													"tag": "Email",
													"attribute": {
														"name": "default"
													}
												},
												{
													"tag": "Fax",
													"content": [
														{
															"tag": "TelephoneNumber",
															"content": [
																{
																	"tag": "CountryCode",
																	"attribute": {
																		"isoCountryCode": "FI"
																	}
																},
																{
																	"tag": "AreaOrCityCode"
																},
																{
																	"tag": "Number"
																}
															]
														}
													]
												},
												{
													"tag": "IdReference",
													"attribute": {
														"domain": "buyerID",
														"identifier": "0001002101"
													}
												}
											]
										},
										{
											"tag": "Contact",
											"attribute": {
												"role": "purchasingAgent"
											},
											"content": [
												{
													"attribute_match": { "role": "purchasingAgent" },
													"field": "ord.your_reference",
													"tag": "Name",
													"text": "Fionna Langan",
													"attribute": {
														"xml:lang": "EN"
													}
												},
												{
													"tag": "Email",
													"text": "fionna.langan@sandvik.com"
												}
											]
										},
										{
											"field": "ord.note",
											"index_field": ["ord.json_data.mark"],
											"format": "text",
											"tag": "Comments",
											"attribute_match": false,
											"add_to_field": false,
											"text": " Please send order confirmation within 48 hours with a \tfirm delivery date to Buyer listed on this PO Please include Sandvik part number on all \tdocumentation and items sales to: payables_ie@sandvik.com sales queries to: \tAPserviceDeskIE@sandvik.com",
											"attribute": {
												"type": "Header text",
												"xml:lang": "EN"
											}
										},
										{
											"tag": "TermsOfDelivery",
											"content": [
												{
													"tag": "TermsOfDeliveryCode",
													"attribute": {
														"value": "TransportCondition"
													}
												},
												{
													"tag": "ShippingPaymentMethod",
													"attribute": {
														"value": "Other"
													}
												},
												{
													"tag": "TransportTerms",
													"text": "Free Carrier",
													"attribute": {
														"value": "FCA"
													}
												},
												{
													"tag": "Address",
													"content": [
														{
															"tag": "Name",
															"text": "FI-Multia",
															"attribute": {
																"xml:lang": "EN"
															}
														}
													]
												}
											]
										},
										{
											"tag": "OrderRequestHeaderIndustry",
											"content": [
												{
													"tag": "ExternalDocumentType",
													"attribute": {
														"documentType": "NB"
													},
													"content": [
														{
															"tag": "Description",
															"text": "Standard PO",
															"attribute": {
																"xml:lang": "EN"
															}
														}
													]
												}
											]
										},
										{
											"tag": "Extrinsic",
											"text": "1861",
											"attribute": {
												"name": "CompanyCode"
											}
										},
										{
											"tag": "Extrinsic",
											"text": "102",
											"attribute": {
												"name": "PurchaseGroup"
											}
										},
										{
											"tag": "Extrinsic",
											"text": "1400",
											"attribute": {
												"name": "PurchaseOrganization"
											}
										},
										{
											"tag": "Extrinsic",
											"attribute": {
												"name": "Requester"
											}
										},
										{
											"tag": "Extrinsic",
											"text": "Yes",
											"attribute": {
												"name": "Ariba.invoicingAllowed"
											}
										},
										{
											"tag": "Extrinsic",
											"text": "676.4",
											"attribute": {
												"name": "Ariba.availableAmount"
											}
										},
										{
											"tag": "Extrinsic",
											"text": "IE6374158E",
											"attribute": {
												"name": "buyerVatID"
											}
										},
										{
											"tag": "Extrinsic",
											"text": "FI27405518",
											"attribute": {
												"name": "supplierVatID"
											}
										},
										{
											"tag": "Extrinsic",
											"text": "0001002101",
											"attribute": {
												"name": "partyAdditionalID"
											}
										},
										{
											"tag": "Extrinsic",
											"text": "within 75 days Due net",
											"attribute": {
												"name": "AribaNetwork.PaymentTermsExplanation"
											}
										}
									]
								},
								{
									"tag": "ItemOut",
									"field": "ordr",
									"attribute": {
										"lineNumber": { "text": "00010", "field": "ordr.json_data.customer_row_number" },
										"quantity": { "text": "10.000", "field": "ordr.order_amount" },
										"requestedDeliveryDate": { "text": "2025-09-30T12:00:00+02:00", "field": "ordr.delivery_date" }
									},
									"content": [
										{
											"tag": "ItemID",
											"content": [
												{
													"tag": "SupplierPartID",
													"text": "EN",
													"info-": "toimittajan tuotenumero"
												},
												{
													"tag": "BuyerPartID",
													"text": "55168780",
													"field": "ordr.product_id",
													"field2": "ordr.json_data.supplier_product_code",
													"info-": "sandvikin tuotenumero"
												}
											]
										},
										{
											"tag": "ItemDetail",
											"content": [
												{
													"tag": "UnitPrice",
													"content": [
														{
															"tag": "Money",
															"text": "55.24",
															"field": "ordr.unit_price",
															"info-": "yksikköhinta",
															"attribute": {
																"currency": "EUR",
																"to_do": "change currency to sales order code?"
															}
														}
													]
												},
												{
													"tag": "Description",
													"text": "ROLLER",
													"field": "ordr.description",
													"info-": "tuotteen nimi",
													"attribute": {
														"xml:lang": "EN"
													}
												},
												{
													"tag": "UnitOfMeasure",
													"text": "EA"
												},
												{
													"tag": "PriceBasisQuantity",
													"attribute": {
														"conversionFactor": "1",
														"quantity": "1",
														"info-": "tuotteen hintakerroin"
													},
													"content": [
														{
															"tag": "UnitOfMeasure",
															"text": "EA",
															"info-": "tuotteen yksikkö https://help.sap.com/docs/business-network-for-procurement/catalog-format-reference/units-of-measure-for-catalog-items-dda52b15f0181014b6629ca1fc345e6b?locale=en-US"
														}
													]
												},
												{
													"tag": "Classification",
													"text": "74906",
													"attribute": {
														"domain": "ERPCommodityCode"
													}
												},
												{
													"tag": "Classification",
													"text": "Ug TH DSP - Other",
													"attribute": {
														"domain": "ERPCommodityCodeDescription"
													}
												},
												{
													"tag": "PlannedAcceptanceDays",
													"text": "1"
												},
												{
													"tag": "Extrinsic",
													"text": "4",
													"attribute": {
														"name": "ReceivingType"
													}
												},
												{
													"tag": "Extrinsic",
													"text": "00010",
													"attribute": {
														"name": "extLineNumber"
													}
												}
											]
										},
										{
											"tag": "Tax",
											"content": [
												{
													"tag": "Money",
													"text": "0.00",
													"attribute": {
														"currency": "EUR"
													}
												},
												{
													"tag": "Description",
													"attribute": {
														"xml:lang": "EN"
													}
												},
												{
													"tag": "TaxDetail",
													"attribute": {
														"category": "NN",
														"percentageRate": ""
													},
													"content": [
														{
															"tag": "TaxAmount",
															"content": [
																{
																	"tag": "Money",
																	"text": " 0.00",
																	"attribute": {
																		"currency": "EUR"
																	}
																}
															]
														}
													]
												}
											]
										},
										{
											"tag": "Contact",
											"attribute": {
												"role": "BuyerPlannerCode",
												"info-": "yhteyshenkilö Gilles Agboton"
											},
											"content": [
												{
													"tag": "Name",
													"text": "UG TH DRI SP OTH",
													"attribute": {
														"xml:lang": "EN"
													}
												},
												{
													"tag": "IdReference",
													"attribute": {
														"domain": "BuyerPlannerCode",
														"identifier": "906"
													},
													"content": [
														{
															"tag": "Description",
															"text": "UG TH DRI SP OTH",
															"attribute": {
																"xml:lang": "EN"
															}
														}
													]
												}
											]
										},
										{
											"tag": "TermsOfDelivery",
											"content": [
												{
													"tag": "TermsOfDeliveryCode",
													"attribute": {
														"value": "TransportCondition"
													}
												},
												{
													"tag": "ShippingPaymentMethod",
													"attribute": {
														"value": "Other"
													}
												},
												{
													"tag": "TransportTerms",
													"text": "Free Carrier",
													"attribute": {
														"value": "FCA"
													}
												},
												{
													"tag": "Address",
													"content": [
														{
															"tag": "Name",
															"text": "FI-Multia",
															"attribute": {
																"xml:lang": "EN"
															}
														}
													]
												}
											]
										},
										{
											"tag": "ControlKeys",
											"content": [
												{
													"tag": "OCInstruction",
													"attribute": {
														"value": "allowed"
													},
													"content": [
														{
															"tag": "Lower",
															"content": [
																{
																	"tag": "Tolerances",
																	"content": [
																		{
																			"tag": "PriceTolerance",
																			"content": [
																				{
																					"tag": "Percentage",
																					"attribute": {
																						"percent": "0.00"
																					}
																				}
																			]
																		}
																	]
																}
															]
														},
														{
															"tag": "Upper",
															"content": [
																{
																	"tag": "Tolerances",
																	"content": [
																		{
																			"tag": "PriceTolerance",
																			"content": [
																				{
																					"tag": "Percentage",
																					"attribute": {
																						"percent": "0.00"
																					}
																				}
																			]
																		}
																	]
																}
															]
														}
													]
												},
												{
													"tag": "ASNInstruction",
													"attribute": {
														"value": "notAllowed"
													},
													"content": [
														{
															"tag": "Lower",
															"content": [
																{
																	"tag": "Tolerances"
																}
															]
														},
														{
															"tag": "Upper",
															"content": [
																{
																	"tag": "Tolerances"
																}
															]
														}
													]
												},
												{
													"tag": "salesInstruction",
													"attribute": {
														"value": "isNotERS"
													}
												}
											]
										},
										{
											"tag": "ScheduleLine",
											"attribute": {
												"lineNumber": "0001",
												"quantity": "10.000",
												"requestedDeliveryDate": "2025-09-30T12:00:00+02:00"
											},
											"content": [
												{
													"tag": "UnitOfMeasure",
													"text": "EA"
												}
											]
										},
										{
											"tag": "ItemOutIndustry",
											"content": [
												{
													"tag": "BatchInfo",
													"attribute": {
														"requiresBatch": "yes"
													}
												}
											]
										}
									]
								}
							]
						}
					]
				}
			]
		}
	],
	"missing_fields": ["FTX_25#GEN1"]
}
