GETTING STARTED ADVANCED SEARCH RESULTS AUTOMATION
Automation rules can be set up that work with the advanced search results (via more ID).
The results can be formatted (via tagged text) and emailed to the contacts contrained within the results.
The results must have a primary object context of contactperson eg method=CONTACT_PERSON or a secondary reference to .contactperson field.
The automation process hands the task of the actually sending the email to the message scheduling service, ie as used by the NEWS methods.
Once you have the results, you then need to allow the user to set up the tagged text or select from predefined list of templates (held in documents).
To see a preview of the formatted text then use CORE_MORE_APPLY_TEMPLATE.
In the view-controller layer you need to show the list to available tags. If using the 1blankspace.report.001.js framework - you can use the report definition to display the list of available tags.
Tags must be inserted as [[tag name]].
Once tagged text is OK then use SETUP_AUTOMATION_MANAGE to set the process to run using:
&more=[moreid] &type=2 &scheduletype=9 &schedulemaximumcount=1 &scheduleactionfrom=[email address] &caption=[list of tags as used in the report to send to advanced search originally. Must be in same order as sent originally and | delimited.]
TO TEST WITHOUT VIEW-CONTROLLER LAYER
Run an advanced search in a web browser and note the "moreid" in the return.
eg
var oSearch = new AdvancedSearch(); oSearch.method = 'CONTACT_PERSON_SEARCH'; oSearch.addField('firstname,surname'); oSearch.addFilter('id', 'EQUAL_TO', [your ID]); oSearch.getResults(function(data){alert(data)})
Set up rule:
/ondemand/setup/?method=SETUP_AUTOMATION_MANAGE&more=[moreid]&responseactionfrom=[your email] &caption=firstname|surname&type=2 &templatetext=Hi [[firstname]]&title=TEST%20SEND &schedulemaximumcount=1&status=1
Get rule id:
/ondemand/setup/?method=SETUP_AUTOMATION_SEARCH&type=2
Run rule in test mode:
/ondemand/setup/?method=SETUP_AUTOMATION_RUN&id=[rule id]
|