Developer Q&A
How to create Customer with target billing
I want to be able to setup a new customer with a billing account in mind. In my case, I know the billing account ID I want to use is from account # 88
..../corpnet/customer/billingaccountdetails.aspx?Areas=Customer&billingAccountId=88
I tried providing a Contract ID but that's a no go:
REQUEST
<soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope">
<soap-env:Body>
<ns0:Execute xmlns:ns0="http://corrigo.com/integration/">
<ns0:commandRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns0:CreateCommand">
<ns0:Entity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns0:Customer">
<ns0:Name>raul test</ns0:Name>
<ns0:WorkZone>
<ns0:Id>9</ns0:Id>
</ns0:WorkZone>
<ns0:TenantCode>raul-tes5</ns0:TenantCode>
<ns0:Addresses>
<ns0:Address2>
<ns0:City>some city</ns0:City>
<ns0:State>OK</ns0:State>
<ns0:Street>123 Rando Rd</ns0:Street>
<ns0:Street2>PO BOX 12345</ns0:Street2>
</ns0:Address2>
</ns0:Addresses>
<ns0:Contract>88
</ns0:Contract>
</ns0:Entity>
</ns0:commandRequest>
</ns0:Execute>
</soap-env:Body>
</soap-env:Envelope>
RESPONSE
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
0
Object reference not set to an instance of an object.
System.NullReferenceException
</soap:Body>
</soap:Envelope>
Can someone please shed light on what I might be missing here?
Follow up question, how can I issue a search to look for a billing account that matches a particular name?
thanks!
Raul