Skip to main content

Tapcart App Exclusive Discount

Drive installs and loyalty with app-only discounts

Updated over 2 weeks ago

How This App Works

This Shopify app will apply an order-level discount percentage of your choosing to an order when placed through the Tapcart app.

To make this discount one-time only, the app checks for the customer tag App exclusive discount used - if this tag is present, the customer is not eligible for another discount.


Installation Instructions

You can install the app in Shopify here.

  • After installing the app from the Shopify App Store you will be navigated to the app’s screen.

  • Choose the name for your discount and click “Create Discount” (default value is “App Exclusive Discount”).

  • After the discount is created you will see an interface to update the discount percentage. Set the value between 0 and 100.

Setup Shopify Flow

To make the discount one-time user only, you will also need to create a Shopify Flow:

  • Start when: order created, then

  • Check if: automatic discounts application title is equal to the name of your discount (e.g. “App Exclusive Discount”), and customer tag “App exclusive discount used“ (case sensitive) is not present, then

  • Add customer tag: “App exclusive discount used” (case sensitive).

Create a custom block

Add this custom block to either the Cart (if already on React) or home page. This simple block adds the sales-channel: tapcart cart attribute automatically after 500ms.You can copy and paste this directly into a new custom block in your dashboard.

import * as React from "react";

// https://docs.tapcart.com/docs/app-actions#cartupdateattributes
export default function AutoSetCartAttributesBlock({ blockConfig, useActions, __tapcartDashboard }) {
const webbridgeActions = useActions();

// Using useEffect to trigger the navigation after component mounts
React.useEffect(() => {
// Add a small delay to ensure the app is fully loaded
const timer = setTimeout(() => {

// Set cart attribute
webbridgeActions.action?.("cart/updateAttributes", {
attributes: [{key: 'sales-channel', value: 'tapcart'}]
});

}, 500) // 500ms delay for reliable execution

// Clean up the timer if component unmounts
return () => clearTimeout(timer)
}, []) // Empty dependency array means this runs once after initial render

if (__tapcartDashboard) {
return <div className="p-4">Auto Add Sales Channel Cart Attribute (No UI)</div>;
}

// Return null to make the component invisible (no rendering)
return null;
}


Did this answer your question?