An Extension Step allows you to execute a piece of custom code as part of the Flow logic.
You can use the Extension Step to perform logics that are not otherwise obtainable with the standard set of Steps in Agillic. The Extension could, for example, be used to calculate the age of a recipient based on the date of birth or to generate a personalised voucher code for a specific recipient.
This article will highlight good use cases for Extension Steps as well as work with them in a Flow logic.
Find our developers documentation on how to write Extension Steps here.
When Should I Use an Extension Step?
The Extension Step is recipient based. This means that it will perform an action per recipient that goes through the Step. Therefore, it's best suited for use cases where you need to perform one action per recipient, rather than a bulk update of a large number of recipients.
There might be other ways to perform this action, so you should the Extension Step in use cases where you rely on the Flow logic. This could, for example, be to generate a personalised voucher code before an email send out. In this case, you can place the Extension Step before the email Step.
The Extension also allows you to send an API call to an external system and react to the response of that call.
Other Use Cases for Using Extension Steps
- Update a recipient's permission in an external database, if the recipient unsubscribes from an email in Agillic.
- Calculate the number of days to a certain date, to be printed in an email or a portal page.
- Generate a random number for each recipient that you can use in split evaluation.
- Create rows in a One-To-Many table, for example, to be used for storing NPS scores over time.
Attaching the Extension Code to the Step
The code of the Extension lies on the WebDAV of your instance. To insert the Extension as part of the Flow, choose 'Extension Step' when inserting a new Step in the Flow and select the Extension in the dropdown on the Step.
Read more about how to insert an Extension Step in a Flow in this article.