How to retrieve a customer filtered by email
Options
Joe_10453072
Member Posts: 17 ✭
Hello guys
Using API and QBXML, I'd like to retrieve a customer filtered by email. How to do it? Like this:
Or using Name
Using API and QBXML, I'd like to retrieve a customer filtered by email. How to do it? Like this:
<?xml version="1.0"?>
<?qbxml version="6.1"?>
<QBXML>
<QBXMLMsgsRq onError="continueOnError">
<CustomerQueryRq>
<!-- Like: SELECT * FROM Customer WHERE Email = 'foo@eample.com' -->
<Email>foo@example.com</Email>
</CustomerQueryRq>
</QBXMLMsgsRq>
</QBXML>
Or using Name
<?xml version="1.0"?>Thanks
<?qbxml version="6.1"?>
<QBXML>
<QBXMLMsgsRq onError="continueOnError">
<CustomerQueryRq>
<!-- Like: SELECT * FROM Customer WHERE Name = 'Joe' -->
<Name>Joe</Name>
</CustomerQueryRq>
</QBXMLMsgsRq>
</QBXML>
0
Comments
-
Hi Joe,
You can only query by name, but not email.
For name, the XML should be:
<CustomerQueryRq>
<NameFilter>
<MatchCriterion >StartsWith OR Contains OR EndsWith </MatchCriterion>
<Name>Joe</Name>
</NameFilter>
</CustomerQueryRq>
With this approach, you will need to iterate through the response to get the correct one.
If you have the full name, the query should be:
<CustomerQueryRq>
<FullName >STRTYPE</FullName> <!-- You can have more than one FullName node if you want to search by mutiple fullname-->
</CustomerQueryRq>
If you really want to search by email, you should store the customer info (probably ListID, Name and email or any other detail if you don't want to query Reckon again) in an external database. Then you can query by anything you like. But with this approach, you will need to do incremental query/update whenever you connect to Reckon as you don't want to have out of date data in your external db.
Hope it helps.
Thanks,
Phuong
phuong@cactussoftware.com.auPhuong Do / Reckon Developer Partner
phuong@cactussoftware.com.au
0 -
Hi Phuong
Thank you for your reply.
I understood about "StartsWith OR Contains OR EndsWith". Why they didn't provide "equal" or like that...
Just in case, I'll prepare about mapping table between "ListID" and "Email".
Thanks0 -
Hum...
I can specify only one for MatchCriterion. I cannot use specify exact matching with "Name"...
0 -
Yep, it is the limitation. Again, if you want to be able to search by exact name or email, you will need to go through the custom database solution approach.
Phuong Do / Reckon Developer Partner
phuong@cactussoftware.com.au
0
Categories
- All Categories
- 6.4K Accounts Hosted
- 10 📢 Reckon Accounts Hosted - Announcements
- 5.9K Reckon Accounts (Desktop)
- 3 📢 Reckon Accounts Desktop - Announcements
- 1.3K Reckon Payroll 🚀
- 21 📢 Reckon Payroll - Announcements
- 21 Reckon Payroll Help Videos 🎥
- 21 Reckon Mate App
- 3K Reckon One
- 7 📢 Reckon One - Announcements
- 11 Reckon Invoices App
- 14 Reckon Insights
- 107 Reckon API
- 822 Payroll Premier
- 308 Point of Sale
- 1.9K Personal Plus and Home & Business
- 63 About Reckon Community