User Tools

Site Tools


webapi:examples:customers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
webapi:examples:customers [2020/02/10 10:27 (4 years ago)] – [Sample Customer JSON] kevinwebapi:examples:customers [2020/04/21 17:26 (4 years ago)] (current) kevin
Line 4: Line 4:
  
 <note> <note>
-If you were to update an address using /update_Retail_Customer of the source Billing or Shipping customer.  Re-printing a  past order will have the address updated when printed at that new point in time.  In our clients retail business, this is typically not a challenge as the order is shipped and dealt with well before a future address change takes place.  With business to consumer website workflow, multiple orders with different ship to locations could be imported in close succession and pose a problem.+If you were to update an address using /update_Retail_Customer of the source Billing or Shipping customer.  Re-printing a  past order will have the address updated when printed at that new point in time.  In our clients retail business, this is typically not a challenge as the order is shipped and dealt with well before a future address change takes place.  With business to consumer website workflow, multiple orders with different ship to locations could be imported in close succession and pose a problem.
 </note> </note>
  
-If you require workflow to support **different billing and shipping addresses**.  Then you would need to create customers with the same name with different address and associate them to the sales orders being created.  Best practice to avoid creating duplicate names and addresses would be to parse the customer lists to see if the customer already exists.+If you require workflow to support **different billing and shipping addresses**.  Then you would need to create customers with the same name with different address and associate them to the sales orders being created.  Best practice to avoid creating duplicate names and addresses would be to parse the customer lists to see if the customer already exists.
   * Sample call requesting the first 1000 customers with limited fields such as names, address, phone and email to create a smaller payload:   * Sample call requesting the first 1000 customers with limited fields such as names, address, phone and email to create a smaller payload:
   * http://127.0.0.1:8080/Windward/WebAPI/Customer/Customers/0?Fields=Unique%2CName%2CAddr1%2CAddr2%2CCity%2CPostal%2CState%2CCountry%2CPhone1%2CEmail&PageSize=1000   * http://127.0.0.1:8080/Windward/WebAPI/Customer/Customers/0?Fields=Unique%2CName%2CAddr1%2CAddr2%2CCity%2CPostal%2CState%2CCountry%2CPhone1%2CEmail&PageSize=1000
Line 122: Line 122:
 } }
 </code> </code>
 +
 +===== Customer Contacts =====
 +The /addCustomer method supports Contacts as part of the data payload.  The Contact Object has to be filled in to generate. Populating the First Name and Last Name alone do not constitute a Contact record and will not create the a Contact. This is to allow for usage that doesn't want Contact records to be created just because the Name is provided as FirstName / LastName. Those fields are part of the Customer JSON to support the variations of First, Last / Last, First as the business name, not to auto-generate Contact records.
 +
 +The Swagger Documentation provides the developer with the map of the Contact Object which when completed will create contacts.
 +
 +<code>
 +      "Contacts": [
 +        {​
 +          "ContactId": 0,​
 +          "FirstName": "string",
 +          "LastName": "string",
 +          "City": "string",
 +          "Country": "string",
 +          "State": "string",
 +          "Postal": "string",
 +          "Phone1": "string",
 +          "Phone2": "string",
 +          "Email": "string",
 +          "Address1": "string",
 +          "Address2": "string"
 +        }​
 +</code>
 +
  
 Continue on to [[webapi:examples:invoice|Adding an Invoice]] or back to [[:webapi_swagger_documentation#samples|Swagger Samples]] Continue on to [[webapi:examples:invoice|Adding an Invoice]] or back to [[:webapi_swagger_documentation#samples|Swagger Samples]]
webapi/examples/customers.1581359231.txt.gz · Last modified: 2020/02/10 10:27 (4 years ago) by kevin