Workflows
Last updated
Was this helpful?
Last updated
Was this helpful?
A powerful feature of Bunny is workflows, which let you customize many aspects of how Bunny operates. Bunny comes pre-configured with a number of workflows that model best practices in various functional areas, such a dunning.
You can also create your own workflows that help you further automate your revenue operations. Examples of workflows are:
Notify #sales channel in Slack when a deal closes
Push new contacts to a mailing list in Mailchimp
Automatically assign an account's invoice template based on country
Notify account managers by email when their accounts are up for renewal
Let's get into the details.
Workflows have three main components to them.
The object driving the workflow and its schedule
Conditions
Actions
The following sections go into detail about each of them.
When you are building new workflows, you want to minimize the side effects new or incomplete workflows can have on other users' work. For example, you can disable a workflow completely or isolate it to just your user, so no one else is effected until it is working properly.
Some customers like to build out new business logic in a Bunny sandbox and copy over the business logic when it has been thoroughly tested. This is where the YAML tab can be very useful.
The YAML tab allows you to copy and paste workflow recipes between workflows and Bunny instances. If you are feeling adventurous, you can even write all your workflows by hand.
Workflows can be defined for the following objects:
Account
Contact
Coupon
Deal
Event
Feature
Lead
Invoice
Payment
Payment method
Plan
Quote
Subscription
Tenant
Tenant provisioning changes
User
There are two different types of workflows: triggers and jobs. A trigger is run whenever an object is created or updated and affects just that object. A job is run periodically and affects all the objects that are selected by its conditions.
Triggers are workflows that run when an object is created or updated. For example, the trigger workflow below runs every time a new account is created.
Jobs are workflows that run at periodic intervals, either hourly or daily. Bunny makes no guarantees about when in those intervals a job will run, only that it will run once.
Whereas a trigger affects only one object every time it runs, a job affects all the objects that meet its conditions.
The job above will run daily and perform its actions on all accounts of type Customer that have over 1,000 employees.
Jobs and triggers have roughly the same conditions available to them with the exception that jobs don't have the concept of a current user. When a user updates an account and a workflow is triggered by that event, Bunny knows that this is the current user and can do things with it in conditions and actions.
For any object that is affected by a workflow, Bunny will carry out the actions that are part of the workflow.
Condition
Executes a set of actions if a condition is met
Set attribute
Sets the value of an attribute
Send email
Sends an email
Webhook
Calls a webhook