QbXML for Adding a Customer with Custom Fields

From ConsoliBYTE Wiki
Jump to: navigation, search

QuickBooks custom fields are called "DataExt" records in the API. Since DataExts are NOT actually part of the core Customer record, you use a completely separate request to add/update them.

Below you can see double request, where the first request creates the customer, and the second sets the custom fields for the customer.

qbXML Request

<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="7.0"?>
	<QBXMLMsgsRq onError="stopOnError">

		<CustomerAddRq requestID="Q3VzdG9tZXJBZGR8MTExMTIxMjE=">
				<Name>Keith Palmer Jr.</Name>
				<LastName>Palmer Jr.</LastName>
					<Addr1>134 Stonemill Road</Addr1>
				<Contact>Keith Palmer Jr.</Contact>
						<FullName>Keith Palmer Jr.</FullName>

qbXML Response