Hi everyone!
This is absolutely possible now!
When this was originally asked, it wasn’t technically feasible, but Shopify has made some major updates that make this exact use case work perfectly.
What Changed?
Shopify Flow now uses the 2025-01 version of the GraphQL Admin API, which includes the store credit mutations that weren’t available in earlier versions. This functionality is now accessible through Flow’s “Send Admin API request” action.
How to Set It Up
Here’s exactly how you can create that 1% order value loyalty program:
Trigger: Order paid
Action: Send Admin API request using the storeCreditAccountCredit
mutation
The API call you’ll use:
mutation storeCreditAccountCredit($id: ID!, $creditInput: StoreCreditAccountCreditInput!) {
storeCreditAccountCredit(id: $id, creditInput: $creditInput) {
storeCreditAccountTransaction {
amount { amount currencyCode }
account { id balance { amount currencyCode } }
}
userErrors { message field }
}
}
Variables:
{
"id": "gid://shopify/Customer/[CUSTOMER_ID_FROM_FLOW]",
"creditInput": {
"creditAmount": {
"amount": "[CALCULATED_1%_OF_ORDER_TOTAL]",
"currencyCode": "[ORDER_CURRENCY]"
}
}
}
You’ll use Flow’s built-in variables to calculate 1% of the order total and pass the customer ID automatically.
The API automatically creates a store credit account if one doesn’t exist, and customers can see their balance and use it at checkout when logged in. Plus, customers typically spend more than their store credit balance, increasing your average order value.
This is exactly the kind of creative use case that makes Flow so powerful - you’re building a custom loyalty program using native Shopify functionality without any third-party apps!
Hope this helps anyone looking to implement something similar. Feel free to ask if you need clarification on any of the technical details.
Cheers!
Shubham | Untechnickle
P.S. - For anyone wondering about the technical requirements, you’ll need the Store Credit functionality enabled in your Shopify admin, which is available for most current plans.