Page 1 of 1

findSubscriber always returns 0

Posted: Tue Aug 12, 2008 12:07 pm
by dpommeranz
Hi Guys,

I am very impressed by the functionality of OpenEMM. But I have some problems withe the webservice functionality.

I created custom profile fields like the field "sec_import".
Now I want to delete all subscriber who have the value "xyz" in the field "sec_import" with the following php-code:

Code: Select all

do {
  $subscriberID = $service->findSubscriber('sec_import', 'xyz');
  $service->deleteSubscriber($subscriberID);
} while ($subscriberID > 0);
With a search on the email-address (but only without placeholders) the findSubscriber method returns the right ID. Why does the search on a custom field give me a wrong result?

Best Regards
dpommeranz

Posted: Tue Aug 19, 2008 8:43 am
by maschoff
findSubscriber can not deliver an array of IDs but only a single value, so the value of the search column has to be unique. If more than one recipient holds the same value in the search column the method does not work.

Posted: Tue Feb 16, 2010 9:54 am
by fnagel
I think there is a mistake in the webservice documentation in the method-definition of the findSubscriber method:
"return 0 or customerID of the first match."

As you posted, the method doesn't work if more than one recipient holds the same value?

But is there any other way to get more then one subscriber, e.g. by gender or some other keyColumns with the webservice?