Invoice With Custom Fields (Extrinsic)

Sample cXML with custom fields (a.k.a. extrinsics) and the corresponding PDF version for Sweden.

You can download this example as an XML file and the corresponding PDF version.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.020/InvoiceDetail.dtd">
<cXML version="1.2.020" xml:lang="en-US" timestamp="2016-08-11T10:16:25-08:00" payloadID="xxxx.xxxx.xxx@demo.coupahost">
	<Header>
		<From>
			<Credential domain="DUNS">
				<Identity>SWEDEN</Identity>
			</Credential>
		</From>
		<To>
			<Credential domain="DUNS">
				<Identity>SWEDENCOUPA</Identity>
			</Credential>
		</To>
		<Sender>
			<Credential domain="DUNS">
				<Identity>SWEDEN</Identity>
				<SharedSecret>SWE</SharedSecret>
			</Credential>
			<UserAgent>The User Agent</UserAgent>
		</Sender>
	</Header>
	<Request deploymentMode="production">
		<InvoiceDetailRequest>
			<InvoiceDetailRequestHeader invoiceDate="2017-01-08T10:13:00-08:00" operation="new" purpose="standard" invoiceOrigin="supplier" invoiceID="Swed_Extrinsic">
				<InvoiceDetailHeaderIndicator />
				<InvoiceDetailLineIndicator isAccountingInLine="yes" isTaxInLine="yes" />
				<InvoicePartner>
					<Contact role="soldTo">
						<Name xml:lang="en-US">Customer Contact</Name>
						<PostalAddress>
							<DeliverTo>Customer Name</DeliverTo>
							<Street>123 City Street</Street>
							<City>Sweden</City>
							<PostalCode>S1</PostalCode>
							<Country isoCountryCode="SE">Sweden</Country>
						</PostalAddress>
					</Contact>
				</InvoicePartner>
				<InvoicePartner>
					<Contact role="billTo">
						<Name xml:lang="en">ACECorporation</Name>
						<PostalAddress name="default">
							<Street>28 Nevada Blvd</Street>
							<City>Laughlin</City>
							<PostalCode>94301</PostalCode>
							<Country isoCountryCode="SE">Sweden</Country>
						</PostalAddress>
						<Phone>
							<TelephoneNumber>
								<CountryCode isoCountryCode="US" />
								<AreaOrCityCode>41</AreaOrCityCode>
								<Number>43 210 9664</Number>
							</TelephoneNumber>
						</Phone>
					</Contact>
				</InvoicePartner>
				<InvoicePartner>
					<Contact role="remitTo" addressID="SW">
						<Name xml:lang="en">Sweden Supplier</Name>
						<PostalAddress name="default">
							<Street>SWEDEN 123</Street>
							<City>SWEDEN</City>
							<PostalCode>123</PostalCode>
							<Country isoCountryCode="SE">Sweden</Country>
						</PostalAddress>
					</Contact>
					<IdReference domain="taxPrefix" identifier="SE" />
					<IdReference domain="taxNumber" identifier="999999999901" />
				</InvoicePartner>
				<InvoicePartner>
					<Contact role="invoiceFrom" addressID="SW">
						<Name xml:lang="en">Sweden Supplier</Name>
						<PostalAddress name="default">
							<Street>SWEDEN 123</Street>
							<City>SWEDEN</City>
							<PostalCode>123</PostalCode>
							<Country isoCountryCode="SE">Sweden</Country>
						</PostalAddress>
					</Contact>
					<IdReference domain="taxPrefix" identifier="SE" />
					<IdReference domain="taxNumber" identifier="999999999901" />
				</InvoicePartner>
				<InvoiceDetailShipping>
					<Contact role="shipFrom" addressID="SW">
						<Name xml:lang="en-US">Me, Myself, and I</Name>
						<PostalAddress>
							<DeliverTo>Company Name</DeliverTo>
							<Street>SWEDEN 123</Street>
							<City>SWEDEN</City>
							<PostalCode>123</PostalCode>
							<Country isoCountryCode="SE">Sweden</Country>
						</PostalAddress>
					</Contact>
					<Contact role="shipTo">
						<Name xml:lang="en-US">sweden1</Name>
						<PostalAddress>
							<DeliverTo>sweden1</DeliverTo>
							<Street>sweden1</Street>
							<City>Sweden</City>
							<PostalCode>1234</PostalCode>
							<Country isoCountryCode="SE">Sweden</Country>
						</PostalAddress>
					</Contact>
				</InvoiceDetailShipping>
				<PaymentTerm payInNumberOfDays="45" />
				<Comments xml:lang="en-US" />
				<Extrinsic name="ExchangeRate">1.00</Extrinsic>
				<!-- Custom field on Invoice Header - field name = ""supplier_status" -->
				<Extrinsic name="CustomFields">
					<IdReference identifier="supplier_status" domain="CustomField">
						<Description xml:lang="en-US">Active</Description>
					</IdReference>
				</Extrinsic>
			</InvoiceDetailRequestHeader>
			<InvoiceDetailOrder>
				<InvoiceDetailOrderInfo>
					<MasterAgreementReference>
						<DocumentReference payloadID="9089" />
					</MasterAgreementReference>
				</InvoiceDetailOrderInfo>
				<InvoiceDetailItem quantity="5.0" invoiceLineNumber="1">
					<UnitOfMeasure>EA</UnitOfMeasure>
					<UnitPrice>
						<Money currency="SEK">25.00</Money>
					</UnitPrice>
					<InvoiceDetailItemReference lineNumber="1">
						<ItemID>
							<SupplierPartID>41U3196</SupplierPartID>
							<SupplierPartAuxiliaryID>359</SupplierPartAuxiliaryID>
						</ItemID>
						<Description xml:lang="en-US">Laptop Sleeve</Description>
					</InvoiceDetailItemReference>
					<SubtotalAmount>
						<Money currency="SEK">125.00</Money>
					</SubtotalAmount>
					<Tax>
						<Money currency="SEK">25.00</Money>
						<Description xml:lang="en-GB">VAT</Description>
						<TaxDetail purpose="tax" category="vat" percentageRate="25">
							<TaxableAmount>
								<Money currency="SEK">125.00</Money>
							</TaxableAmount>
							<TaxAmount>
								<Money currency="SEK">25.00</Money>
							</TaxAmount>
						</TaxDetail>
					</Tax>
					<!-- Custom field on Invoice Line - field name = "my_field" -->
					<Extrinsic name="CustomFields">
						<IdReference identifier="my_field" domain="CustomFields">
							<Description xml:lang="en">New</Description>
						</IdReference>
					</Extrinsic>
				</InvoiceDetailItem>
			</InvoiceDetailOrder>
			<InvoiceDetailSummary>
				<SubtotalAmount>
					<Money currency="SEK">125.00</Money>
				</SubtotalAmount>
				<Tax>
					<Money alternateAmount="25.00" alternateCurrency="SEK" currency="SEK">25.00</Money>
					<Description xml:lang="en-US">Tax</Description>
				</Tax>
				<GrossAmount>
					<Money currency="SEK">150.00</Money>
				</GrossAmount>
				<NetAmount>
					<Money currency="SEK">125.00</Money>
				</NetAmount>
				<DueAmount>
					<Money currency="SEK">150.00</Money>
				</DueAmount>
			</InvoiceDetailSummary>
		</InvoiceDetailRequest>
	</Request>
</cXML>