View previous topic :: View next topic |
Author |
Message |
DEdvalson
Joined: 29 Apr 2005 Posts: 25
|
Posted: Thu Nov 09, 2006 3:19 pm Post subject: Problem with License Tracker Sales Import |
|
|
Hi,
I am running License Tracker 3.2.1.0 and am experiencing a problem that I think is new to this release. The problem is that only the first item from each sale is being imported. So if a customer only purchased one thing it imports OK. If they purchased two things, only the first one imports. This has been working in the past, but it seems to have broken at the 3.x release.
In the examples below, the second customer purchased two items. The second item won't import.
Here is my Sales Import definition XML:
<?xml version="1.0" encoding="utf-16"?>
<Importer xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="XmlSalesImporter">
<EmailSubject>Notification for Purchase</EmailSubject>
<DateFormat>
<string>yyyy-MM-ddTHH:mm:ss</string>
</DateFormat>
<DateTag>Date</DateTag>
<PurchaseTag>OrdersByDate</PurchaseTag>
<PurchaseReferenceTag>TransactionId</PurchaseReferenceTag>
<PurchaseDateTag>Date</PurchaseDateTag>
<SalutationTag>Salutation</SalutationTag>
<LastNameTag>LastName</LastNameTag>
<FirstNameTag>FirstName</FirstNameTag>
<CompanyTag>Company</CompanyTag>
<EmailTag>Email</EmailTag>
<PhoneTag>Phone</PhoneTag>
<Street1Tag>Address1</Street1Tag>
<Street2Tag>Address2</Street2Tag>
<StateTag>State</StateTag >
<CityTag>City</CityTag>
<ZipTag>ZIP</ZipTag>
<CountryTag>Country</CountryTag>
<ProductReferenceTag>ProductId</ProductReferenceTag>
<LicenseKeyTag>LicenseCode</LicenseKeyTag>
<LicenseKeyDelimiter>
</LicenseKeyDelimiter>
</Importer>
Here is a sample sales import xml file (with the private info removed):
<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlns:od="urn:schemas-microsoft-com:officedata" generated="2006-11-09T09:36:20">
<OrdersByDate>
<Date>2006-10-01T15:44:43</Date>
<TransactionId>1</TransactionId>
<LastName>Customer</LastName>
<FirstName>Joe</FirstName>
<Address1>Some Street</Address1>
<Address2></Address2>
<City>SomeCity</City>
<Country>USA</Country>
<ZIP>12345</ZIP>
<Email>JoeCustomer@address.com</Email>
<LicenseCode>1234-5678</LicenseCode>
<ProductId>100010001</ProductId>
<Price>29.95</Price>
</OrdersByDate>
<OrdersByDate>
<Date>2006-10-01T16:21:29</Date>
<TransactionId>2</TransactionId>
<LastName>Customer</LastName>
<FirstName>Jane</FirstName>
<Address1>Some Street</Address1>
<Address2></Address2>
<City>SomeCity</City>
<State>TX</State>
<Country>US</Country>
<ZIP>75604</ZIP>
<Email>JaneCustomer@yahoo.com</Email>
<ProductId>100010003</ProductId>
<Price>39.95</Price>
</OrdersByDate>
<OrdersByDate>
<Date>2006-10-01T16:21:29</Date>
<TransactionId>2</TransactionId>
<LastName>Customer</LastName>
<FirstName>Jane</FirstName>
<Address1>Some Street</Address1>
<Address2></Address2>
<City>SomeCity</City>
<State>TX</State>
<Country>US</Country>
<ZIP>75604</ZIP>
<Email>JaneCustomer@yahoo.com</Email>
<LicenseCode>1234-5678</LicenseCode>
<ProductId>100010001</ProductId>
<Price>0</Price>
</OrdersByDate>
</dataroot> |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Nov 09, 2006 9:42 pm Post subject: |
|
|
Are you getting the error message below?
Quote: | String cannot be of zero length |
This is an issue with your import definition - the LicenseKeyDelimiter currently cannot be explicitly defined as blank. If you change this to a non-blank character (say "|") you can then import two of the three purchases. If you need a blank delimiter you can simply delete the LicenseKeyDelimiter line - then the delimiter will default to blank. We will look at changing this in the next release to allow explicitly defined blank delimiters.
The third purchase (the second Jane Customer sale) does not import because it has the same customer email and reference number as the previous purchase. This means that License Tracker will not import it to avoid duplicates. As far as I can tell this logic is unchanged from previous versions. _________________ Infralution Support |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Nov 09, 2006 10:05 pm Post subject: |
|
|
Actually you can explicitly define a blank LicenseKeyDelimiter with the current version by setting the xml:space attribute to preserve eg
Code: | <LicenseKeyDelimiter xml:space="preserve"> </LicenseKeyDelimiter> |
_________________ Infralution Support |
|
Back to top |
|
|
DEdvalson
Joined: 29 Apr 2005 Posts: 25
|
Posted: Fri Nov 10, 2006 2:31 pm Post subject: |
|
|
Hi,
The LicenseKeyDelimiter is not really blank. I think the HTML code of the forum messed it up. What is in there is :
Code: | [ampersand][pound sign]013[semicolon][ampersand][pound sign]010[semicolon] |
Sorry about all the [ampersand] stuff. I don't know how to make the forum display what is really there, it keeps replacing it with the literals.
The problem is with the second Jane Customer item. It is the same email and reference number as you point out, but it is a different product. The customer purchased two items in the same order, but only one of them is importing.
I know this worked in previous versions of this code, I have been using it for a year now and had no import troubles until I installed the 3.x version.
Thanks,
Don |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sun Nov 12, 2006 11:23 pm Post subject: |
|
|
There was a change made in Version 2.2.5 which is I think affecting you. Previously duplicate checking was done based on the Customer Email, Sale Date and Product ID. However this meant that if a customer bought two separate purchase items of the same product in the same transaction (which is possible with some distributors eg PayPay) then the second or third item would not be imported.
The duplicate checking now checks the Customer Email and Sale Reference only. The assumption being that different Sales Transactions should have different references. The other advantage of this is that if you need to make manual adjustments to a sale (eg changing the product) then these changes won't get overwritten if you reimport the transaction.
Ironically the problem we fixed is somewhat similar to the problem you now have. If you have control over the export/import format then the simplest fix would be to not flatten your format and so for each order allow multiple purchase items. So the transaction ID would then be unique for each order eg
Code: | <dataroot xmlns:od="urn:schemas-microsoft-com:officedata" generated="2006-11-09T09:36:20">
<OrdersByDate>
<Date>2006-10-01T15:44:43</Date>
<TransactionId>1</TransactionId>
<LastName>Customer</LastName>
<FirstName>Joe</FirstName>
<Address1>Some Street</Address1>
<Address2 />
<City>SomeCity</City>
<Country>USA</Country>
<ZIP>12345</ZIP>
<Email>JoeCustomer@address.com</Email>
<PurchaseItem>
<LicenseCode>8020-C464-70F2-C698-28EA-3D6B-E230-289B</LicenseCode>
<ProductId>100010001</ProductId>
<Price>29.95</Price>
</PurchaseItem>
</OrdersByDate>
<OrdersByDate>
<Date>2006-10-01T16:21:29</Date>
<TransactionId>2</TransactionId>
<LastName>Customer</LastName>
<FirstName>Jane</FirstName>
<Address1>Some Street</Address1>
<Address2 />
<City>SomeCity</City>
<State>TX</State>
<Country>US</Country>
<ZIP>75604</ZIP>
<Email>JaneCustomer@yahoo.com</Email>
<PurchaseItem>
<ProductId>100010003</ProductId>
<Price>39.95</Price>
</PurchaseItem>
<PurchaseItem>
<LicenseCode>BF92-4EE2-6950-1425-0A1F-A106-3075-F427</LicenseCode>
<ProductId>100010001</ProductId>
<Price>0</Price>
</PurchaseItem>
</OrdersByDate>
</dataroot> |
_________________ Infralution Support |
|
Back to top |
|
|
|