In this article, you will find:
What are custom triggers?
What is needed in order to build a custom trigger?
How to build a custom trigger
Please note that this feature is open for stores on the Rise Enterprise plan only.
What are the custom triggers?
Custom triggers offers an API based system to Rise’s store credit workflow functionality. With this solution, you will be able to automatically reward your customers with store credit, for any given activity. The possibilities are endless!
What is the difference between a custom trigger and a built-in trigger?
Built-in triggers are defined by Rise pre-built events and integrations.
Custom triggers are activated through an external system or API. To successfully use custom triggers, you will need to build your trigger workflow in Rise, and then connect it to an external system that will activate the Rise workflow when you want it to be triggered.
What is an example of a Custom Trigger?
The options are limitless!
Birthdays
Newsletter sign-ups
Form completion
Win-back campaign
Cart abandonment campaign
Recycling rewards
Visit our template library to help you with a simple and quick setup of a custom trigger campaign using specific systems.
What is needed to build a custom trigger?
System to send requests - your system that will send the HTTP POST requests, activating the custom trigger. The request provides the relevant data to the Trigger, allowing your store credit workflow to be activated from an external source. This kind of external system can be any system that allows POST requests such as Zapier, Klaviyo, HubSpot etc.
Field Key - the name of the data field (such as Customer Email Address)
Field Type - the type of the data field, you can choose one of the following:
Text
Date
True/False
Number
List (comma separated list)
Email
Please note that the email type is required, and cannot be removed from the custom trigger variables. You can add more fields with email type on top of the default one, but they will be categorized as text (and therefore presented within the Rise workflow as text).
Field Path - identifies the field within the body of the payload that is sent to Rise. In case your payload is a flat JSON, the path should be the field name. In case you need to use nested objects, specify the object path: ‘Object1.object2.field_name’.
An example of a ‘flat’ JSON payload:{
"first_name": "Dana",
"last_name": "Rise",
"email": "[email protected]"
}
The field path for the customer email key will be ‘email’.
An example of a JSON payload with nested objects:
{
"first_name": "Dana",
"last_name": "Rise",
"email": "[email protected]",
"address": {
"street": {
"name": “Prince”,
"number": 23
}
"state": {
"name": “New York”,
"city": “New York City”
}
}
}
The field path for the street number key will be ‘street.number’
URL (this is auto-generated for you by Rise) - this is the address you’ll be sending the information to. In our case, it’s called webhook URL and it is a dedicated URL for each custom trigger you set.
It is required for there to be a Header with Key: 'Content-Type' and Value: 'application/json', like so:
How to build a custom trigger
To begin, on your Rise dashboard click on the Workflows tab -> Create workflow -> “Create your own”:
Under “Select Triggers” choose “Customer Triggers”:
Copy the webhook URL:
The next step is connecting this trigger to your external system by setting the Rise webhook URL you copied, as your destination URL within your chosen external system that sends the request.
On your external system webhook flow, you should have a place to provide the destination URL - paste the URL you copied from Rise.
Once you’re done, go back to your Rise Dashboard and click “Finish”.
On the next pop-up, name your custom trigger and set up the variables. Each variable needs to be defined with a Key, Type and Path.
These variables need to match the data that is forwarded to Rise through the requests your system sends.
Please note that customer_email is required in order for our system to be able to issue store credit and send it to your customer. Without the email variable, the workflow won’t issue store credit rewards, and therefore, this variable can’t be deleted.
At this stage you’ll be altering between your external system and Rise, to match between the field names within your JSON payload, to the variables in Rise.
Example JSON payload:
{
"first_name": "Dana",
"last_name": "Rise",
"email": "[email protected]",
"address": {
"street": {
"name": “Prince”,
"number": 23
}
}
}
Rise variables:
Field Key(Name) | Field Type | Field Path |
First Name | Text | first_name |
Last Name | Text | last_name |
Email Address | ||
Street Name | Text | address.street.name |
Street Number | Number | address.street.number |
Once you’re done, click “Create trigger”.
Congrats! You’ve set your first custom trigger! To finish your workflow setup, add conditions and actions as desired. Additional information about available conditions and actions can be found here.
Please note that after finishing setting up of the trigger, any existing fields in the setup can’t be edited / removed.
To edit your trigger you will need first to delete it and create a new one. To delete the trigger you will need to first remove it from any existing workflow.
After finishing setting up your workflow, you can test your custom trigger and workflow action.
Lastly, to activate the custom trigger workflow turn on the workflow by switching the toggle on the top right to “On”:
Click Save. Your Custom Trigger Workflow is now ready to run! Make sure your external system is set up with desired rules to send the requests to this workflow whenever you want.