Customer
In Business Central there are customers and contacts. When customer represents the financial and balancing aspects, contacts are ie. used to store communication data. Contacts are necessary to be created within the WebConnector Order Processes. Don't worry, customer data is automatically generated by customer templates when a new contact is created by the shop. The customer services are to read one specific or filter multiple customers by different criteria. It also includes the shipping addresses for the customers. Please also see Ship-to Address and Contact.
Service Endpoint
The base Endpoint is:
CustomerIISWebService/CustomerIISWebService
API Methods
Here are the available methods for the Customer Service:
- Create
- Read
- Read Multiple
- Update
- Update Multiple
Read Sample
Request
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:cus="http://tempuri.org/CustomerIISWebService/">
<soap:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Action>http://tempuri.org/CustomerIISWebService/CustomerIISWebService/Read</wsa:Action>
</soap:Header>
<soap:Body>
<cus:Read>
<cus:No>10000</cus:No>
</cus:Read>
</soap:Body>
</soap:Envelope>
Response
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:Action s:mustUnderstand="1">http://tempuri.org/CustomerIISWebService/CustomerIISWebService/ReadResponse</a:Action>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ReadResponse xmlns="http://tempuri.org/CustomerIISWebService/">
<ReadResult>
<Key xmlns="urn:microsoft-dynamics-schemas/page/customer">24;EgAAAAJ7BTEAMAAwADAAMA==6;4354581;15;Ship_to_Address2;52;3gAAAAJ7BTEAMAAwADAAMAAAAAJ7/0wAQQBOAEcARQAgAFIASA==6;4161310;48;3gAAAAJ7BTEAMAAwADAAMAAAAAJ7/00A3ABOAEMASABFAE4=6;4161300;</Key>
<No xmlns="urn:microsoft-dynamics-schemas/page/customer">10000</No>
<Blocked xmlns="urn:microsoft-dynamics-schemas/page/customer">_blank_</Blocked>
<Name xmlns="urn:microsoft-dynamics-schemas/page/customer">Möbel-Meller KG</Name>
<Address xmlns="urn:microsoft-dynamics-schemas/page/customer">Tischlerstr. 4-10</Address>
<Post_Code xmlns="urn:microsoft-dynamics-schemas/page/customer">48436</Post_Code>
<City xmlns="urn:microsoft-dynamics-schemas/page/customer">Düsseldorf</City>
<E_Mail xmlns="urn:microsoft-dynamics-schemas/page/customer">mobel-meller.kg@cronuscorp.net</E_Mail>
<Language_Code xmlns="urn:microsoft-dynamics-schemas/page/customer">DEU</Language_Code>
<Contact xmlns="urn:microsoft-dynamics-schemas/page/customer">Herr Michael Emanuel</Contact>
<Customer_Posting_Group xmlns="urn:microsoft-dynamics-schemas/page/customer">INLAND</Customer_Posting_Group>
<Gen_Bus_Posting_Group xmlns="urn:microsoft-dynamics-schemas/page/customer">NATIONAL</Gen_Bus_Posting_Group>
<VAT_Bus_Posting_Group xmlns="urn:microsoft-dynamics-schemas/page/customer">NATIONAL</VAT_Bus_Posting_Group>
<Responsibility_Center xmlns="urn:microsoft-dynamics-schemas/page/customer">DÜSSELDORF</Responsibility_Center>
<Allow_Line_Disc xmlns="urn:microsoft-dynamics-schemas/page/customer">true</Allow_Line_Disc>
<Invoice_Disc_Code xmlns="urn:microsoft-dynamics-schemas/page/customer">10000</Invoice_Disc_Code>
<Ship_to_Address xmlns="urn:microsoft-dynamics-schemas/page/customer">
<Cust_Ship_to_Address_WS>
<Key>52;3gAAAAJ7BTEAMAAwADAAMAAAAAJ7/0wAQQBOAEcARQAgAFIASA==6;4161310;</Key>
<Customer_No>10000</Customer_No>
<Code>LANGE RH</Code>
<Name>Möbel-Meller KG</Name>
<Address>Lange Reihe 10</Address>
<City>Düsseldorf</City>
<Post_Code>48436</Post_Code>
<Blocked>false</Blocked>
</Cust_Ship_to_Address_WS>
<Cust_Ship_to_Address_WS>
<Key>48;3gAAAAJ7BTEAMAAwADAAMAAAAAJ7/00A3ABOAEMASABFAE4=6;4161300;</Key>
<Customer_No>10000</Customer_No>
<Code>MÜNCHEN</Code>
<Name>Möbel-Meller KG</Name>
<Address>Bergstr. 12</Address>
<City>Düsseldorf</City>
<Post_Code>48436</Post_Code>
<Blocked>false</Blocked>
</Cust_Ship_to_Address_WS>
</Ship_to_Address>
</ReadResult>
</ReadResponse>
</s:Body>
</s:Envelope>
Update Sample
Request
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:cus="http://tempuri.org/CustomerIISWebService/" xmlns:cus1="urn:microsoft-dynamics-schemas/page/customer">
<soap:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Action>http://tempuri.org/CustomerIISWebService/CustomerIISWebService/Update</wsa:Action>
</soap:Header>
<soap:Body>
<cus:Update>
<cus:Customer>
<cus1:Key>Use the key you received from the previos customer.read, to update this excact record!</cus1:Key>
<cus1:Name>New Customer Name</cus1:Name>
<cus1:Name_2>New Customer Name 2</cus1:Name_2>
</cus:Customer>
</cus:Update>
</soap:Body>
</soap:Envelope>
Response
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:Action s:mustUnderstand="1">http://tempuri.org/CustomerIISWebService/CustomerIISWebService/UpdateResponse</a:Action>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<UpdateResponse xmlns="http://tempuri.org/CustomerIISWebService/">
<Customer>
<Key xmlns="urn:microsoft-dynamics-schemas/page/customer">24;EgAAAAJ7BTEAMAAwADAAMA==6;5681331;15;Ship_to_Address2;52;3gAAAAJ7BTEAMAAwADAAMAAAAAJ7/0wAQQBOAEcARQAgAFIASA==6;4161310;48;3gAAAAJ7BTEAMAAwADAAMAAAAAJ7/00A3ABOAEMASABFAE4=6;4161300;</Key>
<No xmlns="urn:microsoft-dynamics-schemas/page/customer">10000</No>
<Blocked xmlns="urn:microsoft-dynamics-schemas/page/customer">_blank_</Blocked>
<Name xmlns="urn:microsoft-dynamics-schemas/page/customer">New Customer Name</Name>
<Name_2 xmlns="urn:microsoft-dynamics-schemas/page/customer">New Customer Name 2</Name_2>
<Address xmlns="urn:microsoft-dynamics-schemas/page/customer">Tischlerstr. 4-10</Address>
<Post_Code xmlns="urn:microsoft-dynamics-schemas/page/customer">48436</Post_Code>
<City xmlns="urn:microsoft-dynamics-schemas/page/customer">Düsseldorf</City>
<E_Mail xmlns="urn:microsoft-dynamics-schemas/page/customer">mobel-meller.kg@cronuscorp.net</E_Mail>
<Language_Code xmlns="urn:microsoft-dynamics-schemas/page/customer">DEU</Language_Code>
<Contact xmlns="urn:microsoft-dynamics-schemas/page/customer">Herr Michael Emanuel</Contact>
<Customer_Posting_Group xmlns="urn:microsoft-dynamics-schemas/page/customer">INLAND</Customer_Posting_Group>
<Gen_Bus_Posting_Group xmlns="urn:microsoft-dynamics-schemas/page/customer">NATIONAL</Gen_Bus_Posting_Group>
<VAT_Bus_Posting_Group xmlns="urn:microsoft-dynamics-schemas/page/customer">NATIONAL</VAT_Bus_Posting_Group>
<Responsibility_Center xmlns="urn:microsoft-dynamics-schemas/page/customer">DÜSSELDORF</Responsibility_Center>
<Ship_to_Address xmlns="urn:microsoft-dynamics-schemas/page/customer">
<Cust_Ship_to_Address_WS>
<Key>52;3gAAAAJ7BTEAMAAwADAAMAAAAAJ7/0wAQQBOAEcARQAgAFIASA==6;4161310;</Key>
<Customer_No>10000</Customer_No>
<Code>LANGE RH</Code>
<Name>Möbel-Meller KG</Name>
<Address>Lange Reihe 10</Address>
<City>Düsseldorf</City>
<Post_Code>48436</Post_Code>
<Blocked>false</Blocked>
</Cust_Ship_to_Address_WS>
<Cust_Ship_to_Address_WS>
<Key>48;3gAAAAJ7BTEAMAAwADAAMAAAAAJ7/00A3ABOAEMASABFAE4=6;4161300;</Key>
<Customer_No>10000</Customer_No>
<Code>MÜNCHEN</Code>
<Name>Möbel-Meller KG</Name>
<Address>Bergstr. 12</Address>
<City>Düsseldorf</City>
<Post_Code>48436</Post_Code>
<Blocked>false</Blocked>
</Cust_Ship_to_Address_WS>
</Ship_to_Address>
</Customer>
</UpdateResponse>
</s:Body>
</s:Envelope>
Field Information
Customer Field Information
| Name | Description | Type | max. Length | Occurance |
|---|---|---|---|---|
| 🔑 No | Specifies the number of the customer. | String | 20 | 1..1 |
| Name | Specifies the customer's name. | String | 50 | 0..1 |
| Name_2 | Specifies the customer's add. name information. | String | 50 | 0..1 |
| Address | Specifies the customer's address. i.E. 'Hauptstraße 12b' | String | 50 | 1..1 |
| Address_2 | Specifies the customer's add. address information. | String | 50 | 1..1 |
| City | Specifies the customer's city. | String | 30 | 1..1 |
| Post_Code | Specifies a code for the post code of the customer's address. Get a list of codes from the Master Data Service | String | 10 | 0..1 |
| Country_Region_Code | Specifies a code for the country/region of the customer's address. Get a list of codes from the Master Data Service | String | 10 | 0..1 |
| Contact | Name of the contact at the customer. | String | 50 | 0..1 |
| Phone_No | Specifies the customer's phone no. | String | 30 | 0..1 |
| Fax_No | Specifies the customer's fax no. | String | 30 | 0..1 |
| Currency_Code | Specifies a default currency code for the customer. Get a list of codes from the Master Data Service | String | 10 | 0..1 |
| Language_Code | Specifies a default language code for the customer. Get a list of codes from the Master Data Service | String | 10 | 0..1 |
| Gen_Bus_Posting_Group | - | String | 10 | 0..1 |
| Customer_Posting_Group | Specifies the VAT product posting group to which this customer belongs. | String | 10 | 0..1 |
| VAT_Bus_Posting_Group | Specifies a VAT business posting group for customers for whom you want the customer price including VAT, as shown in the Unit Price field, to apply. | String | 10 | 0..1 |
| Responsibility_Center | Specifies the code for the responsibility center that will administer this customer by default.. Get a list of codes from the Master Data Service | String | 10 | 0..1 |
| Customer_Price_Group | Specifies the customer price group code, which you can use as a criterion to set up special sales prices. Get a list of codes from the Master Data Service | |||
| Blocked | Specifies whether the customer is blocked. | Boolean | 0..1 | |
| Customer Disc. Group | Specifies the customer discount group code. | String | 10 | 0..1 |
| Allow Line Disc. | Specifies whether line discount is allowed . | Boolean | 0..1 | |
| Invoice Disc. Code | Specifies the invoice discount group code. | String | 10 | 0..1 |
Ship-to Address Field Information
| Name | Description | Type | max. Length | Occurance |
|---|---|---|---|---|
| 🔑 Customer No | Specifies the number of the customer. | String | 20 | 1..1 |
| 🔑 Code | Code of the address. i.e. this can be an incremented string. | String | 10 | 1..1 |
| Name | Specifies the customer's name. | String | 50 | 0..1 |
| Name_2 | Specifies the customer's add. name information. | String | 50 | 0..1 |
| Address | Specifies the customer's address. i.E. 'Hauptstraße 12b' | String | 50 | 1..1 |
| Address_2 | Specifies the customer's add. address information. | String | 50 | 1..1 |
| City | Specifies the customer's city. | String | 30 | 1..1 |
| Post_Code | Specifies a code for the post code of the customer's address. Get a list of codes from the Master Data Service | String | 10 | 0..1 |
| Country_Region_Code | Specifies a code for the country/region of the customer's address. Get a list of codes from the Master Data Service | String | 10 | 0..1 |
| Blocked | Specifies whether the customer is blocked. | Boolean | 0..1 |