How to retrieve a customer filtered by email

Joe
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 = '[email protected]' -->
<Email>foo[email protected]</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
[email protected]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.0
Categories
- 18.1K All Categories
- 6.2K Accounts Hosted
- 5.7K Reckon Accounts (Desktop)
- 10 PaySauce for Reckon Accounts NZ
- 2.9K Reckon One
- 7 Reckon Invoices App
- 946 Reckon Payroll App
- 11 Payroll App - Help Videos
- 13 Reckon Mate App
- 11 Reckon Insights
- 104 Reckon API
- 764 Payroll Premier
- 290 Point of Sale (Desktop)
- 1.8K Personal Plus and Home & Business
- 50 About Reckon Community