# Handle customer information

Source: https://developer.avalara.com/products/ecm/integration-guides/document-management/chi6768214305847/

Guide: Exemption Certificate Management (ECM)

# Handle customer information

Learn how to manage customer information, including customer numbers and contact details, in Avalara products like ECM.

The customer number is a unique identifier for the customer stored in the product you subscribed, such as ECM. If your customer database contains customer identification numbers, we recommend matching the customer numbers across your store and the product you subscribed.

Note

The customer object doesn't accept abbreviations for a state or a country. Make sure to use the full state and country names instead of abbreviations.

Customer numbers should always be passed using the ecommerce SDK whether the customer is new or returning. However, you can decide on how you want to handle other customer information, such as name, address, and contact information. The most common approaches are as follows:

-   Don’t send customer information when you initialize the ecommerce plugin.

    -   New customers are prompted to enter their name, address, and contact information.

    -   Existing customers use the information that you already have on file. If you want to allow customers to edit their information, use the `edit_purchaser` function.

-   Autopopulate customer information (recommended).

    -   If your customer's contact details are already stored in your website, use the example code to populate that customer data.

    -   Sending customer object details for an existing customer doesn’t overwrite the existing customer details. Use the `edit_purchaser` function if you want to allow your customer to update their contact information.

**Code Snippet**

```

GenCert.init(document.getElementById(&quot;form_container&quot;), {
    token: &#39;token generated from your web application server&#39;
});
//Create Customer and assign contact info automatically when loading Ecom SDK
GenCert.setCustomerNumber(&#39;Autopopulate customer data&#39;);
customer=new Object();
customer.name=&#39;Autopopulate customer data&#39;;
customer.address1=&#39;123 Test Street&#39;;
customer.city=&#39;Durham&#39;;
customer.state=&#39;North Carolina&#39;;
customer.country=&#39;United States&#39;;
customer.zip=&#39;27701&#39;;
//Sends Customer info to Ecom SDK
GenCert.setCustomerData(customer);
//Sends Ship-To State
GenCert.setShipZone(&#39;North Carolina&#39;);
 //Opens the Ecom SDK
GenCert.show();
```