Docs »

Plugins »

Extension Points »

Bot Action

Name: Bot Action
Identifier (ID): devblocks.event.action


		<extension point="devblocks.event.action">
			<name>Example Bot Action</name>
				<param key="label" value="Example Bot Action"/>
				<param key="events">
						<data key="*"/>


  • label: The human-friendly name for this action shown in the actions menu when building bots.

  • events: The bot events where this action is available. One entry per data key. Wildcards can be used with an asterisk (*), and a single asterisk key adds the action to all events.


class BotAction_Example extends Extension_DevblocksEventAction {
	const ID = '';

	 * Render the behavior action's configuration template.
	public function render(Extension_DevblocksEvent $event, Model_TriggerEvent $trigger, $params=[], $seq=NULL) {
		$tpl = DevblocksPlatform::services()->template();
		$tpl->assign('params', $params);
			$tpl->assign('namePrefix', 'action'.$seq);

	 * Simulate the behavior action.
	public function simulate($token, Model_TriggerEvent $trigger, $params, DevblocksDictionaryDelegate $dict) {
		@$object_placeholder = $params['object_placeholder'] ?: '_placeholder';
		// Run the action in the simulator
		$this->run($token, $trigger, $params, $dict);
		// Return some simulator output
		$out = sprintf(">>> {{%s}}:\n%s\n",
		return $out;

	 * Run the behavior action.
	public function run($token, Model_TriggerEvent $trigger, $params, DevblocksDictionaryDelegate $dict) {
		@$object_placeholder = $params['object_placeholder'] ?: '_placeholder';
		@$content = $params['content'];
		$tpl_builder = DevblocksPlatform::services()->templateBuilder();
		$output = $tpl_builder->build($content, $dict);
		$dict->set($object_placeholder, $output);


Classifier Prediction
Create Attachment
Create Domain va.action.create_domain
Create Opportunity va.action.create_opportunity
Create Reminder
Create Server va.action.create_server
Data Query
Email Parser
Get time elapsed using calendar availability
HTTP Request
Log Call Global Event Action
PGP Encrypt
Package Import
Record Create
Record Delete
Record Retrieve
Record Search
Record Update
Record Upsert
Schedule Proactive Interaction
Service AWS Get Pre-signed URL