• Skip to primary navigation
  • Skip to main content
pragati logo

Pragati Tech Services

  • Home
  • About
  • Services
    • Ecommerce Solutions
    • Back Office Support
    • Business Central
    • Customer Support
  • Blog
  • Contact
  • Show Search
Hide Search
You are here: Home / Archives for Najama

Najama

Stop Uploading Banners at Midnight: Schedule Them

Najama · November 11, 2026 ·

It’s 11:58 PM, your Black Friday sale starts in two minutes, and you’re still logging in to swap a banner. Sound familiar? Shopify’s free Dawn theme is fast and clean, but the default Shopify Dawn slideshow gives you one image for every screen, no clickable links and no scheduling. In this guide I’ll show you how I fixed all three: separate desktop and mobile banners, tap-through links to any page or collection, and start and end times that make every campaign go live and expire on its own. No apps, no monthly fees, no midnight edits.

Why the default Dawn slideshow falls short

Dawn is Shopify’s free, fast and clean default theme, but its slideshow section is built for the simplest case: one image per slide, shown the same way on every device.

Real stores quickly run into three problems:

  • One image for every screen. A wide desktop banner gets cropped or shrunk on phones, where most shoppers browse. Text becomes unreadable and the offer gets lost.
  • No link on the banner. Shoppers tap a banner expecting to land on the sale, collection or product it advertises. Without a link, the slide is decoration.
  • Everything is manual. Every flash sale, festive offer or product launch means someone logging in at midnight to add or remove a slide. Miss it, and an expired offer stays live.

I fixed all three by customizing the slideshow section directly in the theme code. The rest of this guide explains what changed and how to rebuild it.

Before you start

You need a Shopify store on the free Dawn theme and access to its code. First:

  1. Duplicate your theme. Go to Online Store, then Themes, then Actions, then Duplicate, and work on the copy.
  2. Open the code editor. On the copy, choose Actions, then Edit code, then open sections/slideshow.liquid.
  3. Prepare two images per banner. A wide one for desktop and a tall one for mobile.

Step 1: Add the new settings to the schema

Every option a merchant sees in the theme editor comes from the {% schema %} block at the bottom of sections/slideshow.liquid (see Shopify’s section schema docs). Dawn’s slide block already includes an image picker, so the customization adds four new settings to the slide block’s settings list, right after the existing image picker:

  • Mobile image (mobile_image): a second image picker for screens under 750px wide
  • Image Link (image_link): a URL picker that makes the whole slide clickable
  • Show from (schedule_start): when the slide goes live
  • Hide after (schedule_end): when the slide expires

Shopify has no native date-time picker, so the start and end values are entered as text in a fixed format, with an info line that tells the merchant the expected format.

The code I added to the slide block’s settings:

{
  "type": "image_picker",
  "id": "mobile_image",
  "label": "Mobile image",
  "info": "Displayed on screens under 750px wide. Recommended size: 750 x 1000px (portrait). If left blank, the desktop image is used on mobile too."
},
{
  "type": "url",
  "id": "image_link",
  "label": "Image Link",
  "info": "Makes the entire slide clickable. Independent from the button link below."
},
{
  "type": "header",
  "content": "Scheduling (optional)"
},
{
  "type": "text",
  "id": "schedule_start",
  "label": "Show from",
  "info": "Format: YYYY-MM-DD HH:MM (24hr, store timezone). Leave blank to show immediately."
},
{
  "type": "text",
  "id": "schedule_end",
  "label": "Hide after",
  "info": "Format: YYYY-MM-DD HH:MM (24hr, store timezone). Leave blank to never hide."
}

How the settings work:

  • image_picker and url give merchants Shopify’s standard file picker and link picker, which can point to pages, products and collections.
  • The two schedule fields are plain text settings, with the exact format spelled out in the info line. Both are optional: blank means “show immediately” and “never hide”.
  • A header setting groups the schedule fields under “Scheduling (optional)” in the editor.

Step 2: Show separate desktop and mobile images

Each slide now outputs two images: a mobile image for screens under 750px wide, and Dawn’s original image for desktop. Both are in the page, and a few lines of CSS decide which one is visible, so phones get a banner designed for phones and nothing is awkwardly cropped.

Liquid: the image markup inside each slide

{%- if block.settings.mobile_image != blank -%}
  <img
    class="slideshow__img--mobile"
    src="{{ block.settings.mobile_image | image_url: width: 750 }}"
    srcset="
      {{ block.settings.mobile_image | image_url: width: 375 }} 375w,
      {{ block.settings.mobile_image | image_url: width: 550 }} 550w,
      {{ block.settings.mobile_image | image_url: width: 750 }} 750w
    "
    sizes="100vw"
    width="{{ block.settings.mobile_image.width }}"
    height="{{ block.settings.mobile_image.height }}"
    alt="{{ block.settings.mobile_image.alt | escape }}"
    {% if visible_index == 1 %}fetchpriority="high"{% else %}loading="lazy"{% endif %}
  >
{%- endif -%}

{%- comment -%} Keep the desktop image visible on phones when no mobile image is uploaded {%- endcomment -%}
{%- assign desktop_class = 'slideshow__img--desktop' -%}
{%- if block.settings.mobile_image == blank -%}
  {%- assign desktop_class = 'slideshow__img--desktop slideshow__img--always' -%}
{%- endif -%}

{%- if visible_index == 1 -%}
  {{
    block.settings.image
    | image_url: width: 3840
    | image_tag:
      class: desktop_class,
      height: height,
      sizes: sizes,
      widths: widths,
      fetchpriority: fetch_priority
  }}
{%- else -%}
  {{
    block.settings.image
    | image_url: width: 3840
    | image_tag:
      class: desktop_class,
      loading: 'lazy',
      height: height,
      sizes: sizes,
      widths: widths
  }}
{%- endif -%}

CSS: the breakpoint swap (inside a <style> tag near the top of slideshow.liquid)

@media screen and (max-width: 749px) {
  .slideshow__img--mobile { display: block !important; }
  .slideshow__img--desktop { display: none !important; }
}
@media screen and (min-width: 750px) {
  .slideshow__img--mobile { display: none !important; }
  .slideshow__img--desktop { display: block !important; }
}
.slideshow__img--mobile,
.slideshow__img--desktop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}
/* No mobile image uploaded: keep the desktop image visible on phones */
.slideshow__img--always { display: block !important; }

Fallback: with no mobile image, the slideshow__img–always class keeps the desktop image visible on phones.

Step 3: Make banners clickable

The merchant picks a page, product or collection in the Image Link field. The URL is saved on the slide, and a small script makes the whole banner clickable. Swipes and clicks on the button or arrows are ignored.

Liquid: add the link as a data attribute on the slide

<div
  class="slideshow__slide grid__item grid--1-col slider__slide"
  id="Slide-{{ section.id }}-{{ visible_index }}"
  {{ block.shopify_attributes }}
  role="group"
  aria-roledescription="{{ 'sections.slideshow.slide' | t }}"
  aria-label="{{ visible_index }} {{ 'general.slider.of' | t }} {{ visible_total }}"
  tabindex="-1"
  {% if block.settings.image_link != blank %}data-slide-link="{{ block.settings.image_link }}"{% endif %}
>

JavaScript: make slides with a link clickable (inside a <script> tag near the bottom of the file, above {% schema %})

document.addEventListener('DOMContentLoaded', function() {
function initSlideLinks() {
document.querySelectorAll('.slideshow__slide[data-slide-link]').forEach(function(slide) {
var href = slide.getAttribute('data-slide-link');
if (href) {
slide.style.cursor = 'pointer';
var mouseDownX = 0;
var mouseDownY = 0;
slide.addEventListener('mousedown', function(e) {
mouseDownX = e.clientX;
mouseDownY = e.clientY;
});
slide.addEventListener('click', function(e) {
if (
e.target.closest('.banner__buttons') ||
e.target.closest('.slider-button') ||
e.target.closest('.slideshow__autoplay') ||
e.target.closest('.slider-counter')
) { return; }
var distX = Math.abs(e.clientX - mouseDownX);
var distY = Math.abs(e.clientY - mouseDownY);
if (distX > 5 || distY > 5) { return; }
window.location.href = href;
});
}
});
}
initSlideLinks();
document.addEventListener('shopify:section:load', initSlideLinks);
});

Step 4: Schedule banners with start and end times

Scheduling runs in Liquid, with no JavaScript. Each time the page is built, the section compares the current time with every slide’s Show from and Hide after values and skips slides that are not live:

  1. Before the start time: the banner is hidden.
  2. Between start and end: the banner is shown in the slideshow.
  3. After the end time: the banner is removed automatically.
  4. No dates set: the banner always shows, like a normal Dawn slide.

Liquid 4a: count the slides that are live (before the slideshow markup, using Shopify’s date filter)

Liquid 4a: count the slides that are live (placed before the slideshow markup)

{%- liquid
  assign now_ts = 'now' | date: '%s'
  assign visible_total = 0
  for block in section.blocks
    assign block_is_live = true
    if block.settings.schedule_start != blank
      assign start_ts = block.settings.schedule_start | date: '%s'
      if start_ts != blank and now_ts < start_ts
        assign block_is_live = false
      endif
    endif
    if block.settings.schedule_end != blank
      assign end_ts = block.settings.schedule_end | date: '%s'
      if end_ts != blank and now_ts > end_ts
        assign block_is_live = false
      endif
    endif
    if block_is_live
      assign visible_total = visible_total | plus: 1
    endif
  endfor
  if request.design_mode
    assign visible_total = section.blocks.size
  endif
-%}

Liquid 4b: skip slides that are not live (inside the slide loop)

{%- assign visible_index = 0 -%}
{%- for block in section.blocks -%}
{%- liquid
assign block_is_live = true
if block.settings.schedule_start != blank
assign start_ts = block.settings.schedule_start | date: '%s'
if start_ts != blank and now_ts < start_ts
assign block_is_live = false
endif
endif
if block.settings.schedule_end != blank
assign end_ts = block.settings.schedule_end | date: '%s'
if end_ts != blank and now_ts > end_ts
assign block_is_live = false
endif
endif
-%}

{%- if block_is_live == false and request.design_mode == false -%}
{%- continue -%}
{%- endif -%}

{%- assign visible_index = visible_index | plus: 1 -%}

{% comment %} ...the slide markup from Steps 2 and 3 goes here... {% endcomment %}
{%- endfor -%}

Times use the store’s time zone in YYYY-MM-DD HH:MM format. Arrows and dots count only live slides. In the theme editor, every slide shows, with a “Not live” badge on the ones that are not.

Optional: editor badge (Liquid inside each slide, plus CSS in the same <style> tag)

{%- if request.design_mode and block_is_live == false -%}
  <div class="slideshow__scheduled-badge">
    Not live on storefront{% if block.settings.schedule_start != blank %} · starts {{ block.settings.schedule_start }}{% endif %}{% if block.settings.schedule_end != blank %} · ends {{ block.settings.schedule_end }}{% endif %}
  </div>
{%- endif -%}
.slideshow__scheduled-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 20;
  background: rgba(220, 38, 38, 0.9);
  color: #fff;
  font-size: 12px;
  line-height: 1.3;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: sans-serif;
  max-width: calc(100% - 20px);
}

Using it in the theme editor

Once the code is in place, merchants never touch it again. Everything is managed from the Shopify theme editor:

  1. Go to Online Store, then Themes, then Customize.
  2. Open the homepage and select the Slideshow section.
  3. Add or open a slide.
  4. Upload the desktop image and the mobile image.
  5. Choose a link to a page, product or collection.
  6. Enter the start and end date and time in the format shown under each field.
  7. Save. The banner now goes live and expires on schedule.

Slides that are not live yet (or have expired) still appear in the editor, marked with a red “Not live on storefront” badge, so nothing is lost.

Pitfalls and limits

These are the issues most likely to catch you out.

  • Date format errors. A mistyped date, such as 20-11-2026, may be read wrongly and give unexpected results. Keep the format hint visible in the editor and test every schedule in the preview.
  • Theme updates. Updating Dawn can overwrite your custom code. Keep a copy of your changes, or compare files before applying a new theme version.

Conclusion

With a few changes to one section file, Dawn’s slideshow now handles what real campaigns need: the right banner on every device, banners that send shoppers somewhere useful, and offers that start and end on their own. Merchants save time, and shoppers never see an outdated promotion.

If you run a store on Dawn, try this on a duplicate theme first, then roll it out once the checklist passes.

Have a question or want this built for your store? Contact us. We can add customizable sections to your Shopify theme.

How to Sync Business Central to Shopify with Power Automate

Najama · October 27, 2026 ·

Want to sync Business Central to Shopify without writing any code or paying for custom development? You can do it with Power Automate.

Business Central already has a standard Shopify connector, but it has some limitations, so we explored a new option. In this post we explain what the standard connector does and doesn’t do, how our solution works, how to build every step, and what to consider before going live.

What the Standard Shopify Connector Does (and Doesn’t)

Business Central has a built-in Shopify connector. It handles the main jobs well:

  • Syncing items and products between Business Central and Shopify
  • Sending inventory levels to Shopify
  • Importing Shopify orders as sales orders

But it doesn’t cover everything. In our case, we needed the outer (carton) quantity from each item’s unit of measure in Business Central to appear in Shopify. The standard connector doesn’t send that value to a Shopify field for you, and the usual answer is custom development. Instead, we built a flow with Power Automate.

How to Sync Business Central to Shopify with Power BI and Power Automate

The flow uses Business Central, Power BI and Power Automate together:

Business Central → Power BI → Power Automate → Shopify

Power BI reads the data from Business Central using your normal organisational login, so there is no app registration or developer involved. Power Automate then runs a scheduled flow that reads the Power BI data and pushes it to Shopify through the Shopify Admin GraphQL API, updating a variant metafield and matching on Item No. = SKU.

Before You Start

  • Power BI dataset with your Business Central data, refreshing on a schedule. In this example the table is Query1 with the columns Item_No, Code and Qty_per_Unit_of_Measure (yours will differ).
  • Shopify app from the Shopify Dev Dashboard with the scopes read_products and write_products. Copy its Client ID and Client secret. See Shopify’s guide to the client credentials grant.
  • Shopify metafield with namespace custom, key outer_qty and type integer.
  • Power Automate premium licence, because the HTTP action is a premium connector.
  • A test store. Always test there first, never on live products.

Part 1: Connect Power BI to Business Central

  1. In Power BI Desktop, connect to Business Central with the Business Central connector, choose your company and the table that holds the data you need, and load it.
  2. Check that the item numbers and quantities look right.
  3. Publish the model to the Power BI service, then sign in to the data source in the dataset’s settings and set up a scheduled refresh.

Part 2: Build the Power Automate Flow for Shopify

The finished flow looks like this:

Power Automate flow syncing Business Central data to Shopify

Step 1: Recurrence (the trigger)

Create a Scheduled cloud flow and set the interval you need, for example once a day. Schedule it to run after the Power BI dataset refresh finishes, because the flow can only send data that is already in the dataset. While you are building, you can use Manually trigger a flow and switch to Recurrence later.

Step 2: Get token (HTTP)

Add the premium HTTP action and rename it Get token. This action requests the access token that every call to the Shopify Admin API needs. The name matters, because later steps refer to it.

  • Method: POST
  • URI: https://YOUR-STORE.myshopify.com/admin/oauth/access_token
  • Headers: Content-Type = application/json
  • Body:
{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "grant_type": "client_credentials"
}

Later steps read the token with body(‘Get_token’)?[‘access_token’] (the space in the action name becomes an underscore). This action requests an access token that every call to the Shopify Admin API needs.

Get token HTTP action in Power Automate requesting a Shopify access token

Step 3: Run a query against a dataset (Power BI)

Add the Power BI action Run a query against a dataset, choose your Workspace and Dataset, and paste this DAX into Query text. Microsoft explains this action in its post on running queries against Power BI datasets in Power Automate.

EVALUATE
SELECTCOLUMNS(
  FILTER(
    Query1,
    Query1[Code] = "OUTER" && Query1[Item_No] <> ""
  ),
  "ItemNo", Query1[Item_No],
  "OuterQty", Query1[Qty_per_Unit_of_Measure]
)

This returns the item number and outer quantity for every item. First test tip: add && Query1[Item_No] = “30452” so the flow only touches one item, then remove it later.

Power Automate Run a query against a dataset step reading Business Central data from Power BI

Step 4: Apply to each

Add Control → Apply to each. In Select an output from previous steps, open the fx (expression) tab and enter:

first(body(‘Run_a_query_against_a_dataset’)?[‘results’])?[‘tables’][0]?[‘rows’]

In the loop’s Settings, turn on Concurrency control and set the degree of parallelism to 1.

Apply to each loop using Power BI query results in a Power Automate flow

Step 5: Find variant (inside the loop)

Add an HTTP action named Find variant. This Power Automate Shopify GraphQL query calls the Shopify Admin API to look up the variant by SKU.

  • Method: POST
  • URI: https://YOUR-STORE.myshopify.com/admin/api/2026-01/graphql.json
  • Headers:
    • Content-Type = application/json
    • X-Shopify-Access-Token = the expression body(‘Get_token’)?[‘access_token’]
  • Body:
{
  "query": "{ productVariants(first: 1, query: \"sku:'@{items('Apply_to_each')?['[ItemNo]']}'\") { nodes { id sku } } }"

}
Find variant HTTP action in Power Automate with a Shopify GraphQL query

If @{…} shows as plain text after saving, delete it and insert it again from the fx tab as items(‘Apply_to_each’)?[‘[ItemNo]’]. Shopify returns the variant’s id, or an empty list if no variant has that SKU.

Step 6: Condition (inside the loop)

Not every Business Central item exists in Shopify. Add Control → Condition under Find variant so the flow only updates items it actually found.

Condition step checking whether a Shopify variant was found
  • Left value (fx): length(body(‘Find_variant’)?[‘data’]?[‘productVariants’]?[‘nodes’])
  • Operator: is greater than
  • Right value: 0

In advanced mode this is:

@greater(length(body('Find_variant')?['data']?['productVariants']?['nodes']), 0)

If True, continue to the next step. If False, the item is skipped.

Step 7: Set outer qty (the True branch)

To update the Shopify metafield with Power Automate, add an HTTP action named Set outer qty, with the same method, URI and headers as Find variant. It calls the Shopify Admin API using the metafieldsSet mutation:

{

  "query": "mutation($m: [MetafieldsSetInput!]!) { metafieldsSet(metafields: $m) { metafields { key value } userErrors { field message } } }",
  "variables": {
    "m": [{
      "ownerId": "@{body('Find_variant')?['data']?['productVariants']?['nodes']?[0]?['id']}",
      "namespace": "custom",
      "key": "outer_qty",
      "type": "number_integer",
      "value": "@{items('Apply_to_each')?['[OuterQty]']}"
    }]
  }
}
Set outer qty HTTP action updating a Shopify metafield

After each run, check that userErrors is empty (userErrors: []). Shopify can reject a value even when the request itself succeeds.

Part 3: Test It Safely

  1. On your test store, use the single-item filter from Step 3, then choose Test → Manually → Run flow.
  2. Open the run and check each action: the token worked, the query returned your row, a variant was found, and userErrors is empty.
  3. In Shopify, confirm the metafield matches Business Central.
  4. Remove the filter and run the full list.

Before Going Live

  • It isn’t real time. A change in Business Central reaches Shopify only after the Power BI refresh and the next flow run, so schedule the flow after the refresh.
  • Watch for failed refreshes. If a refresh fails, the flow reads old data, so monitor your refreshes and runs.
  • Check licences and limits. Power BI refresh limits and the licences for the Power BI connector and HTTP action depend on your plan, so confirm them before you build.

Frequently Asked Questions

Do I need to write code or hire a developer?

No. The flow uses standard Power BI and Power Automate actions. You only copy the queries shown above.

Can I update a Shopify metafield with Power Automate for something other than outer quantity?

Yes. Change the DAX query to return the columns you need, and change the namespace, key and type in Step 7. Create the matching metafield in Shopify first. For help with other fields, talk to our Business Central support team.

Will Shopify update immediately when Business Central changes?

No. It updates after the next Power BI refresh and flow run.

Need Help With Your Business Central Shopify Integration?

Pragati Tech Services is a boutique agency in Nagpur, India that helps SMEs in Australia and the UK setup eCommerce stores using Shopify and WooCommerce. We also help businesses connect Business Central and their Shopify stores so product data stays accurate without manual work. Get in touch to talk about your setup.

Pragati Tech Services

Copyright © 2026