|
Infralution Support Support groups for Infralution products
|
View previous topic :: View next topic |
Author |
Message |
Guest
|
Posted: Wed Apr 26, 2006 4:34 pm Post subject: License Tracker: Sales Import |
|
|
I'm trying to import Sales data from PayPal into the License Tracker.
I'm not clear on what fields need to be defined in the Distributor Sales Import XML field.
Any guidance? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Apr 26, 2006 11:29 pm Post subject: |
|
|
This XML text tells License Tracker how to import the data. It describes the mapping from fields in your external data to License Tracker database fields. The exact contents depends on whether your data is XML or CSV format. Below is the definition used to import XML data from ShareIt:
Code: |
<?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>
<PurchaseTag>Purchase</PurchaseTag>
<PurchaseReferenceTag>PurchaseId</PurchaseReferenceTag>
<PurchaseDateTag>PurchaseDate</PurchaseDateTag>
<CustomerTag>CustomerData/BillingContact</CustomerTag>
<SalutationTag>Salutation</SalutationTag>
<LastNameTag>LastName</LastNameTag>
<FirstNameTag>FirstName</FirstNameTag>
<CompanyTag>Company</CompanyTag>
<EmailTag>Email</EmailTag>
<PhoneTag>Phone</PhoneTag>
<FaxTag>Fax</FaxTag>
<AddressTag>Address</AddressTag>
<Street1Tag>Street1</Street1Tag>
<Street2Tag>Street2</Street2Tag>
<StateTag />
<CityTag>City</CityTag>
<ZipTag>PostalCode</ZipTag>
<CountryTag>Country</CountryTag>
<PurchaseItemTag>PurchaseItem</PurchaseItemTag>
<ProductReferenceTag>ProductId</ProductReferenceTag>
<QuantityTag>Quantity</QuantityTag>
<LicenseKeyTag>PurchaseItemKey/Key</LicenseKeyTag>
<LicenseKeyDelimiter>
</LicenseKeyDelimiter>
</Importer>
|
The DateFormat field defines the date formats used in the data (License Tracker will attempt to convert Dates using these in the order listed). The other fields define the XML tag in the data you are importing.
If you could post an example data file and we will give you some more concrete guidance. _________________ Infralution Support |
|
Back to top |
|
|
Guest
|
Posted: Thu Apr 27, 2006 12:17 am Post subject: |
|
|
Here is a sample CSV file. The forums insist on wrapping, but in reality this is only two lines (the second line begins at "4/24/2006". Note the trailing "," on each line. Also note that the "Name" is not split into first and last. I can split the name into First/Last if necessary but the output will change slightly (because it will then be processed by Excel and output in CSV which is slightly different than this CSV directly from PayPal).
Quote: |
Date, Time, Time Zone, Name, Type, Status, Currency, Gross, Fee, Net, From Email Address, To Email Address, Transaction ID, Counterparty Status, Address Status, Item Title, Item ID, Shipping and Handling Amount, Insurance Amount, Sales Tax, Option 1 Name, Option 1 Value, Option 2 Name, Option 2 Value, Auction Site, Buyer ID, Item URL, Closing Date, Reference Txn ID, Invoice Number, Custom Number, Quantity, Receipt ID, Address Line 1, Address Line 2/District, Town/City, State/Province/Region/County/Territory/Prefecture/Republic, Zip/Postal Code, Country, Contact Phone Number,
"4/24/2006","17:16:22","CDT","John Doe","Web Accept Payment Received","Completed","USD","45.00","-3.25","41.75","John.Doe@customerinternet.com","vendor@vendorinternet.com","9X999999XX9999999","Non-U.S. - Unverified","Non-U.S.","Vendor String Indicating Product but not identical to Product Name in License Tracker","","0.00","","0.00","","","","","","","","","","","","1","","123 Street Avenue","","Townville","County on the River","XX1 1XX","United Kingdom","",
|
|
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Apr 27, 2006 7:05 am Post subject: |
|
|
Below is an XML definition that will import this CSV file. Note that the spaces in CSV header tags have been replaced with _x0020_ because License Tracker converts the CSV to XML before reading it - and XML tags can't contain spaces. Also note that your CSV doesn't contain any license keys so this will only create the sale entry - not assign any keys. The LicenseKeyTag currently cannot be null - so we've just given it an arbitrary value.
For the import to work you need to set the Product References for your distributor to match the values in the Item Title field.
Code: |
<?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="CsvSalesImporter">
<DateFormat>
<string>M/dd/yyyy</string>
</DateFormat>
<PurchaseTag>row</PurchaseTag>
<PurchaseReferenceTag>_x0020_Transaction_x0020_ID</PurchaseReferenceTag>
<PurchaseDateTag>Date</PurchaseDateTag>
<LastNameTag>_x0020_Name</LastNameTag>
<FirstNameTag></FirstNameTag>
<CompanyTag></CompanyTag>
<EmailTag>_x0020_From_x0020_Email_x0020_Address</EmailTag>
<PhoneTag>_x0020_Contact_x0020_Phone_x0020_Number</PhoneTag>
<FaxTag></FaxTag>
<Street1Tag>_x0020_Address_x0020_Line_x0020_1</Street1Tag>
<Street2Tag>_x0020_Address_x0020_Line_x0020_2/District</Street2Tag>
<StateTag>_x0020_State/Province/Region/County/Territory/Prefecture/Republic</StateTag>
<CityTag>_x0020_Town/City</CityTag>
<ZipTag>_x0020_Zip/Postal_x0020_Code</ZipTag>
<CountryTag>_x0020_Country</CountryTag>
<ProductReferenceTag>_x0020_Item_x0020_Title</ProductReferenceTag>
<QuantityTag>_x0020_Quantity</QuantityTag>
<LicenseKeyTag>License</LicenseKeyTag>
<LicenseKeyDelimiter>\n</LicenseKeyDelimiter>
</Importer>
|
_________________ Infralution Support |
|
Back to top |
|
|
Guest
|
Posted: Thu Apr 27, 2006 1:29 pm Post subject: |
|
|
Thanks! This helped a lot. It took me a little bit to realize even after you wrote it, that I had to change the "Product Reference" field on the Distributors screen (because I didn't know that was separate from "Product" in the first column).
And I had to change my Custom Generator to check for empty first name or last name.
This seems to work well for importing customers and sales. You're right that the import file does not contain license keys because I need to generate them locally.
I'm using License Tracker 2.2.1.0
Now I need to generate the key for each sale, but I can't figure out how to call the license generator where my Custom Generator is called with a non-null "customer" parameter. How can I do this?
I've tried selecting the Customer then clicking the "Generate Keys" icon on the top bar, and I've tried selecting the Sale then clicking "Generate Keys". Neither appears to populate the "customer" parameter when the Custom Generator is called (in both cases, "customer" is null).
For each product, I have "Generate Keys on Sale" NOT checked. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Apr 27, 2006 10:07 pm Post subject: |
|
|
To include customer information you need to tick the "Generate Keys on Sale" option for the product. Then if create a sale (or edit/open a sale that you've imported) you will see that there is a generate keys button on the Sale dialog. When you click this information about the Sale and customer is passed to your custom generator. _________________ Infralution Support |
|
Back to top |
|
|
Guest
|
Posted: Fri Apr 28, 2006 12:57 am Post subject: |
|
|
Thanks. That seems to work.
I like that the License Tracker can generate an email, but unfortunately I don't use Outlook. Besides "Copy to Clipboard", is there any way to export License Keys (or customers, for that matter).
What I'd really like is a way to generate an text file email using a template. Alternatively, you could allow an "Export" command to a method that would supply customer, sale, and key data similar to the CustomGenerator that you already have. Ideally, you would allow multiple Export commands that can be selected at run time by the user.
And of course doing this one by one is kind of a pain.
It would be really nice to be able to select multiple sales ("all new sales") and generate keys then exporting (without additional clicks) would be a GREAT addition. This would (could?) generate a folder full of text files that I can then plug into my email system (or write a SMTP driver for).
Thanks for your help so far. If you have any advice for accomplishing any of the above with the current version of License Tracker, I'd love to hear it. If not, please consider this a feature request.
I think I've got the current version at least importing PayPal and able to generate keys (one at a time). Features to make creating a large number of keys (and the corresponding email notifications) simultaneously would be great additions.
Thoughts? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Apr 28, 2006 8:38 am Post subject: |
|
|
Anonymous wrote: |
Thanks for your help so far. If you have any advice for accomplishing any of the above with the current version of License Tracker, I'd love to hear it. If not, please consider this a feature request.
|
One option would be to purchase the License Tracker source code - this would allow you to make whatever modifications you require. I can't see any other way with the current release to do what you want.
We could certainly look at providing an export function which exports the selected items (customers/sales/licensekeys etc) to an XML file. In addition we could add a customizable link function that would allow you to export the selected items and run a specified external program passing it the file.
The other function you request would probably need a menu item that generated custom keys for selected sales. We will add that to our feature request list. _________________ Infralution Support |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|