Overview
The Emole Partner Program lets you build apps that run inside Emole stores and sell them in the Services Store (store 22) as a one-time purchase or a monthly subscription. Everything happens inside the platform: no file uploads, no servers to run, no deployments. Your app definition is stored on the platform and works instantly on every store that installs it.
| Term | Meaning |
|---|---|
| Partner | Your program account: developer, designer, marketer or agency. |
| App | What you build: a storefront widget, an integration with an external system, or an automation reacting to store events. |
| Blueprint | A ready-made starting point (announcement bar, countdown, tracking pixel, webhook…) you customise instead of starting from scratch. |
| Sandbox store | Your private store for testing your app exactly as a merchant will see it, before review. |
| Review | Emole's security and quality check before your app reaches any merchant. |
| Services Store | Store 22 on the Emole platform, where merchants buy your app. Purchase activates it in their store. |

Start here: the idea in two minutes
If this is your first time, read this section, then follow the two exercises exactly as written. After that the rest of the guide is a reference.
| Term | Plain meaning | Example |
|---|---|---|
| App | A small feature a merchant adds to their store in one click, without changing the whole look. | A “free shipping” bar, a WhatsApp button, a tracking pixel. |
| Theme | The whole look of the store: colours, fonts and home page sections. | A luxury fashion theme, an electronics theme. |
| Blueprint | A ready model you start from instead of a blank page. Picked in step 1, then edited. | “Announcement bar”, “Full store identity”. |
| Zone | Where in the store the app appears. | Top of every page, product page, cart page. |
| Settings | The fields the merchant fills in after installing, to fit the app to their store. | Announcement text, background colour, WhatsApp number. |
| Variable | A word in double braces replaced by a setting's value when shown. | {{config.text}} becomes “Free shipping over 200 SAR”. |
| Sandbox store | Your private store for testing before publishing. | Created automatically when you sign up. |
The whole journey: build the app or theme in the wizard (10 steps) → test it on your sandbox → submit for review → the platform approves → set the price → merchants see it in the services store → a merchant buys it, it runs in their store, and your share reaches your wallet.
Exercise 1: your first app in 10 minutes (announcement bar)
- Partner dashboard → My apps → Build a new app.
- Step 1: choose the Storefront type, then under “Bars and alerts” click the “Announcement bar” card, name it
Free shipping bar→ start. - Step 2: short description
A top bar for your offers, your support email → save and continue. - Step 3: the top of every page zone is preselected with four fields: text, link, background colour, text colour. Set the text default to
Free shipping on orders over 200 SAR→ save and continue. - Step 4 (conditions): add nothing, so the bar always shows → continue.
- Step 5: “no-code template” is selected and the template is written for you. Change nothing → continue.
- Step 6: no integration needed → continue.
- Step 7: press Generate a starter page and add an image to the hero section → save.
- Step 8: install your apps, then press preview to see the bar, or open your sandbox store.
- Step 9: complete anything listed, then submit for review.
- Step 10 (after approval): monthly subscription, price
19, trial days7→ publish.











Result: merchants find it under Platform services, try it for 7 days, and set their own text and colour from Customize.
Exercise 2: your first theme in 15 minutes
- My apps → build a new app → the Themes type → the “Full store identity” card → name
Naseem theme→ start. - Step 2: short description
A calm theme for fashion stores, support email → continue to step 5. - Step 5 (theme builder) opens with a complete starter:
- Open My images and upload a banner about 1600 px wide.
- Identity: primary
#1f2937, accent#c084fc, fontTajawal. - Open the banner section: title
Spring collection, pick your image in the image field. - Open the product grid: title
New arrivals, count8. - Tick “hidden” on sections you don't want and add others (e.g. reviews).
- Save and look at the preview below.

1 choose an image · 2 upload — then copy its URL or pick it in any image field 
1 primary colour · 2 accent · 3 font 
1 open the section · 2 pick your image from the list 
Save the theme and refresh the preview - Back in step 2: add your preview store URL once your sandbox has products and images.
- Steps 7–10 as in exercise 1; themes are usually priced one-time.

Result: merchants see it in Store design → Themes: preview, buy, activate, then change colours, section texts and images from Customize theme.
All ready-made app types
Step 1 shows 4 main types, each with sub-groups of ready blueprints: Storefront (bars and alerts · banners and home sections · popups · product page · contact buttons), Marketing & tracking (ad pixels · analytics), Connect & automate (external systems · team alerts), Themes.
| Blueprint | What it does | Where | Merchant sets |
|---|---|---|---|
| 1. Storefront | |||
| Announcement bar | Coloured text bar with optional link. | Top of every page | Text, link, colours |
| Countdown offer | Offer bar with a live countdown. | Top of home | Text, end time, link, colours |
| Promo banner | Large image with title, text and button. | Top of home | Image, title, text, button |
| Email popup | Popup after a delay that collects emails. | Home page | Title, text, button, endpoint, delay |
| Free shipping bar | Shows how much is left for free shipping. | Cart page | Threshold, text, colour |
| Recent purchase popup | “Ahmed from Riyadh bought this”. | Product page | Names and cities, text, interval |
| Welcome message | Welcome after sign-up with a discount code. | Top of home | Text, discount code |
| Trust badges | Secure payment, warranty, free returns. | Bottom of product page | Four items |
| Product FAQ | Collapsible questions and answers. | Product page | Title, 3 Q&As |
| Featured products | The store's featured products from its database. | Top of home | Title, count |
| Testimonials | Three named testimonials. | Bottom of home | Title, 3 quotes and names |
| Floating WhatsApp button | Opens a WhatsApp chat with a preset message. | Floating on every page | Number, message, position, colour |
| 2. Marketing & tracking | |||
| GA4 · GTM · Meta · TikTok · Snapchat pixels | Adds the tracking code to every page. | Page head | Measurement / container / pixel ID |
| 3. Connect & automate | |||
| Webhook to an external system | Sends orders, payments and sign-ups to another system. | Runs on the event | URL, secret, include customer |
| New-order alert to Slack/Discord | A message in the team channel for every order. | Runs on the event | Webhook URL, channel, message |
| 4. Themes | |||
| Full store identity | The whole store look: header, footer, colours, fonts, home sections and product and category pages. | Whole store | Colours, fonts, radius, section texts and images, show/hide sections |
The three run modes (step 5): no-code template (HTML and CSS, for anything visible), built-in function (logic inside the platform, e.g. countdown, featured products), remote service (your server answers, for computations or integrations).
Create a partner account
- Click Join as a partner at the top of any page, or open the sign-up page.
- Enter your email and a password of at least six characters, then confirm it.
- Choose your partner type. To build apps, choose Developer.
- Fill in your professional profile: company or trade name (what merchants see), a short bio, portfolio link and specialties.
- Accept the program terms and click Create my account.


After signing up: awaiting approval
Applications are reviewed before activation. Until yours is approved, portal pages show “Your account is awaiting platform approval”. Once approved, every page unlocks automatically and — for developers — your sandbox store is created.

The partner dashboard
The whole partner dashboard is available in English and Arabic. Switch at any time with the 🌐 English / 🌐 العربية button, at the top of every page and in the dashboard bar. Your choice is remembered on this browser, and the layout flips direction (left-to-right in English, right-to-left in Arabic). Platform messages (errors, confirmations) follow the same language. Your own content, such as app names and descriptions, stays as you wrote it.
After logging in, every dashboard page shows this bar:
| Page | What it's for |
|---|---|
| My dashboard | Your status (Active, Developer, Bronze…), wallet totals, orders waiting for you, published products, installs, rating, latest orders and wallet activity. |
| My apps | Every app and theme with its status (Draft, Under review, Approved, Published), type and mode, install count and last update. Buttons: Build a new app, Open in the wizard, Continue building, Pricing and publishing, Delete (drafts only). |
| Sandbox store | Your private test store: its link, Install my uninstalled apps, Reset the store, and each install's settings (JSON) to try different merchant cases. |
| Orders | Service orders from merchants: accept, start work, deliver with a note and links, and chat with the merchant. |
| Marketplace | Your ready services (design, SEO, store setup…) listed in the services store, with price, delivery time and revisions. |
| Wallet | Available and pending balance, all transactions, and withdrawal requests to your bank account (IBAN). |
| My profile | Your business name, bio, portfolio, picture and specialties — what merchants see in the partner directory. |

The wizard pages
Building an app or theme happens in the wizard, one step per page. The steps bar at the top shows where you are; completed steps are outlined in green and you can jump back to any of them.
| App steps | Theme steps |
|---|---|
| Type → Details → Behaviour (zones and settings) → Conditions → How it works (template, function or external service, permissions, data tables, actions) → Company connection → App page → Try it → Review → Publish | Type → Theme details → Design (theme builder) → Theme page → Preview → Review → Publish |
Every step has Save and continue and Save and stay here. Check my app runs the automatic check (blocking issues and warnings) before review, and Request log lists every request the platform sent to your server, with resend.
In the theme builder (Design step), the tabs are the store pages (Header, Home, Product, Category, Pages, Cart, Login, Sign up, My account, Checkout, Search, Wishlist, Compare, 404 page, Blog, News, Order completed, Footer). Drag elements between areas, click an element to edit it, and the preview on the right updates instantly. Panels below the tabs: My images (upload theme images), Colours and fonts, What the merchant customizes (reordering, merchant CSS, library sections, colour sets, editable fields) and Companion apps.
The app builder wizard
The wizard has ten steps. Every step is saved to the platform immediately, so you can leave and come back to continue where you stopped. Each step ends with Save and continue, Save and stay here and a link back to the previous step.
Step 1: Pick a blueprint
Choose the blueprint closest to what you want. Each one comes with its template, settings fields and placement, all of which you can change later. Filter blueprints with the chips at the top (marketing, analytics, integration, support, display, themes), optionally name your app, then click Start building.

Step 2: App details
- Name in Arabic and English — shown in the Services Store.
- A short description (up to 300 characters) for the card, and a full description for the listing page.
- Icon: a square image URL (256×256 recommended, with a background).
- Category and version (e.g. 1.0.0).
- Support email, website and documentation links.
- Private app: enable it if the app is only for specific stores and should not be listed publicly.

Step 3: Placements & settings
Placements (widget zones) are where your app appears in the store, grouped by page: home, product, cart, checkout, header and footer… Pick one or more.
Settings fields are what the merchant configures on install. Each field has a key (in English, e.g. text), a label, a type, a default value and help text. Available types:
| Text · Long text · HTML | Messages, headings, formatted content |
| Number · Colour · URL · Image | Typed values, validated on save |
| Select list | Options you enter separated by commas |
| Yes/No · Date & time | On/off switches and campaign dates |

Step 4: Conditions
Conditions decide when your app shows or runs. Add one or more and choose at the top whether all must match or any is enough.
| Fields | Operators |
|---|---|
| Cart total, cart item count, device, page type, page path, guest or registered customer, customer roles, language, currency, hour, day of week, date, store, sandbox store, placement | equals, not equals, greater than, greater or equal, less than, less or equal, contains, does not contain, in list, not in list, between, is true, is false, empty, not empty |
Example: “show the free-shipping bar when cart total is less than 200 and device equals mobile”.

Step 5: How it runs
| Mode | When to use it |
|---|---|
| No-code template | Write HTML and CSS (JavaScript optional) and use merchant settings through variables such as {{config.text}}. Best for most visual apps. |
| Built-in handler | Pick logic already built into the platform (featured products, countdown, recommendations…) and configure it with settings. |
| External service | The platform sends the page context to your URL and renders your response. You set a timeout in seconds; if your server exceeds it, the store page still loads. |
<div class="offer-bar" style="background:{{config.color}}">
{{config.text}}
<a href="{{config.link}}">{{config.cta}}</a>
</div>
Use the live preview (Live preview) to see the output with your default settings before saving.

Step 6: Connecting to an external company
Does your app need the merchant's account at another company, such as a shipping carrier, an accounting system or a messaging provider? It works with any company. Choose how the merchant signs in there:
- No connection needed: your app only uses store data, or calls your own services with your own account.
- Key pasted by the merchant: the merchant copies an API key from their account at the company and pastes it in your app's settings. You set the field label and where to find the key.
- Merchant sign-in (OAuth2): the merchant clicks Connect my account, signs in at the company, approves, and returns automatically. Register an app in the company's developer console with the redirect URL shown in this step, then enter the Client ID, Client Secret, authorize URL, token URL and optional scopes.
The platform stores the key or token encrypted for each store and refreshes OAuth2 tokens before they expire. Every request to your server then carries a connection field: company, type, connected, apiBaseUrl, account, plus apiKey, or accessToken, tokenType and expiresAt. Use it to call the company on that merchant's behalf. When connected is false, the merchant hasn't connected yet, so reply with a clear error.

Step 7: App listing page
Design your app page here. Start with Generate a starter page to get a complete page built from your app details, then edit, reorder and add sections.
Available sections (16): hero, free text, features, gallery, screenshots, video, setup steps, FAQ, pricing, merchant testimonials, stats, comparison table, changelog, support & contact, install call-to-action, custom HTML.
At the top: cover image, accent colour, light or dark theme, and an SEO title and description. The preview at the bottom shows the page exactly as merchants will see it.

Step 8: Test in your sandbox
- If you have no sandbox yet, click Create my sandbox store.
- Click Install my uninstalled apps to install the latest version of your app there.
- Run the preview, or open the sandbox store and browse it like a shopper.
- If the data gets messy, use Reset.

Step 9: Submit for review
The platform lists anything missing (name, description, placement, template, listing page…). Once complete, Submit for review appears. After submitting, the status becomes “under review”. If it is rejected, the reviewer's notes appear in this same step — fix them and resubmit.


Step 10: Pricing & publishing
Unlocked once your app is approved:
- Pricing model: one-time, or a monthly subscription with free trial days.
- Price in SAR.
- Listing details: name, description, image and category in the services store.
On save, your app is listed as a product in the services store (its SKU starts with APP-) and becomes visible to merchants in the Services Store. When a merchant pays, the app is activated in their store and managed from their dashboard under “تطبيقات متجري” (My store apps).

Earnings & payouts
- After every sale or subscription renewal, your share (price minus the agreed platform commission) is added to your pending balance, then moves to your available balance.
- From the Wallet, request a payout of any available amount above the minimum, with your bank details.
- The amount is reserved immediately. Once transferred, the request shows “processed” with the transfer reference; if rejected, the amount returns to your available balance.
Designing UI and images
- The app's storefront UI: HTML and CSS in step 5, previewed instantly. Colours and texts come from the merchant's settings, so one app fits every store.
- The app page in the services store: built from sections in step 7, no code.
- Images (icon, cover, screenshots, banners): upload them from the My images box in the wizard or with
emole-theme upload, and paste the returned URL into any image field. Suggested sizes: icon 256×256, cover 1600×600, banner 1600×700, screenshots 1280 wide.
Store themes: overview
An Emole theme is standalone: it is not built on another theme and nobody picks a “base theme”. You design the header and footer, your identity (colours, fonts, corner radius) + the home page sections you design (banners, product and category grids, reviews, brand story…). It is all data stored on the platform: no files to upload to a server, no manual deployment.
| Method | For | How |
|---|---|---|
| Theme builder | Designers | In the browser, step 5: arrange and configure ready sections, no code. |
| emole-theme CLI | Developers | On your machine: each section is HTML, CSS and a schema, pushed with one command. |
Both work on the same theme: start in the builder and continue with the CLI, or the other way round.
A theme from start to finish
- Create it: partner dashboard → My apps → Build a new app → pick the “Theme: complete store identity” (full store identity) blueprint → start.
- Details (step 2): Arabic and English name, short and full description, icon, support email, and the preview store URL: a fully stocked store showing your theme (e.g. your sandbox store filled with products and images).
- Images: in step 5 open My images and upload your logo, banners and section images.
- Identity (step 5): colours, body font and heading font, corner radius.
- Sections (step 5): order the home sections, set each one's text, image and product count, hide or delete what you don't need, add more from the library, then save.
- Preview: below the builder, using your sandbox store's data, or
emole-theme preview. - Page (step 7): the theme's page in the services store: screenshots, features, FAQ.
- Review (step 9): clear the checklist and submit.
- Publish (step 10): after approval set the price; it is listed in the services store. A theme has no licence: the merchant buys it once and owns it for good. There is no subscription, no expiry and no trial; merchants try it through the preview before buying.
- For the merchant: it appears in Store design → Themes with a Preview theme button and a buy button, then Customize theme once activated.
The theme builder (no code)
For themes, step 5 is the builder. At the top is the identity: the option to replace the home page content with your sections, and identity settings. Below are the sections, each with an order number, “hidden”, “delete” and its fields.



Images
- Open My images — upload theme images above the builder, choose a file (JPG, PNG, WEBP or GIF up to 5 MB) and upload it.
- It appears in the gallery with its URL. Every image field in your sections suggests your uploaded images — pick one or paste a URL.
- From the CLI:
emole-theme upload banner.jpg logo.pngprints each URL to use inschema.jsonortemplates/home.json.

Fonts and colours
- A
fontsetting accepts any Google Fonts family name (e.g.Tajawal,Cairo,Almarai,Changa,IBM Plex Sans Arabic). The platform loads it for you. - Every colour, number and font setting becomes a CSS variable named after its key:
primary→var(--t-primary),headingFont→var(--t-headingFont),radius(number) →var(--t-radius)in px. - Use the variables in your section CSS instead of fixed values, so the whole theme follows the merchant's colour and font choices.
- A custom font not on Google Fonts: host the file yourself and declare it with
@font-faceinassets/global.css.
/* sections/hero/section.css */
.ets-hero h1 { font-family: var(--t-headingFont); color: var(--t-primary); }
.ets-hero .btn { background: var(--t-accent); border-radius: var(--t-radius); }
Widgets inside a theme
Add a widget zone section wherever you like and pick the zone (e.g. theme_zone_1). Any app the merchant installs on that zone — partner apps or platform plugins — renders there. In section code: {{zone:theme_zone_1}}.
What the merchant sees
- Before buying: Preview theme opens your preview store URL. Without one, it opens a platform demo store (products, images, categories, menus) with your theme applied. The merchant browses freely; a bar at the bottom offers Buy theme and End preview.
- After buying: activating it makes your theme the store theme: your header, footer and sections on every page.
- Customizing: every identity setting and every section's fields, plus show/hide per section. To keep a field from the merchant add
"locked": true.

Professional themes from the command line
emole-theme new my-theme --from aurora # complete example: every page, 21 sections, blocks
emole-theme link --app 12
emole-theme section presets # slider, faq, features, testimonials, logos, product-grid…
emole-theme section new spring --preset slider [--page home]
emole-theme block new spring video # a new block type inside a section
emole-theme check # the platform's rules, with file and line numbers
emole-theme dev [--push] # http://localhost:9292, reloads on save, errors on top
emole-theme push # checks first, refuses on errors (--force to override)
emole-theme pack theme.json | unpack theme.json my-copy
Blocks repeat inside a section (slides, questions, columns, quotes). Define their types in schema.json under "blocks" (with maxBlocks and a per-type limit), loop over them with {{#each blocks}}{{#if is_slide}}…{{/if}}{{/each}}, and set default ones in the page file. After buying, the merchant adds, deletes, reorders, hides and edits blocks in “Customize theme”.
The product card
Design it once in the reserved section sections/product-card and it replaces the platform card in every product list: category, search, new products, related products and more. Variables: {{product.name}}, url, sku, shortDescription, image, imageLarge, imageAlt, price, oldPrice, priceValue, rating, stars, reviews, and the flags new, canBuy, canWishlist, canCompare. Design buttons freely and add data-emole-action="addtocart", "wishlist" or "compare": the platform runs them with its own scripts. Select-type theme settings also become CSS variables, so a cardRatio setting can drive aspect-ratio: var(--t-cardRatio) and the merchant picks it in “Customize theme”.
Companion apps
A professional theme often ships with helper apps, such as theme settings, category-linked home sections or an offers bar. Make them companion apps and they are installed with the theme, free and with no licence, in every store that owns it.
- Build each helper as a normal app under "My apps" and submit it until it is approved.
- In the theme builder open "🧩 Companion apps" and tick up to 10. Or, with the CLI, add their ids to
theme.json:
"companions": [12, 15]
- Companions must be your own apps, and cannot be themes or page templates.
- The theme page in the services store lists them under the buy button, under "Included free with the theme", with each app's permissions, so the merchant sees what will be installed before buying.
- They are installed when the merchant activates the theme, with no expiry. A companion added in an update reaches stores running the theme once the update is approved.
- The merchant can switch any of them off from "My store apps".
Advanced merchant options
Four optional settings that make a theme as flexible as the platform's own. The merchant only sees what you enable.
- Colour presets: one click changes the store's colours. Builder: set the colours, then "Save current colours". CLI:
"presets": [{ "key", "name", "values": { "primary": "#0f2a3d" } }]intheme.json(up to 12). - Merchant CSS, applied after your theme's CSS:
"merchantCss": true. - Section library: the merchant adds the section to the home page, as many times as needed, each copy with its own settings (up to 20):
"merchantAdd": truein the section'sschema.json. - Category and sort fields: field types
categoryandsort(newest, price-asc, price-desc, name, position) feed{{#each products}}.
Page templates (product, category, page) are now also compiled to Razor when approved.
Platform pages: cart, account, checkout and more
These pages are optional. If you don't design them, your theme inherits the platform page as it is, in your colours, fonts and corners. To redesign one, give it its own page file: templates/cart.json, login.json, register.json, account.json, checkout.json, completed.json (order placed), search.json, wishlist.json, compare.json, notfound.json (404), blog.json or news.json. Contact us is a content page here, so design it with topic.json.
Each page has the platform element @content (the platform page itself, with its forms and scripts). The account page also has @navigation (the account menu), and one layout covers every account page. Place @content in full, start or end and add your sections around it, such as a free-shipping bar above the cart or a benefits panel beside the login form. Checkout steps stay the platform's own, so every payment, instalment and shipping app, discount rule and tax provider keeps working. Pages carry .ept-shell and .ept-<page> classes for your CSS; cart sections get {{cart.count}}, {{cart.total}} and {{#each cart}}. A redesigned page without @content fails the check. Merchants cannot rearrange these pages unless you enable "merchantReorder": true. Aurora includes all five.
From your design to a native Razor theme
Once the admins approve your theme, the platform engine turns it into a native platform theme with Razor (.cshtml) files, like the built-in themes. You never write Razor: you design sections, and the engine writes the files.
- On approval the engine creates
Themes/Partner-<name>: a standalone theme with one Razor file per section. It is not built on any other theme: the platform's standard pages (cart, checkout, account, search) take your colours, fonts and corners automatically. - The theme appears in the platform's theme list, and the merchant's store switches to it on activation. Only stores that bought and enabled it see your design.
- Everything you write enters the file as a string value, never as code, so
@(…)or Razor tags inside a section show as plain text. Every line of code in the file is written by the engine. - Updates go through review: merchants stay on the approved version until the admins approve, then the files are regenerated.
The emole-theme CLI
Download and install
- Install Node.js 18 or newer (LTS) from nodejs.org. Check with
node -v. - Install the tool straight from the partners site (the same link is behind Download the tool in step 5):
npm i -g https://partners.emole.sa/wp-content/plugins/emole-partners/assets/cli/emole-theme.tgz
On Windows use PowerShell or Terminal; on macOS and Linux use Terminal. Verify with emole-theme help.

Step by step
- Create the theme in the wizard first (the full store identity blueprint) to get its ID.
- Log in with your partner account (the password is prompted, never echoed):
emole-theme login --site https://partners.emole.sa/
emole-theme apps # lists your apps and themes with IDs
- Download the theme into a folder (a new theme comes with a complete starter):
emole-theme init my-theme --app 12
cd my-theme
- Edit the files in any editor (e.g. VS Code) and run dev mode: every save pushes and refreshes the preview.
emole-theme dev
- Add a section, then add it to
templates/home.json:
emole-theme section new hero-video
- Upload images and use their URLs in settings:
emole-theme upload hero.webp logo.png
- Push the final version, then finish wizard steps 7–10:
emole-theme push

All commands
| Command | What it does |
|---|---|
login --site <url> [--email <e>] | Log in with your partner account. For CI set EMOLE_THEME_PASSWORD. |
apps | Your apps and themes with IDs. |
init <dir> --app <id> | Downloads the theme (or the starter) into a folder linked to that ID. |
pull / push | Pull the theme from, or push it to, the platform. |
preview | Builds a home-page preview with your sandbox data and opens it. |
dev | Watches files; pushes and previews on every save. |
section new <key> | Creates a section with its three files. |
upload <file…> | Uploads images and prints their URLs. |
logout | Removes your login from this machine. |
Theme folder structure
my-theme/
theme.json name, replaceHome, settings (colors / fonts / radius)
assets/global.css theme-wide CSS
sections/<key>/section.html section HTML
sections/<key>/section.css section CSS — scope it under .ets-<key>
sections/<key>/schema.json section name, category and fields
templates/home.json home section order and per-instance settings

Field types in schema.json and theme.json:
| Type | Merchant sees |
|---|---|
text · textarea | Short text · long text |
image · url | Image URL (with your images suggested) · link |
color · number · font | Colour picker · number · font (in theme.json they become CSS variables) |
select with options | Drop-down |
boolean | Yes / No |
Each field also takes label, default, help, and "locked": true to hide it from the merchant.
Template variables
| Variable | Meaning |
|---|---|
{{config.title}} | A field from this section's schema.json |
{{config.theme.primary}} | A global setting from theme.json |
{{#each products}}…{{/each}} | Store products: {{name}} {{price}} {{oldPrice}} {{image}} {{url}} {{shortDescription}}. Count and category come from the section's limit and categoryId fields. |
{{#each categories}}…{{/each}} | Top-level categories: {{name}} {{url}} (count from limit) |
{{#each featured}} · {{#each images}} · {{#each reviews}} · {{#each topics}} · {{#each cart}} | Homepage featured products; the product's pictures (url, thumb, alt); approved reviews (title, text, rating, stars, date); published pages; the visitor's cart, plus {{cart.count}} and {{cart.total}} |
{{#if x}}…{{else}}…{{/if}} · {{#each list}}…{{else}}…{{/each}} | Conditions with an alternative (they see loop-item fields), and text for an empty list. Loops nest; {{@index}}, @first and @last work inside them. |
{{value | filter:arg}} | Chained filters: truncate:N, default:'x', upper, lower, date:'dd/MM/yyyy', number:N, image:600, striphtml, nl2br, urlencode, append:'x', prepend:'x'. Output is HTML-encoded after filters unless you use .raw. |
{{#if config.x}}…{{/if}} · {{#unless config.x}}…{{/unless}} | Conditional output |
{{zone:theme_zone_1}} | Widget zone for the merchant's apps |
A complete example ships in the package: the Aurora theme (12 sections) in examples/aurora. Copy it and start from there.

CLI troubleshooting
| You see | Fix |
|---|---|
emole-theme not found | Reopen the terminal after installing; make sure npm -v works. |
| “Log in first” | Your session expired: run emole-theme login --site … again. |
| “This folder is not linked to a theme” | Run commands inside the folder created by init. |
| Push rejected | Read the printed errors (section without HTML, invalid JSON…) and fix them. |
Connecting your server: the complete guide
Every app with logic on your server (shipping company, payment gateway, discount rule, tax provider, server-rendered widget, order events) talks to the platform the same way. This chapter explains that connection once, end to end.
The full picture: three directions
| Direction | When | How it is verified |
|---|---|---|
| Platform → your server | A store event (new order, payment…), a page that shows your widget, or a service that asks you (shipping rates, tax, discount, payment, waybill). | You verify X-Emole-Signature with your secret. |
| Your server → platform | You read or update store data, or confirm a payment. | The platform checks appToken (data) or your signature (payment confirmation). |
| Your server → another company | You create a shipment or invoice in the merchant's account elsewhere. | With the merchant's key or token from connection. |
From zero to the first successful request
- Create the app in the wizard and pick its type in step 1 (payments and shipping, marketing → discount rule, integrations and automation for events).
- Step 3: pick the events you want (order placed, paid, shipped…) or the zones for a widget. Service types (shipping, payment, tax, discount) set their hooks automatically.
- Step 5: choose “External service” and fill in your server URL (
https://), a random secret of 32+ characters, the timeout (1–30 seconds, default 5), and the permissions you need, each with a reason. - Step 6 (optional): if your server works in the merchant's account at another company, define the connection (API key or OAuth2).
- Write the server: one
POSTendpoint that reads the raw body, verifies the signature, then routes onhook. - Put it online. The platform cannot reach
localhost. While developing, use a tunnel (Cloudflare Tunnel, ngrok…) and put its public URL in step 5. - Check the connection: “Check my app” sends a signed
app.ping, then a request with a forged signature. Answer the first with 200 and reject the second with 401. - Try it on your sandbox store: install the app, place an order or open the cart, then open Request log to see every request, its body, result and duration, and resend any event.
- Submit for review from step 9 once the check has no errors.
What reaches your server
Every request is a POST with application/json and these headers:
| Header | Meaning |
|---|---|
X-Emole-Event | The hook name, same as hook in the body. |
X-Emole-Signature | sha256= + lowercase hex HMAC-SHA256 of the body with your secret. |
X-Emole-Redelivery | Only on a resend from the request log: the original log id. Use it to avoid running an event twice. |
// 1) A service waiting for your answer: shipping.* · payment.* · discount.check · tax.rate
{ "hook": "shipping.rates", "storeId": 10, "storeType": 1, // 1 single merchant, 2 multi-vendor, 3 public
"config": { … merchant settings … }, "appToken": "…", "connection": { … } | null,
"data": { … } }
// 2) An event or a widget: order.* · customer.registered · display zones
{ "hook": "order.paid", "storeId": 10, "storeType": 1, "sandbox": false,
"config": { … }, "payload": { "orderId": "47351", "orderTotal": "931.50", … },
"appToken": "…", "connection": { … } | null, "permissions": [ "orders.read" ] }
Keep your data per storeId. config never contains the secret. In a multi-vendor store (storeType 2) an order can hold several vendors, split in data.vendors.
Verifying the signature
Compute HMAC-SHA256 over the raw body exactly as received. Do not parse and re-serialise it first: any change in spacing or key order changes the signature. Reject mismatches with 401.
// Node.js (Express)
app.post('/emole', express.raw({ type: 'application/json' }), (req, res) => {
const expected = 'sha256=' + crypto.createHmac('sha256', process.env.EMOLE_SECRET).update(req.body).digest('hex');
const given = req.get('X-Emole-Signature') || '';
if (given.length !== expected.length || !crypto.timingSafeEqual(Buffer.from(given), Buffer.from(expected)))
return res.status(401).json({ error: 'bad signature' });
const msg = JSON.parse(req.body.toString('utf8'));
});
// PHP
$raw = file_get_contents('php://input');
$expected = 'sha256=' . hash_hmac('sha256', $raw, getenv('EMOLE_SECRET'));
if (!hash_equals($expected, $_SERVER['HTTP_X_EMOLE_SIGNATURE'] ?? '')) { http_response_code(401); exit; }
# Python (Flask)
raw = request.get_data()
expected = 'sha256=' + hmac.new(os.environ['EMOLE_SECRET'].encode(), raw, hashlib.sha256).hexdigest()
if not hmac.compare_digest(expected, request.headers.get('X-Emole-Signature', '')): abort(401)
Replies, timeouts and failure
- Answer services with HTTP 200 and JSON (up to 200 KB) and widgets with HTML (up to 100 KB, scripts are removed). Any other status is a failure.
- The customer waits for you at checkout: stay well under your timeout. For long work (sending an invoice to an accounting system), answer 200 at once and do the work in the background.
- The store never breaks because your server does: missing shipping options just don't show, a failed
shipping.createcreates no shipment and tells the merchant why, a failedshipping.cancelkeeps the shipment, a failedpayment.createleaves the order awaiting payment, a faileddiscount.checkmeans no discount, a failedtax.ratefalls back to the previous tax provider, and failed events can be resent from the request log.
Reference: everything that reaches your server
hook | When | You reply |
|---|---|---|
app.ping | “Check my app” | Any JSON with 200 |
order.placed · order.paid · order.shipped · order.delivered · order.cancelled · order.refunded · customer.registered | The event happens in a store with your app | 200 |
A zone name, e.g. productdetails_add_info | A page with your widget opens | HTML |
shipping.rates | Customer at checkout | {"options":[{"name":"Standard","rate":20,"description":"…","transitDays":3}]} |
shipping.create | Merchant clicks “Add shipment” on the order | {"trackingNumber":"EX123","labelUrl":"https://…"} |
shipping.cancel | Merchant deletes the shipment | {"ok":true}, or {"ok":false,"error":"…"} to refuse |
shipping.track | Someone tracks the shipment | {"url":"…","events":[{"name","location","date"}]} |
payment.create | Customer confirms the order | {"redirectUrl":"https://pay…"} |
payment.refund · payment.void | Merchant refunds or voids | {"success":true} or {"success":false,"error":"…"} |
discount.check | A cart is priced with a discount that uses your rule | {"valid":true} or {"valid":false,"message":"…"} (the message is shown to the customer) |
tax.rate | Tax is calculated for a product | {"rate":15} |
mfa.send | A verification code must be sent | {"sent":true} |
Discount rule, on the merchant side: Marketing → Discounts → open a discount → Requirements tab → requirement type “Partner apps discount rule” → pick your app → Save. The Requirements tab is available on the advanced package; mention it in your app description. Replies are cached one minute per customer and cart.
Tax provider: installing it makes your app the store's tax provider; the previous one stays as a fallback. Rates are cached ten minutes per tax category and address, and tax-exempt products stay exempt.
The other direction: your server reads and updates store data
GET https://<platform>/api/apps/v1/orders?page=1
X-Emole-App-Token: <appToken>
Read: me, store, products, products/{id}, products/{id}/images, categories, orders, customers, subscribers. Write: PATCH products/{id}, POST/DELETE products/{id}/images, POST categories, PATCH categories/{id}, POST discounts, POST orders/{id}/notes, POST orders/{id}/shipments, PATCH orders/{id}/status, plus your app tables under data/{table}. A missing or invalid token (or an uninstalled app) returns 401; a disabled app, an expired subscription or a missing permission returns 403 with the reason.
Payment confirmation is also sent by you: after the customer pays, POST to the callbackUrl you received in payment.create (https://<store>/partner-apps/payment/callback/<app id>), signed the same way:
{ "orderId": 47351, "status": "paid", "amount": 931.50, "transactionId": "tx_123" }
It is refused if the signature is wrong, your app is not installed in the order's store, or the amount differs from the order total.
Checklist before review
- HTTPS URL; secret of 32+ characters kept in an environment variable.
- Signature computed on the raw body; forged requests get 401.
- Service replies well under the timeout; long work in the background.
- Data kept per
storeId; redelivered events (X-Emole-Redelivery) not run twice. - Minimum permissions, each with a clear reason; “Check my app” passes; every case tried on the sandbox store.
Common connection problems
| Symptom | Cause and fix |
|---|---|
| Every request fails with 401 on your side | You sign a re-serialised body. Read it raw, and use the same secret as in step 5. |
| Nothing arrives | The URL is localhost or behind a firewall, or the app is not installed and enabled in the store. |
| “Timed out” in the request log | Reply faster, raise the timeout (up to 30 s), or move the work to the background. |
| Shipping options don't show | The reply has no options, or an option has no name and rate. The log shows your reply. |
| The discount isn't applied | You replied valid:false or the call failed, or the merchant hasn't added your rule to that discount. |
| The order doesn't become paid | Unsigned confirmation, a different amount, or an order from a store without your app. The reply states which. |
Integrating with external systems
If your app connects a merchant's store to another system (accounting, shipping, CRM, WhatsApp, ERPs like Odoo), these are your tools:
| Tool | Direction | Use it for |
|---|---|---|
| Events (webhooks) | Emole → your server | Notify me on every new order, payment, shipment, delivery, cancellation, refund, customer sign-up. |
| Data API | Your server → Emole | Read the store's products, categories, orders and customers, within your permissions. |
| Remote storefront service | Emole ↔ your server | Content computed on your server and shown on the storefront. |
Exercise 3: connect a store to an accounting system
Goal: whenever an order is placed or paid, or a customer signs up, your server gets an instant notification with the details.
- Step 1: the Connect & automate type → the “Webhook to an external system” card, name
Accounting sync→ start. - Step 3: open the order events and customer events groups and tick the events you want.
- Step 5: choose remote service, enter your server URL and a verification secret (any long string you keep).
- Same step: tick the permissions you need to read details, e.g. read orders.
- Step 6: enable the integration if your system needs its own keys, pick “custom provider”. Secrets are generated and rotatable.
- Finish steps 7–10, then prepare your server to receive the request and verify the signature as below.





1. Events
- In step 3 pick from the order and customer event groups:
order.placed,order.paid,order.shipped,order.delivered,order.cancelled,order.refunded,customer.registered. - In step 5 choose remote service and enter your URL and secret.
- When the event happens in a store that installed your app, your server receives:
POST https://your-server.com/emole/events
X-Emole-Event: order.paid
X-Emole-Signature: sha256=5f1c… (HMAC-SHA256 of the body with your secret)
{
"hook": "order.paid",
"storeId": 7170,
"payload": { "orderId": "1042", "orderNumber": "1042", "orderTotal": "349.00",
"currency": "SAR", "paymentStatus": "Paid", "customerId": "88" },
"config": { … merchant settings … },
"appToken": "…",
"permissions": ["orders.read"]
}
- Verify the signature first and respond fast (default timeout 5 seconds). Node.js:
const sig = 'sha256=' + crypto.createHmac('sha256', SECRET).update(rawBody).digest('hex');
if (sig !== req.headers['x-emole-signature']) return res.status(401).end();
2. Data API
Choose permissions in step 5 (products, categories, orders, customers, store info). Every install carries an appToken, sent with every event and request, which reads that store's data only:
GET https://<platform>/api/apps/v1/orders?page=1
X-Emole-App-Token: <appToken>
Endpoints: me, store, products, products/{id}, categories, orders, customers. Anything outside your permissions is refused.
3. Remote storefront service
For widgets computed on your server (recommendations, shipping quotes, reviews from your system): choose remote service and a display zone. The platform sends the same request and renders the HTML you return (up to 100 KB, scripts stripped). If your server misses the timeout, the store keeps working.
Ready-made, no server needed
- Webhook to an external system: the merchant enters their system URL and a secret; events arrive signed.
- New-order alert to Slack or Discord: the merchant enters an Incoming Webhook URL and message text (
{orderNumber},{amount},{currency}).
Built-in actions: write on the platform's own fields
An app action is a button the merchant sees on a product, category or order page (and in their lists if you enable “Several items”), such as “Improve SEO”. Define it in step 5 (“App actions”), up to 10 per app. Each action has one of three modes:
| Mode | How it works | Needs a server? |
|---|---|---|
| Built-in, no code | A template per field using the item's values. The platform computes the new values, shows the merchant a before/after table inside their dashboard, and writes them on the product's own fields when they click Apply. | No |
| Built-in, from my server | List the fields only. Your server receives the action.run event with the current values and replies with the changes; the platform shows them before/after and writes them once the merchant approves. | Yes |
| My page | Your page opens inside the dashboard with emole_session (action, target, ids), for custom interfaces. | Yes |
Fields and the permission each target needs (request it in step 5; the merchant approves it on install): product (products.write): metaTitle, metaDescription, metaKeywords, seName, name, shortDescription, fullDescription · category (categories.write): metaTitle, metaDescription, metaKeywords, seName, name, description · order (orders.write): note.
metaTitle = {{product.name}} | {{store.name}}
metaDescription = {{product.shortDescription | striphtml | truncate:150}}
{ "hook": "action.run", "data": { "action": "seo-ai", "target": "product", "fields": ["metaTitle"],
"items": [ { "id": 7579, "values": { "name": "…", "sku": "…", "metaTitle": "" } } ] } }
→ { "message": "Suggestions ready", "items": [ { "id": 7579, "changes": { "metaTitle": "…" } } ] }
The platform accepts only the fields named in the action, only with a permission the merchant approved, and writes nothing until the merchant clicks Apply.
Merchant sender address: shipping.rates and shipping.create carry sender — the merchant's address as set on the platform (name, company, phone, email, country, state, city, address1, zip, and source: store = the shipping origin address in the shipping settings, vendor = the seller's address, none = not set yet). In a shared store, each entry in vendors has its own sender.
Scheduled tasks, customer email and the app's store page
Scheduled tasks: in step 3 (display zones and events) pick from “Scheduled”: schedule.hourly, schedule.daily or schedule.weekly. Your server receives the event on time for every store that installed your app, signed and with that store's appToken — for stock sync, daily reports, clean-ups or abandoned-cart reminders. The platform checks every 5 minutes and remembers the last run per store, so an event never repeats early. Requires the external service mode.
{ "hook": "schedule.daily", "storeId": 10, "appToken": "…",
"data": { "every": "daily", "scheduledAtUtc": "2026-11-28T03:00:00Z", "lastRunUtc": "2026-11-27T03:00:00Z" } }
Customer email: request messages.send (“Email customers”), then send from your server in the store's name to one of its customers:
POST /api/apps/v1/messages/email
X-Emole-App-Token: …
{ "orderId": 4512, "subject": "Rate your order", "body": "<p>Thanks for your order…</p>" }
→ { "queued": true, "to": "…", "remainingToday": 299 }
The recipient must own an order in that store (orderId) or be a customer who registered or ordered there (customerId). Sent from the store's email account, scripts removed, with a small line naming the store and app. Limit: 300 a day per store, then 429.
The app's store page: pick “App page in the store” (storefront_app_page) in step 3 and your app gets a standalone page inside the store's own design at /apps/<system-name> — a loyalty programme, size guide or quote request form. No code: your HTML template is shown, with {{payload.slug}} for the part after the name, {{payload.q_name}} for URL parameters and {{customer.name}}. From your server: you receive the same values and reply with HTML. The page exists only in stores where the app is installed and enabled.
Building an app with no blueprint
Blueprints are only starting points. If your idea isn't in the library:
- Storefront UI (bar, popup, section, button): start from the closest visual blueprint (e.g. announcement bar) and change the name, zone, fields and template freely — full HTML, CSS and JavaScript, with data from
{{#each products}}and friends. - Logic on your server (integrations, calculations, AI): start from “Webhook to an external system” or any blueprint and choose remote service in step 5. Your server receives events, reads data and returns HTML when needed — in any language.
- A full theme: the full store identity blueprint plus the emole-theme CLI.
- Something none of these cover (payment method, shipping, login): contact the platform team from the support page with your idea, so we can add the app type or hook point you need.
Pre-review checklist
- Tested on your sandbox store, on both mobile and desktop.
- Every settings field has a clear label and a sensible default.
- Conditions do not hide the app permanently (test a case where they match).
- The listing page has a titled hero, an image or video, features and setup steps.
- Your support email works and requested permissions are the minimum needed.
- Your external service (if any) answers within the timeout and verifies webhook signatures.
Troubleshooting
| You see | Cause and fix |
|---|---|
| “Your account is awaiting platform approval” | Your application is under review. Pages unlock automatically once approved. |
| “This email is already registered as a partner” | You already have an account. Sign in, or submit the sign-up form again with the same password to be signed in. |
| “Could not reach the platform” | The platform is temporarily unreachable. Try again in a minute. |
| No “submit for review” button | Read the missing-items list in step 9 and complete it. |
| App not showing in the sandbox | Install the latest version (step 8) and make sure your conditions match the page you are viewing. |