Create a customer

The following XML example uses an eConnect XML document to create a customer. Note the following characteristics of the document:

  • The document contains a single <RMCustomerMasterType> transaction type schema. The schema specifies the XML nodes you use to create a customer.
  • You use the <taUpdateCreateCustomerRcd> node to describe the customer record.
  • Notice how the elements of the <taUpdateCreateCustomerRcd> node are populated with values that identify the new customer.
<eConnect xmlns:dt="urn:schemas-microsoft-com:datatypes">
    <RMCustomerMasterType>
        <eConnectProcessInfo>
        </eConnectProcessInfo>
        <taUpdateCreateCustomerRcd>
            <CUSTNMBR>JEFF0002</CUSTNMBR>
            <CUSTNAME>JL Lawn Care Service</CUSTNAME>
            <STMTNAME>JL Lawn Care Service</STMTNAME>
            <SHRTNAME>JL Lawn Care</SHRTNAME>
            <ADRSCODE>PRIMARY</ADRSCODE>
            <ADDRESS1>123 Main Street</ADDRESS1>
            <CITY>Valley City</CITY>
            <STATE>ND</STATE>
            <ZIPCODE>58072</ZIPCODE>
            <COUNTRY>USA</COUNTRY>
            <PHNUMBR1>55532336790000</PHNUMBR1>
            <PHNUMBR2>55551161817181</PHNUMBR2>
            <FAX>55584881000000</FAX>
            <UPSZONE>red</UPSZONE>
            <SHIPMTHD>PICKUP</SHIPMTHD>
            <TAXSCHID>USALLEXMPT-0</TAXSCHID>
            <PRBTADCD>PRIMARY</PRBTADCD>
            <PRSTADCD>PRIMARY</PRSTADCD>
            <STADDRCD>PRIMARY</STADDRCD>
            <SLPRSNID>GREG E.</SLPRSNID>
            <SALSTERR>TERRITORY 6</SALSTERR>
            <COMMENT1>comment1</COMMENT1>
            <COMMENT2>comment2</COMMENT2>
            <PYMTRMID>Net 30</PYMTRMID>
            <CHEKBKID>PAYROLL</CHEKBKID>
            <KPCALHST>0</KPCALHST>
            <RMCSHACTNUMST>000-1100-00</RMCSHACTNUMST>
            <UseCustomerClass>0</UseCustomerClass>
            <UpdateIfExists>1</UpdateIfExists>
        </taUpdateCreateCustomerRcd>
    </RMCustomerMasterType>
</eConnect>