Articles on: F: Function Creator

How to show an error message at checkout to customers who have returned cash-on-delivery (COD) orders

Open F: Function-Creator


  1. Click the “Create Function” button
  2. Choose “Validation functions”
  3. Choose “Conditional cart & checkout validations”


  1. Give the rule a name
  2. In “When do you want this rule to work?”, change “Always” to “When certain conditions are met”
  3. In “Qualifier behaviour”, choose “All qualify” or “Any qualify”



  1. Click on “Add condition”
  2. Choose **“Customer tag” **from



  1. Enter the customer tag
  • I’m using the tag i applied to customers who returned
  1. Enter the amount and click “Add”
  • If you want, you can add more than one condition



  1. Click on “Add validation error” to choose where the error should appear and what message to show
  2. Choose “Target Placement” from the list



  1. Choose “Top of the checkout”
  2. Enter the error message you want to show



  • Block on failure: if enabled, checkout is blocked when the transform fails
  1. Click on “Create”




That's it! You've successfully created a checkout validation function for your Shopify store




Updated on: 26/11/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!