Actions

Actions in Thena workflows are the tasks that are performed when a workflow is triggered and its conditions are met. This guide explains how to set up and manage actions effectively.

What are actions?

Actions are the operations that a workflow performs to automate tasks. They can modify tickets, send notifications, update records, or integrate with external systems.

Types of actions

Thena supports several types of actions:

Ticket actions

  • Update ticket: Modify ticket fields, status, priority, etc.
  • Add comment: Add internal or public comments to a ticket.
  • Add tags: Add or remove tags from a ticket.
  • Assign ticket: Assign a ticket to an agent or team.
  • Create ticket: Create a new related ticket.
  • Close ticket: Close a ticket with a specific resolution.
  • Merge tickets: Combine duplicate tickets.

Notification actions

  • Send email: Send an email to specified recipients.
  • Send SMS: Send an SMS message.
  • Send push notification: Send a push notification to mobile devices.
  • Send Slack message: Post a message to a Slack channel.
  • Send MS Teams message: Post a message to a Microsoft Teams channel.

User actions

  • Create user: Create a new user account.
  • Update user: Modify user properties or permissions.
  • Deactivate user: Temporarily disable a user account.
  • Add to group: Add a user to a group.

Data actions

  • Set variable: Set a workflow variable value.
  • Increment counter: Increase a numeric value.
  • Calculate value: Perform a calculation and store the result.
  • Transform data: Convert data from one format to another.

Integration actions

  • API call: Make an HTTP request to an external API.
  • Webhook: Send data to a webhook endpoint.
  • Run script: Execute a custom JavaScript script.
  • Database query: Perform a database operation.

Creating actions

To add actions to your workflow:

  1. Navigate to the Workflows section in your Thena dashboard.
  2. Open the workflow you want to modify.
  3. Click the “Actions” section.
  4. Click “Add Action” to create a new action.
  5. Select the type of action you want to create.
  6. Configure the action settings.
  7. Save your action configuration.

Action configuration

Each action type has specific configuration options:

Basic actions

For basic actions, you can specify:

  1. The target of the action (ticket, user, etc.).
  2. The operation to perform.
  3. The values to set or update.
  4. Any additional options.

Advanced actions

For advanced actions, you can specify:

  1. Custom scripts or API endpoints.
  2. Request parameters and headers.
  3. Authentication details.
  4. Response handling.
  5. Error handling.

Action sequences

You can create sequences of actions that execute in order:

  1. Add multiple actions to your workflow.
  2. Arrange them in the desired execution order.
  3. Configure dependencies between actions.
  4. Set up conditional branching for different action paths.

Action variables

Actions can use variables from various sources:

  • Trigger data: Information from the triggering event.
  • Workflow variables: Values set within the workflow.
  • System variables: Global values like current time or user.
  • Custom variables: User-defined values.

To use variables in an action:

  1. Click the variable picker icon in the action configuration.
  2. Select the variable you want to use.
  3. The variable will be inserted as a placeholder.
  4. At runtime, the placeholder will be replaced with the actual value.

Action templates

Thena provides templates for common actions:

  1. In the action configuration, click “Templates.”
  2. Browse available templates.
  3. Select a template that matches your needs.
  4. Customize the template as needed.
  5. Save your customized action.

Testing actions

Before activating a workflow, you should test its actions:

  1. In the workflow editor, click the “Test” button.
  2. Select the action you want to test.
  3. Provide any necessary test data.
  4. Run the test to verify the action works as expected.
  5. Review the test results.
  6. Make adjustments if needed.

Action examples

Here are some common action examples:

Example 1: Escalate high priority ticket

Update ticket:
  Set priority = "urgent"
  Set group = "escalation"
  Add tag = "escalated"
Send notification:
  To = ticket.assignee.manager
  Subject = "Urgent ticket escalation"
  Body = "Ticket #{ticket.id} has been escalated."

Example 2: Auto-respond after hours

Send email:
  To = ticket.requester.email
  Subject = "We've received your request"
  Body = "Thank you for contacting us. Our team will respond during business hours."
Add internal note:
  Note = "Auto-response sent (after hours)."

Best practices

  • Start with simple actions and build complexity gradually.
  • Use variables to make actions dynamic and reusable.
  • Test actions thoroughly before deploying them.
  • Document complex actions for future reference.
  • Monitor action performance and errors.

Troubleshooting

If an action fails, you can:

  1. Check the workflow execution logs.
  2. Verify that all required data is available.
  3. Test the action independently.
  4. Check for permission issues.
  5. Verify external system availability for integration actions.

Next steps

After setting up your workflow actions, you may want to explore other features of the Thena platform, such as reporting to analyze the effectiveness of your workflows.