Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 10 of 10

Thread: Importing Customers

  1. #1
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default Importing Customers

    I am finally finished importing products/categories. Shew!

    Now I am going to start bringing in customers. The online documentation states

    Adding Customers

    You can pass the same <Customer> element back into the WSI with Action="Add" to add new customers to the database. All the same fields supported. For the Password field, pass it in as clear text on an "Add", we will Salt+Hash it for you.
    ok so if I do that and all customers go in ok. Obviously between now and the time I go live with ASPDNSF I will have new customers in my old cart. Could I rerun the entire list of customers and would it automagically know to update/insert where needed or would it duplicate all my customers I already imported.

    I could possibly just add in the new customers from my old site as I have the date when they registered, but if would be possible that some customers previously loaded into ASPDNSF could have changed their address info.

    Thanks

  2. #2
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    The best thing to do in this situation would be to generate the customer statements with action="Update" for all those customers registering on or before the date you have, and then use action="Add" for all of the new customers. While WSI is extremely flexible, it is also very exact and will only perform what you tell it. If you try and add a customer that already exists, it will tell you so and won't make any changes to that customer account.
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>

  3. #3
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    Ok, so when I add a customer there are fields for setting which address is shipping and which is for billing (BillingAddressID, ShippingAddressID)

    How do I set these when I dont know what they are yet? The address get added a little later on in the customer structure.

    Seems the Address elements should have a <AddressType>Shipping|Billing</AddressType).


    Code:
    	<Customer Action="Add|Update|Delete|Nuke|Lookup" GUID="uniqueidentifier" ID="integer" EMail="string">
          <CustomerLevelID>integer, make sure you know what you are doing if you explicitly set this</CustomerLevelID>
          <RegisterDate>datetime, make sure you know what you are doing if you explicitly set this</RegisterDate>
          <EMail>string</EMail>
          <FirstName>string</FirstName>
          <LastName>string</LastName>
          <Phone>string</Phone>
          <OkToEMail>boolean</OkToEMail>
          <IsAdmin>integer, 0=normal user, 1=admin user, 3=superadmin user</IsAdmin>
          <LocaleSetting>string, must be a valid storefront locale!</LocaleSetting>
          <MicroPayBalance>decimal</MicroPayBalance>
          <RecurringShippingMethodID>integer</RecurringShippingMethodID>
          <BillingAddress ID="integer" GUID="uniqueidentifier"/>
          <ShippingAddress ID="integer" GUID="uniqueidentifier"/>
          <GiftRegistryGUID>uniqueidentifier, make sure you know what you are doing if you explicitly set this</GiftRegistryGUID>
          <GiftRegistryIsAnonymous>boolean</GiftRegistryIsAnonymous>
          <GiftRegistryAllowSearchByOthers>boolean</GiftRegistryAllowSearchByOthers>
          <GiftRegistryHideShippingAddresses>boolean</GiftRegistryHideShippingAddresses>
          <CODCompanyCheckAllowed>boolean</CODCompanyCheckAllowed>
          <CODNet30Allowed>boolean</CODNet30Allowed>
          <Over13Checked>boolean</Over13Checked>
          <StoreCCInDB>boolean</StoreCCInDB>
          <AdminCanViewCC>boolean, make sure you know what you are doing if you explicitly set this</AdminCanViewCC>
          <IsRegistered>boolean, make sure you know what you are doing if you explicitly set this</IsRegistered>
          <LockedUntil>datetime or "null", set this only with extreme care</LockedUntil>
          <BadLoginCount>integer, set this only with extreme care</BadLoginCount>
          <PwdChangeRequired>boolean, set this only with extreme care</PwdChangeRequired>
          <Active>boolean, make sure you know what you are doing if you explicitly set this</Active>
          <VATSetting>integer, make sure you know what you are doing if you explicitly set this</VATSetting>
          <VATRegistrationID>string</VATRegistrationID>
    	  <Notes>string</Notes>
    	  <ExtensionData>string</ExtensionData>
    	  <Addresses AutoCleanup="true|false, make sure you know what you are doing if you explicitly set this flag, as recurring orders could be adversly affected!!!!">
    		  <Address Action="Add|Update|Delete|Nuke|Lookup" GUID="uniqueidentifier" ID="integer">
            	<NickName>string</NickName>
            	<FirstName>string</FirstName>
    	        <LastName>string</LastName>
        	    <Company>string</Company>
            	<Address1>string</Address1>
    	        <Address2>string</Address2>
        	    <Suite>string</Suite>
            	<City>string</City>
    	        <State>string</State>
        	    <Zip>string</Zip>
            	<Country>string</Country>
    	        <ResidenceType>integer</ResidenceType>
        	    <Phone>string</Phone>
            	<Email>string</Email>
    		    <ExtensionData>string</ExtensionData>
    	      </Address>
    		  <Address Action="Add|Update|Delete|Nuke|Lookup" GUID="uniqueidentifier" ID="integer">
            	<NickName>string</NickName>
    	        <FirstName>string</FirstName>
        	    <LastName>string</LastName>
            	<Company>string</Company>
    	        <Address1>string</Address1>
        	    <Address2>string</Address2>
            	<Suite>string</Suite>
    	        <City>string</City>
        	    <State>string</State>
            	<Zip>string</Zip>
    	        <Country>string</Country>
        	    <ResidenceType>integer</ResidenceType>
            	<Phone>string</Phone>
    	        <Email>string</Email>
    		    <ExtensionData>string</ExtensionData>
        	  </Address>
    		  <Address Action="Add|Update|Delete|Nuke|Lookup" GUID="uniqueidentifier" ID="integer">
            	<NickName>string</NickName>
            	<FirstName>string</FirstName>
    	        <LastName>string</LastName>
        	    <Company>string</Company>
            	<Address1>string</Address1>
    	        <Address2>string</Address2>
        	    <Suite>string</Suite>
            	<City>string</City>
    		    <State>string</State>
            	<Zip>string</Zip>
    	        <Country>string</Country>
        	    <ResidenceType>integer</ResidenceType>
    	        <Phone>string</Phone>
        	    <Email>string</Email>
    		    <ExtensionData>string</ExtensionData>
    	      </Address>
    		</Addresses>
        </Customer>

  4. #4
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    Im still stuck on this ... how can I assign a ship/bill address to the customer when creating the address's at the time im creating the customer?

  5. #5
    skebrown is offline Junior Member
    Join Date
    May 2009
    Posts
    11

    Default

    Agreed... I also wish to know the answer to the exact same question. I have an open ticket for this, but am still waiting for the reply to my question.

  6. #6
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    skebrown ... if you get a response can you please post here? Im at a dead end here and cant fully go live until I get this part complete. Im sooo close too.

  7. #7
    allstar is offline Member
    Join Date
    Apr 2009
    Posts
    90

    Default

    Hey fellas, I also researched into this. Apparently it can't be done in one pass, however, it is possible to do it in two pass.

    Please see my thread at: http://forums.aspdotnetstorefront.co...hlight=address

    I'm also in the stages in importing users. I'm trying to figure out the easiest way of doing this... Perhaps, you can fill me in on how you're handling this.

    Maybe, a sql loop to grab all the users + data and go into a loop to add the users to the store through the wsi calls?
    ...AllStar

  8. #8
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    Allstar, thank you thank you thank you! Your thread pointed me in the right direction.

    I use a java app to grab all my customers and created the xml for WSI. In my java app I added code to generate the GUID and used that as per Georges instructions in your thread and it worked perfectly.

    Again, many many thanks!

  9. #9
    skebrown is offline Junior Member
    Join Date
    May 2009
    Posts
    11

    Default

    Yes... that thread was the answer for me as well. Thank you.

  10. #10
    Rob is offline Senior Member
    Join Date
    Aug 2004
    Posts
    3,037

    Default

    we are looking into this to make it 1-pass possible for future WSI versions. thx.
    AspDotNetStorefront
    Shopping Cart