1. States and Actions
  2. Base Actions

States and Actions

Base Actions

Actions that are built into Stubber in the _adam template

Overview

Certain actions are built into Stubber.
These actions are called "base actions" and are defined in the _adam template.

These actions are available on all templates in the Stubber Framework.

These actions are used for base layer functionality that is common to all processes.

Categories

Base actions fall into some of the action categories

Examples

Examples of actions that are defined on the _adam template are:

Action Type Description
_update interface To do a general update comment on a stub
_send_quick_email interface To send an email on a stub
_send_quick_whatsapp interface To send a whatsapp on a stub
_send_quick_sms interface To send an sms on a stub
_send_slack_quick interface To send a slack message on a stub
_rename interface To rename a stub
_add_contact_list interface To add a contact list to a stub
_close stub To close a stub
_create stub Runs automatically when stub is created
_reopen stub To reopen a stub
_morph stub When a stub morphs from one flow to another
_attach stub Attach a file to the stub
_share stub Share access to the stub with an Org contact
_assign_to stub Set the assign to pointer of the stub to an Org contact
_add_link stub Adds a link to the stub
_update_from_email feedback Called when an email is sent to the stub
_update_from_sms feedback Called when a sms is sent to the stub
_update_from_whatsapp feedback Called when a whatsapp is sent to the stub
_update_from_webchat feedback Called when a webchat is sent to the stub
_update_from_chat_assistant_task feedback Called when a chat assistant task has run on the stub
_update_from_assistant_run feedback Called when an assistant run is sent to the stub
_update_from_facebook_messenger feedback Called when a facebook messenger message is sent to the stub
_update_from_stubmation feedback Called when a stubmation update is sent to the stub
_update_from_slack feedback Called when a slack message is sent to the stub
_update_from_teams feedback Called when a teams message is sent to the stub
_update_from_telegram feedback Called when a telegram message is sent to the stub
_update_from_transcribe_task feedback Called when a transcribe task is run on the stub
_status_update_from_whatsapp feedback Called when a whatsapp status update is sent to the stub
_restore_stub_snapshot stub Called to restore a stub to a snapshot
_save_stub_snapshot stub Called to save a stub snapshot
_edit_stub_data stub Called when edit the stub data
_publish stub Called to publish the stub
_flag_conversation stub Called to flag the stub
_morph stub Called when a stub morphs from one flow to another
_log_failed_action feedback Called when a failed action is logged for the stub

Overriding Base Actions

To override or extend the functionality of base actions, you can create a new action with the exact name of the base action you want to override, including the leading underscore.

For example, to override the _update_from_whatsapp action, create a new action called _update_from_whatsapp in your template.

When a new WhatsApp message is sent to a stub, your _update_from_whatsapp action will be ran, and will also run any tasks/notifications/metrics you have added to the action in your template.