Creating and publishing
Learn how to create a function and publish it on your store.
There are two parts to setting up a function on your store:
- Creating the function: There are different conditions required for each function. You can find specific function setup instructions in the Templates or Functions section of the Help Center. 
- Publishing a widget on your storefront: This is important if you want customers to know about the function, like in the case of discounts, sales, or free shipping promos. 
In this section:
Step 1: Creating a function
Steps:
- From the FJ Functions & Script Editor, click Create a function. 
- Under Create campaign, click Start from scratch. 
- Beside the function type you want to create, click Continue. 
- Input your function details as per the steps. Refer to the specific type of function in the Function types section of the Help Center if you need help. 
- Click Publish. 
Your function is now active.
Function campaign dashboard
After you've clicked Publish, you're taken to that function campaign's dashboard.
Here you can:
- edit the function 
- monitor function performance 
- switch the function status from draft to active 
- review the function's timeline 
To make the function details visible to customers, you can publish it as a storefront widget.
Step 2: Publishing a widget to your storefront
Part 1: Set up the widget
Steps:
- From the function campaign dashboard, under Storefront Widgets you have different options depending on the type of function you created: - Promotional banner: Slides up from the bottom to highlight promotions or calls-to-action. Supports a title, subtitle, and button. 
- Announcement bar: Slim, sticky banner at the top for important updates or offers. It stays visible as customers scroll. Includes text and a link. 
- Tiered banner: Shows progress toward unlocking discount tiers based on cart total. Supports a main title/subtitle and individual titles/subtitles for up to three tiers. 
- Popup: Modal window over page content for promotions, announcements, or sign-ups. Includes a title, subtitle, and button. 
 
- Enter the details required for the widget and click Save. 
- Under Widget preview, from the Destination drop-down, select where you want to publish the widget to. You can choose: - Home page 
- Product page 
- Collection page 
 
- Select the Theme that you want to publish the widget to. 
- Click Continue to theme editor. 
Part 2: Add the widget to your theme
On your theme editor, the widget is published under the Apps block.
Steps:
- Click on the widget that was added to the Apps section block. 
- Beside Block identifier (Block Name or App Block ID), click Select. 
- Click the corresponding block name for the function you created. 
- Optional: Adjust any styles that you want to apply to the widget. 
- Click Save. 
- Optional: Click back to the main template and click and drag the Apps section block to the position in the theme template that you want, and click Save. 
Last updated
