BigCommerce - Hosted Ecommerce Software by Interspire

Interspire Forum

 
Go Back   Interspire Forum > Interspire Email Marketer Community Forum > Customization and Integration

Reply
 
Thread Tools Display Modes
  #1  
Old 02-21-2008, 07:42 PM
kemhof kemhof is offline
Junior Member
 
Join Date: Jan 2008
Posts: 3
Default Custom Field Query

Hello,

I'm tryign to write a plugin for a 3rd party web app. The intent of this plugin - is take all the mailing lists - and select all the e-mails/suscribers that match a certain custom field.

After pouring through the DB structure - reading the API - I'm no thoroughly confused as to where Send Studio stores the customfield information.

Example:

Email@domain.com | Customfield1 | Customfield2 | List1
email@random.com | Customfield3 | customField2 | list6

I'd like to sort out all the e-mails that match | customfield2 |. But i have no clue where to look. I've found the CustomField ID, List ID, suscriber ID, but i've looked (and i'm feeling cross-eyed) and can't seem to find where the system stores the customfield information per suscriber.

Any help is appreciated.
Reply With Quote
  #2  
Old 02-21-2008, 11:29 PM
Chris S Chris S is offline
Senior Member
 
Join Date: Feb 2004
Posts: 4,642
Default

Hi,

Custom field data is stored in the subscribers_data table (it should probably be 'list_subscribers_data' to match it up with 'list_subscribers' but I'm not going to change it now).

Though you don't need to use the database, you can use the api.

See api/subscribers.php, function GetSubscribers.

Here's an example:
PHP Code:
        $sub_api = new Subscribers_API();
        
$input = array(
            
'List' => 1,
            
'Email' => 'email@address',
        );
        
$result $sub_api->GetSubscribers($input, array(), true); 
That only returns the number of subscribers that meet that criteria, not their actual details.


If you want to include custom field criteria when searching, do something like this:

PHP Code:
        $sub_api = new Subscribers_API();
        
$input = array(
            
'List' => 1,
            
'CustomFields' => array (
                
'1' => 'Chris',
            ),
        );
        
$result $sub_api->GetSubscribers($input, array(), true); 
That will search for anyone having 'Chris' in custom field id 1 (in this case it's a "Name" custom field).

Quote:
Originally Posted by kemhof
Hello,

I'm tryign to write a plugin for a 3rd party web app. The intent of this plugin - is take all the mailing lists - and select all the e-mails/suscribers that match a certain custom field.

After pouring through the DB structure - reading the API - I'm no thoroughly confused as to where Send Studio stores the customfield information.

Example:

Email@domain.com | Customfield1 | Customfield2 | List1
email@random.com | Customfield3 | customField2 | list6

I'd like to sort out all the e-mails that match | customfield2 |. But i have no clue where to look. I've found the CustomField ID, List ID, suscriber ID, but i've looked (and i'm feeling cross-eyed) and can't seem to find where the system stores the customfield information per suscriber.

Any help is appreciated.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump