Develop and Test Script Filters
You can test scripts as you development them by using the filter results API and passing it a social contact id. Doing this will run the filter on the social contact and return the results in XML, along with the output of any logs or exceptions output by the script.
Note | Errors can result if an editor such as Notepad is used to edit a script written in a language containing multi-byte characters. Eclipse and Notepad++ are the most reliable editors to use for editing scripts. |
The procedure to test script filters during development is as follows:
Procedure
Step 1 | Run a Campaign results GET to obtain a social contact link. Each <entry> has a <link rel="socialcontact" href="socialcontactRefURL">. |
Step 2 | Run a Filters Get List to obtain the refURL of the script filter you want to test. |
Step 3 | Run a Filter Results GET and add the refURL of the social contact as a parameter. Example:https://<ServerIP>:<Port>/ccp-webapp/ccp/filter/ 103105/results?socialContact= https://<ServerIP>:<Port>/ccp-webapp/ccp/socialcontact/ AB1C35141000013200000F450A568DD2. |
Step 4 | Enter that URL in the address bar of a browser to view the XML filter result. Example:The < logBuffer> is all the output from the script, including logging and exceptions.
|