Advanced Template Actions (Template Connectors)
A popular Fomo use case is to "send" events from one template to another. Reasons to do this:
Ecommerce store that sells 100+ products, but only want to show sales from ONE product on "buy.mystore.com" landing page
Only want to show "for sale" items on specific page or pages
Multiple business or product lines under 1 Fomo site instance, and need to separate what customers see
With our Template Actions feature, you can achieve exactly this.
If you aren't sure what a Template or Event is, check out this explanation.
Step 1
Create a fresh template via Notifications > Rest API > orange "Add Template" button. This will be your "destination" for copied or moved events (from another Fomo integration/template).
![](http://d33v4339jhl8k0.cloudfront.net/docs/assets/6630e7894c3ddc1d4e7a2400/images/66509c315173914f806c0dec/template_connectors_1.png)
Step 2
Visit the integration containing the data you'd like to "move", e.g. Shopify. This integration connection is the "source" of your data and your template from Step 1 is the new "container" for your . Scroll down and click to open your template, e.g. "Shopify Order." Navigate to the "Actions" tab once inside the template editor.
![](http://d33v4339jhl8k0.cloudfront.net/docs/assets/6630e7894c3ddc1d4e7a2400/images/66509c325173914f806c0ded/template_connectors_2.png)
Step 3
On the Actions tab, select a variable from the "Add a new action" form and set up whatever conditional logic you want.
In the "then/this" section, choose either "change" or "copy", depending on what you want to achieve.
![](http://d33v4339jhl8k0.cloudfront.net/docs/assets/6630e7894c3ddc1d4e7a2400/images/66509c32d593d719515c9a11/template_connectors_3.png)
Step 4
On the right side, choose the template you created in Step 1 and then click "add action" to save your work.
![](http://d33v4339jhl8k0.cloudfront.net/docs/assets/6630e7894c3ddc1d4e7a2400/images/66509c325940934e140f3d6c/template_connectors_4.png)
In the example above, a template rule will change all events with title containing 'backpack' to the template "New Backpack Template."
Step 5
With your templates and data now routing properly, you probably want to set up a Page Rule. A Page Rule gives you full control over which template shows up on a specific page path.
Navigate to Rules in the side menu bar and create a rule such as:
IF URL begins with "/some-landing-page," ONLY show template "New Backpack Template"
IF visitor is on homepage, THEN do not show template "All Orders"
If you need further help setting up this functionality, chat or email us at hello@fomo.com.