AddCreditToPanelist

Description

Add one credit to a panelist.

Signature
void AddCreditToPanelist(string key, string panelId, int panelistId, int credit, string comment, DatabaseType databaseType)

Parameters

Name Data Type Description

key

string required

The authentication key

panelId

string required

The panel ID

panelistId

int required

PanelistId for panelist to receive credits

credit

int required

The credit to be added to the panelist. The credit can be a positive or negative integer.

comment

string

Open text field (255 char) to add a comment. Can be null or "".

databaseType

DatabaseType required

Production or Test.

Response

Data Type Description

Example

//***************************************************
//
// Add credit to panelist
//
//***************************************************

// Create instance of the webservice
PanelCreditSoapClient panelCredit = new PanelCreditSoapClient();

// NOTE: Credits will not be available if the respondent has not completed the spesific survey

// AddCreditToPanelist will always add a new row to the panelists transactionlog.
// AddCreditToPanelist cannot be used to add credits linked to a spesific survey

// Example 1: Add a credit row to transactionlog to increase
credit = 100;
comment = "Added 100 credits for joining our panel";
panelCredit.AddCreditToPanelist(key, panelId, panelistId, credit, comment, DatabaseType.Production);
// The panelists balance is now 100

// Example 2: Add a credit row to transactionlog to decrease balance
credit = -50;
comment = "Previous credit should have been 50 not 100. Removed 50 credits from balance";
panelCredit.AddCreditToPanelist(key, panelId, panelistId, credit, comment, DatabaseType.Production);
// The panelists balance is now 50