{"id":6737,"date":"2023-03-28T18:23:15","date_gmt":"2023-03-28T18:23:15","guid":{"rendered":"https:\/\/www.getmesa.com/blog\/blog\/?p=6737"},"modified":"2025-12-22T23:33:51","modified_gmt":"2025-12-22T23:33:51","slug":"how-to-detect-coupon-code-abuse-using-chatgpt","status":"publish","type":"post","link":"https:\/\/www.getmesa.com/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/","title":{"rendered":"How To Detect Coupon Code Abuse Using ChatGPT"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">You&#8217;re undoubtedly familiar with the power of coupon codes in driving sales and attracting new customers to your online store. However, in today&#8217;s highly competitive digital marketplace, coupon code abuse has become an increasingly pressing issue, eroding profit margins and undermining the effectiveness of your marketing efforts. Fear not! The groundbreaking capabilities of ChatGPT are here to help.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this blog article, we will explore how ecommerce managers using Shopify can harness the power of <a href=\"https:\/\/www.getmesa.com\/apps\/shopify\/integrate\/chatgpt\">ChatGPT<\/a> to detect and prevent coupon code abuse.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By leveraging this cutting-edge <a href=\"https:\/\/www.getmesa.com\/blog\/guide-to-ecommerce-ai\/\">AI technology<\/a>, you can ensure that your promotional campaigns remain effective and targeted while safeguarding your store&#8217;s bottom line.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From identifying common abuse patterns to implementing advanced detection mechanisms, we&#8217;ll guide you through the process of creating a robust, AI-driven strategy for protecting your store against coupon code misuse. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, let&#8217;s dive in and see how ChatGPT can revolutionize your approach to managing promotional campaigns and fortify your ecommerce business against abuse.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><br><strong>TL;DR: Skip the step-by-step tutorial.\u00a0<\/strong>Use this template to alert you if coupon code abuse is detected with just a few clicks.<\/p>\n\n\n<div class=\"mesa-template-backend frontend-hidden\">\n    <p><strong>MESA Template ID<\/strong><\/p>\n    <p>slack-alert-coupon-code-abuse-detection<\/p>\n<\/div>\n\n<div class=\"mesa-template\" data-template=\"slack-alert-coupon-code-abuse-detection\"><\/div>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\t\t<style>.mesa-template-backend {\n    background: rgba(139, 139, 150, 0.1);\n    padding: 22px;\n}\n\n.mesa-template-backend h5,\n.mesa-template-backend p {\n    margin: 0 0 5px;\n}\n\n.mesa-template-backend p {\n    font-size: 16px;\n}\n\n.mesa-template-backend p:last-child {\n    display: inline-block;\n    background: #fff;\n    padding: 5px 10px;\n}\n\n.mesa-template-backend p strong {\n    font-size: 12px;\n}<\/style>\n\t\t\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_83 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents:<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.getmesa.com/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#Step-by-step-tutorial-video\" >Step-by-step tutorial video<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.getmesa.com/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#How-to-use-ChatGPT-to-uncover-coupon-code-abuse\" >How to use ChatGPT to uncover coupon code abuse<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.getmesa.com/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#Popular-coupon-code-abuse-patterns\" >Popular coupon code abuse patterns<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.getmesa.com/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#Multiple-account-creation\" >Multiple account creation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.getmesa.com/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#Coupon-stacking\" >Coupon stacking<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.getmesa.com/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#Code-sharing-on-social-media-or-unauthorized-websites\" >Code sharing on social media or unauthorized websites<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.getmesa.com/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#Workflow-wrap-up\" >Workflow wrap-up<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-step-by-step-tutorial-video\"><span class=\"ez-toc-section\" id=\"Step-by-step-tutorial-video\"><\/span>Step-by-step tutorial video<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"How to detect coupon abuse with ChatGPT\" width=\"1170\" height=\"658\" src=\"https:\/\/www.youtube.com\/embed\/FwuJi1anhlg?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><figcaption class=\"wp-element-caption\">Watch how to uncover coupon code abuse with Shopify ChatGPT workflows<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-use-chatgpt-to-uncover-coupon-code-abuse\"><span class=\"ez-toc-section\" id=\"How-to-use-ChatGPT-to-uncover-coupon-code-abuse\"><\/span>How to use ChatGPT to uncover coupon code abuse<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<div class=\"schema-how-to wp-block-yoast-how-to-block\"><p class=\"schema-how-to-total-time\"><span class=\"schema-how-to-duration-time-text\">Time needed:&nbsp;<\/span>10 minutes<\/p><p class=\"schema-how-to-description\">We&#8217;ll make 2 workflows to achieve the desired results. The first workflow will add every order total and its discounted totals to a database in MESA. The second workflow will ask ChatGPT if the values appear higher than usual. If so, the workflow will send an email notification.<br><br>To get started, be sure to\u00a0<a href=\"http:\/\/app.getmesa.com\/install\" target=\"_blank\" rel=\"noreferrer noopener\">get MESA<\/a>\u00a0and connect it to your Shopify store. Then, follow these simple, step-by-step instructions. <\/p> <ol class=\"schema-how-to-steps\"><li class=\"schema-how-to-step\" id=\"how-to-step-1679941175866\"><strong class=\"schema-how-to-step-name\">For the first workflow, choose the Shopify trigger app, then choose the Order Created step<\/strong> <p class=\"schema-how-to-step-text\">The trigger step is the event that starts this workflow.<img loading=\"lazy\" decoding=\"async\" width=\"1512\" height=\"865\" class=\"wp-image-6739\" alt=\"shopify order created\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/shopify-order-created.png\" style=\"max-width:100%;\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-order-created.png 1512w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-order-created-300x172.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-order-created-1024x586.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-order-created-768x439.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-order-created-544x311.png 544w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-order-created-350x200.png 350w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-order-created-752x430.png 752w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-order-created-280x160.png 280w\" sizes=\"auto, (max-width: 1512px) 100vw, 1512px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679943047820\"><strong class=\"schema-how-to-step-name\">Next, add the target app, Data by MESA<\/strong> <p class=\"schema-how-to-step-text\">Use the search field to locate the Data by MESA. This built-in app lets you store data in MESA without setting up and configuring an external database. <img loading=\"lazy\" decoding=\"async\" width=\"3024\" height=\"1730\" class=\"wp-image-6741\" style=\"max-width:100%;\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/data-by-mesa-action-step.png\" alt=\"data by mesa action step\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-action-step.png 3024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-action-step-300x172.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-action-step-1024x586.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-action-step-768x439.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-action-step-1536x879.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-action-step-2048x1172.png 2048w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-action-step-1920x1098.png 1920w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-action-step-544x311.png 544w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-action-step-350x200.png 350w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-action-step-752x430.png 752w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-action-step-280x160.png 280w\" sizes=\"auto, (max-width: 3024px) 100vw, 3024px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679943352539\"><strong class=\"schema-how-to-step-name\">Choose the Create Record<\/strong> <p class=\"schema-how-to-step-text\">This action step will create a database record every time a new order is received.<img loading=\"lazy\" decoding=\"async\" width=\"3024\" height=\"2148\" class=\"wp-image-6776\" alt=\"data by mesa create record\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/data-by-mesa-create-record.png\" style=\"max-width:100%;\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-create-record.png 3024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-create-record-300x213.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-create-record-1024x727.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-create-record-768x546.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-create-record-1536x1091.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-create-record-2048x1455.png 2048w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-create-record-1920x1364.png 1920w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-create-record-438x311.png 438w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-create-record-282x200.png 282w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-create-record-605x430.png 605w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/data-by-mesa-create-record-225x160.png 225w\" sizes=\"auto, (max-width: 3024px) 100vw, 3024px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679943768908\"><strong class=\"schema-how-to-step-name\">Configure your new database<\/strong> <p class=\"schema-how-to-step-text\">Create a new table called <em>Orders Coupon Code Abuse<\/em>. Then under the Columns section, click the button to Add Column. We&#8217;ll be adding custom columns for various order data defined in the subsequent steps.<img loading=\"lazy\" decoding=\"async\" width=\"1512\" height=\"1040\" class=\"wp-image-6768\" style=\"max-width:100%;\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/database-create-record.png\" alt=\"database create record\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-create-record.png 1512w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-create-record-300x206.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-create-record-1024x704.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-create-record-768x528.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-create-record-452x311.png 452w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-create-record-291x200.png 291w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-create-record-625x430.png 625w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-create-record-233x160.png 233w\" sizes=\"auto, (max-width: 1512px) 100vw, 1512px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679945004102\"><strong class=\"schema-how-to-step-name\">Use the variable selector to connect new order data to database table columns<\/strong> <p class=\"schema-how-to-step-text\">For your first custom column, enter &#8220;<strong>Order #<\/strong>&#8221; in the name field, choose <strong>Number<\/strong> for the type field then use the variable selector to choose the <strong>Number<\/strong> variable from the previous Order Created step.<br\/><br\/>Repeat this to create these additional columns:<br\/><br\/>1. (<em>Name<\/em>) <strong>Order Total<\/strong>, (<em>Type<\/em>) <strong>Number<\/strong>, (<em>Value<\/em>) <strong>Order Created > Current Total Price<\/strong><br\/>2. (<em>Name<\/em>) <strong>Order Total Discounts<\/strong>, (<em>Type<\/em>) <strong>Number<\/strong>, (<em>Value<\/em>) <strong>Order Created > Current Total Discounts<\/strong><br\/>3. (<em>Name<\/em>) <strong>Order Date<\/strong>, (<em>Type<\/em>) <strong>Date<\/strong>, (<em>Value<\/em>) <strong>Order Created > Created At<\/strong><br\/><img loading=\"lazy\" decoding=\"async\" width=\"1512\" height=\"1805\" class=\"wp-image-6767\" style=\"max-width:100%;\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/database-table-variables-1.png\" alt=\"database table variables\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-table-variables-1.png 1512w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-table-variables-1-251x300.png 251w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-table-variables-1-858x1024.png 858w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-table-variables-1-768x917.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-table-variables-1-1287x1536.png 1287w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-table-variables-1-261x311.png 261w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-table-variables-1-168x200.png 168w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-table-variables-1-360x430.png 360w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-table-variables-1-134x160.png 134w\" sizes=\"auto, (max-width: 1512px) 100vw, 1512px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679947982234\"><strong class=\"schema-how-to-step-name\">Save, then name your workflow<\/strong> <p class=\"schema-how-to-step-text\">We&#8217;ll call this workflow, <em>New Orders to Orders Database<\/em>. Then, be sure to add your email to receive any notifications about this workflow.<img loading=\"lazy\" decoding=\"async\" width=\"1512\" height=\"808\" class=\"wp-image-6746\" style=\"max-width:100%;\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/shopify-database-save.png\" alt=\"save your database workflow\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-database-save.png 1512w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-database-save-300x160.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-database-save-1024x547.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-database-save-768x410.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-database-save-555x297.png 555w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-database-save-360x192.png 360w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-database-save-805x430.png 805w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-database-save-290x155.png 290w\" sizes=\"auto, (max-width: 1512px) 100vw, 1512px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679948094926\"><strong class=\"schema-how-to-step-name\">Turn your automation On<\/strong> <p class=\"schema-how-to-step-text\">Be sure to enable your new workflow automation. This workflow is complete so let&#8217;s make a new workflow based on the saved database records.<img loading=\"lazy\" decoding=\"async\" width=\"3024\" height=\"1730\" class=\"wp-image-6777\" alt=\"shopify orders to database\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/shopify-orders-to-database.png\" style=\"max-width:100%;\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-orders-to-database.png 3024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-orders-to-database-300x172.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-orders-to-database-1024x586.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-orders-to-database-768x439.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-orders-to-database-1536x879.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-orders-to-database-2048x1172.png 2048w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-orders-to-database-1920x1098.png 1920w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-orders-to-database-544x311.png 544w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-orders-to-database-350x200.png 350w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-orders-to-database-752x430.png 752w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-orders-to-database-280x160.png 280w\" sizes=\"auto, (max-width: 3024px) 100vw, 3024px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679948768516\"><strong class=\"schema-how-to-step-name\">For the next workflow, select the Data by MESA trigger app then, choose the Record Created step<\/strong> <p class=\"schema-how-to-step-text\">On the table field, be sure to select the database called <em>Orders Coupon Code Abuse<\/em> that we created in the previous workflow. Under the advanced options, you can change how often this workflow run after the event occurs. <img loading=\"lazy\" decoding=\"async\" width=\"3024\" height=\"1730\" class=\"wp-image-6780\" alt=\"database record created\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/database-record-created-trigger-app.png\" style=\"max-width:100%;\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-record-created-trigger-app.png 3024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-record-created-trigger-app-300x172.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-record-created-trigger-app-1024x586.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-record-created-trigger-app-768x439.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-record-created-trigger-app-1536x879.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-record-created-trigger-app-2048x1172.png 2048w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-record-created-trigger-app-1920x1098.png 1920w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-record-created-trigger-app-544x311.png 544w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-record-created-trigger-app-350x200.png 350w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-record-created-trigger-app-752x430.png 752w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-record-created-trigger-app-280x160.png 280w\" sizes=\"auto, (max-width: 3024px) 100vw, 3024px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679949022310\"><strong class=\"schema-how-to-step-name\">Next, choose the Data by MESA app. Then, select the Query step.<\/strong> <p class=\"schema-how-to-step-text\"><img loading=\"lazy\" decoding=\"async\" width=\"3024\" height=\"2038\" class=\"wp-image-6781\" alt=\"database query table\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/database-query-table.png\" style=\"max-width:100%;\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table.png 3024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-300x202.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-1024x690.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-768x518.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-1536x1035.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-2048x1380.png 2048w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-1920x1294.png 1920w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-461x311.png 461w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-297x200.png 297w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-638x430.png 638w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-237x160.png 237w\" sizes=\"auto, (max-width: 3024px) 100vw, 3024px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679949332452\"><strong class=\"schema-how-to-step-name\">Select the Orders table that we created from the previous workflow<\/strong> <p class=\"schema-how-to-step-text\">Be sure the Orders table is selected. <img loading=\"lazy\" decoding=\"async\" width=\"3024\" height=\"1986\" class=\"wp-image-6782\" style=\"max-width:100%;\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/database-query-table-selected.png\" alt=\"database query table selected\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-selected.png 3024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-selected-300x197.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-selected-1024x673.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-selected-768x504.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-selected-1536x1009.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-selected-2048x1345.png 2048w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-selected-1920x1261.png 1920w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-selected-474x311.png 474w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-selected-305x200.png 305w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-selected-655x430.png 655w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-query-table-selected-244x160.png 244w\" sizes=\"auto, (max-width: 3024px) 100vw, 3024px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1680012622849\"><strong class=\"schema-how-to-step-name\">Under Advanced Options, add this custom query<\/strong> <p class=\"schema-how-to-step-text\">This step will query the database table we specify and fetch all the data within it. This query is looking for the same database columns we created in the first workflow so be sure they match.<br\/><br\/><code>SELECT TO_CHAR(\"Order Date\", 'yyyy-mm-dd'), SUM(\"Order Total\") as total, SUM(\"Order Total Discounts\") as total_discounts, ROUND(SUM(\"Order Total Discounts\") \/ SUM(\"Order Total\"), 2) as percentage FROM \"Orders Coupon Code Abuse\" GROUP BY TO_CHAR(\"Order Date\", 'yyyy-mm-dd') ORDER BY TO_CHAR(\"Order Date\", 'yyyy-mm-dd')<\/code><br\/><img loading=\"lazy\" decoding=\"async\" width=\"3024\" height=\"2462\" class=\"wp-image-6794\" style=\"max-width:100%;\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/database-custom-query.png\" alt=\"database custom query\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-custom-query.png 3024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-custom-query-300x244.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-custom-query-1024x834.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-custom-query-768x625.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-custom-query-1536x1251.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-custom-query-2048x1667.png 2048w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-custom-query-1920x1563.png 1920w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-custom-query-382x311.png 382w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-custom-query-246x200.png 246w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-custom-query-528x430.png 528w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/database-custom-query-197x160.png 197w\" sizes=\"auto, (max-width: 3024px) 100vw, 3024px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679949432641\"><strong class=\"schema-how-to-step-name\">Next, add Code by MESA to the workflow<\/strong> <p class=\"schema-how-to-step-text\">We need to make the results of the database query available as a JSON variable for use in another step of this workflow. Optionally, add a description value of &#8220;Convert query to JSON&#8221;<img loading=\"lazy\" decoding=\"async\" width=\"3024\" height=\"2110\" class=\"wp-image-6783\" alt=\"code by mesa convert query to json\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/code-by-mesa.png\" style=\"max-width:100%;\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/code-by-mesa.png 3024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/code-by-mesa-300x209.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/code-by-mesa-1024x714.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/code-by-mesa-768x536.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/code-by-mesa-1536x1072.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/code-by-mesa-2048x1429.png 2048w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/code-by-mesa-1920x1340.png 1920w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/code-by-mesa-446x311.png 446w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/code-by-mesa-287x200.png 287w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/code-by-mesa-616x430.png 616w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/code-by-mesa-229x160.png 229w\" sizes=\"auto, (max-width: 3024px) 100vw, 3024px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679949953054\"><strong class=\"schema-how-to-step-name\">Click Edit Code to open the editor. Then, paste this code snippet.<\/strong> <p class=\"schema-how-to-step-text\">Under the code comment Add your custom code here, add this snippet:<br\/><br\/><code>Mesa.log.info(\"payload\", payload); <\/code><br\/><code>let newPayload = {}; newPayload.json_results = JSON.stringify(payload);<\/code><br\/><br\/>Save then, close the editor view.<br\/><br\/><img loading=\"lazy\" decoding=\"async\" width=\"1512\" height=\"865\" class=\"wp-image-6754\" style=\"max-width:100%;\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/custom-code.png\" alt=\"custom code\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/custom-code.png 1512w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/custom-code-300x172.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/custom-code-1024x586.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/custom-code-768x439.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/custom-code-544x311.png 544w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/custom-code-350x200.png 350w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/custom-code-752x430.png 752w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/custom-code-280x160.png 280w\" sizes=\"auto, (max-width: 1512px) 100vw, 1512px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679950386390\"><strong class=\"schema-how-to-step-name\">Next, choose the ChatGPT action app<\/strong> <p class=\"schema-how-to-step-text\">Be sure to add your account credentials by following the simple link and instructions to obtain your API key.<img loading=\"lazy\" decoding=\"async\" width=\"3024\" height=\"2196\" class=\"wp-image-6784\" alt=\"connect shopify to chatgpt\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/chatgpt-credentials.png\" style=\"max-width:100%;\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chatgpt-credentials.png 3024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chatgpt-credentials-300x218.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chatgpt-credentials-1024x744.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chatgpt-credentials-768x558.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chatgpt-credentials-1536x1115.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chatgpt-credentials-2048x1487.png 2048w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chatgpt-credentials-1920x1394.png 1920w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chatgpt-credentials-428x311.png 428w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chatgpt-credentials-275x200.png 275w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chatgpt-credentials-592x430.png 592w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chatgpt-credentials-220x160.png 220w\" sizes=\"auto, (max-width: 3024px) 100vw, 3024px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679950660308\"><strong class=\"schema-how-to-step-name\">Edit the Step Configuration then choose the highest Model preferred. <\/strong> <p class=\"schema-how-to-step-text\">Your API key will decide which model is available. Click the <strong>Add Set<\/strong> button when you&#8217;re ready.<img loading=\"lazy\" decoding=\"async\" width=\"3024\" height=\"2648\" class=\"wp-image-6785\" alt=\"chatgpt add prompt\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/chagpt-add-prompt-instructions.png\" style=\"max-width:100%;\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-add-prompt-instructions.png 3024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-add-prompt-instructions-300x263.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-add-prompt-instructions-1024x897.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-add-prompt-instructions-768x673.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-add-prompt-instructions-1536x1345.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-add-prompt-instructions-2048x1793.png 2048w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-add-prompt-instructions-1920x1681.png 1920w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-add-prompt-instructions-355x311.png 355w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-add-prompt-instructions-228x200.png 228w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-add-prompt-instructions-491x430.png 491w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-add-prompt-instructions-183x160.png 183w\" sizes=\"auto, (max-width: 3024px) 100vw, 3024px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679951016167\"><strong class=\"schema-how-to-step-name\">Instruct ChatGPT to detect coupon abuse<\/strong> <p class=\"schema-how-to-step-text\">Use the following prompt in the Content field:<br\/><br\/><code>Included is a JSON result showing order totals by day including their discount amounts. Is the discount rate higher than usual? Reply only \"Yes\" or \"No\" :<br\/>{{ custom.json_results })<\/code><br\/><br\/>The custom variable comes from the Code by MESA step and isn&#8217;t available from the variable selector view so include it when pasting the instructions.<img loading=\"lazy\" decoding=\"async\" width=\"3024\" height=\"3224\" class=\"wp-image-6787\" style=\"max-width:100%;\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/chagpt-detect-coupon-code-abuse-message.png\" alt=\"chatgpt detect coupon code abuse\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-detect-coupon-code-abuse-message.png 3024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-detect-coupon-code-abuse-message-281x300.png 281w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-detect-coupon-code-abuse-message-960x1024.png 960w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-detect-coupon-code-abuse-message-768x819.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-detect-coupon-code-abuse-message-1441x1536.png 1441w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-detect-coupon-code-abuse-message-1921x2048.png 1921w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-detect-coupon-code-abuse-message-1920x2047.png 1920w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-detect-coupon-code-abuse-message-292x311.png 292w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-detect-coupon-code-abuse-message-188x200.png 188w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-detect-coupon-code-abuse-message-403x430.png 403w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/chagpt-detect-coupon-code-abuse-message-150x160.png 150w\" sizes=\"auto, (max-width: 3024px) 100vw, 3024px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679951321298\"><strong class=\"schema-how-to-step-name\">Next, add Filter by MESA<\/strong> <p class=\"schema-how-to-step-text\">Search then, select the Filter by MESA app action.<img loading=\"lazy\" decoding=\"async\" width=\"3024\" height=\"2370\" class=\"wp-image-6788\" alt=\"detect coupon code abuse filter chatgpt\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/detect-coupon-code-abuse-filter.png\" style=\"max-width:100%;\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-abuse-filter.png 3024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-abuse-filter-300x235.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-abuse-filter-1024x803.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-abuse-filter-768x602.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-abuse-filter-1536x1204.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-abuse-filter-2048x1605.png 2048w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-abuse-filter-1920x1505.png 1920w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-abuse-filter-397x311.png 397w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-abuse-filter-255x200.png 255w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-abuse-filter-549x430.png 549w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-abuse-filter-204x160.png 204w\" sizes=\"auto, (max-width: 3024px) 100vw, 3024px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679951525143\"><strong class=\"schema-how-to-step-name\">Add the ChatGPT response to filter against<\/strong> <p class=\"schema-how-to-step-text\">Search then choose the <strong>Content<\/strong> variable. When prompted, click the <strong>Return first item<\/strong> button. Since we&#8217;re not engaging in a conversion, we&#8217;re only interested in the first response.<img loading=\"lazy\" decoding=\"async\" width=\"3024\" height=\"1730\" class=\"wp-image-6789\" alt=\"detect coupon code filter chatgpt\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt.png\" style=\"max-width:100%;\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt.png 3024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-300x172.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-1024x586.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-768x439.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-1536x879.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-2048x1172.png 2048w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-1920x1098.png 1920w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-544x311.png 544w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-350x200.png 350w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-752x430.png 752w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-280x160.png 280w\" sizes=\"auto, (max-width: 3024px) 100vw, 3024px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679951697602\"><strong class=\"schema-how-to-step-name\">Update the filter to look for the response, Yes<\/strong> <p class=\"schema-how-to-step-text\">After the variable has been added to the condition logic, be sure the filter is looking to see it equals the value, Yes.<img loading=\"lazy\" decoding=\"async\" width=\"3024\" height=\"2796\" class=\"wp-image-6790\" alt=\"detect coupon code filter chatgpt response\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-response.png\" style=\"max-width:100%;\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-response.png 3024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-response-300x277.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-response-1024x947.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-response-768x710.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-response-1536x1420.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-response-2048x1894.png 2048w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-response-1920x1775.png 1920w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-response-336x311.png 336w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-response-216x200.png 216w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-response-465x430.png 465w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-response-173x160.png 173w\" sizes=\"auto, (max-width: 3024px) 100vw, 3024px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679951978131\"><strong class=\"schema-how-to-step-name\">Next, add Email by MESA to send yourself a notification<\/strong> <p class=\"schema-how-to-step-text\">Add the Email by MESA app action, then enter your email, subject, and a brief message to investigate your order activity for coupon code abuse.<img loading=\"lazy\" decoding=\"async\" width=\"3024\" height=\"2960\" class=\"wp-image-6791\" alt=\"detect coupon code email status\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/detect-coupon-code-email-status.png\" style=\"max-width:100%;\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-email-status.png 3024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-email-status-300x294.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-email-status-1024x1002.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-email-status-768x752.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-email-status-1536x1503.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-email-status-2048x2005.png 2048w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-email-status-1920x1879.png 1920w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-email-status-318x311.png 318w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-email-status-204x200.png 204w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-email-status-439x430.png 439w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/detect-coupon-code-email-status-163x160.png 163w\" sizes=\"auto, (max-width: 3024px) 100vw, 3024px\" \/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1679952158638\"><strong class=\"schema-how-to-step-name\">Save then, turn on your workflow<\/strong> <p class=\"schema-how-to-step-text\">Be sure to name your workflow and enter an email address for any related workflow notifications.<img loading=\"lazy\" decoding=\"async\" width=\"3024\" height=\"1982\" class=\"wp-image-6792\" alt=\"workflow detect coupon code abuse\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/workflow-detect-coupon-code-abuse.png\" style=\"max-width:100%;\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/workflow-detect-coupon-code-abuse.png 3024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/workflow-detect-coupon-code-abuse-300x197.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/workflow-detect-coupon-code-abuse-1024x671.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/workflow-detect-coupon-code-abuse-768x503.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/workflow-detect-coupon-code-abuse-1536x1007.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/workflow-detect-coupon-code-abuse-2048x1342.png 2048w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/workflow-detect-coupon-code-abuse-1920x1258.png 1920w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/workflow-detect-coupon-code-abuse-475x311.png 475w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/workflow-detect-coupon-code-abuse-305x200.png 305w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/workflow-detect-coupon-code-abuse-656x430.png 656w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/workflow-detect-coupon-code-abuse-244x160.png 244w\" sizes=\"auto, (max-width: 3024px) 100vw, 3024px\" \/><\/p> <\/li><\/ol><\/div>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><br><strong>Save yourself the setup. <\/strong>Use this template instead:<\/p>\n\n\n<div class=\"mesa-template-backend frontend-hidden\">\n    <p><strong>MESA Template ID<\/strong><\/p>\n    <p>slack-alert-coupon-code-abuse-detection<\/p>\n<\/div>\n\n<div class=\"mesa-template\" data-template=\"slack-alert-coupon-code-abuse-detection\"><\/div>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">See this workflow in action:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Workflow in action! Detect Coupon Code Abuse on Shopify Using ChatGPT\" width=\"1170\" height=\"658\" src=\"https:\/\/www.youtube.com\/embed\/MB-moqrTxGM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><figcaption class=\"wp-element-caption\">See this workflow in action!<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Popular-coupon-code-abuse-patterns\"><\/span>Popular coupon code abuse patterns<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This workflow tutorial is a simple example of leveraging ChatGPT to keep its eye on your revenue. Depending on how you deploy coupon codes, you could easily add more sophistication to this workflow. Your goal should be to make this as unique as your business so it&#8217;s reliably alerting you to potential problems before they make a bigger impact on your business.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">AI systems like GPT-4 have the potential to detect coupon code abuse patterns more efficiently and accurately than manual human monitoring. All thanks to their ability to process large volumes of data and identify patterns quickly. <br><br>Here are a few common coupon code abuse patterns that AI can easily detect better than a human doing the same tasks manually:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Multiple-account-creation\"><\/span>Multiple account creation<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">AI can recognize when users create multiple accounts with different email addresses to take advantage of first-time customer discounts or one-time-use coupon codes. By analyzing registration data, IP addresses, and browsing patterns, AI can identify suspicious behavior and flag potential abusers.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Coupon-stacking\"><\/span>Coupon stacking<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Additionally, some abusers may attempt to stack multiple coupon codes together for a single purchase, resulting in significantly larger discounts than intended. AI systems can identify unusual patterns in the application of multiple coupons and flag transactions that may be abusing this tactic.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Code-sharing-on-social-media-or-unauthorized-websites\"><\/span>Code sharing on social media or unauthorized websites<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Lastly, AI can monitor and track the spread of your coupon codes across the internet, identifying instances where they have been shared on unauthorized websites, social media platforms, or forums. This can help you detect when your codes are being misused and take appropriate action to minimize their impact.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Workflow-wrap-up\"><\/span>Workflow wrap-up<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It is essential to stay ahead of coupon code abuse in order to maintain the effectiveness of your marketing campaigns and protect your store&#8217;s profitability. By integrating ChatGPT into your Shopify store, you can leverage the power of advanced AI technology to detect, prevent, and mitigate the impact of coupon code misuse.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In summary, we&#8217;ve explored the importance of understanding common abuse patterns, utilizing ChatGPT&#8217;s capabilities to detect anomalies, and implementing strategic prevention measures to maintain the integrity of your promotional campaigns. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By embracing these innovative AI-driven solutions, you can fortify your ecommerce business against the negative consequences of coupon code abuse, ensuring a more secure and profitable future for your online store.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Additionally, as you venture into this new frontier of AI-powered coupon code management, remember that vigilance and adaptation are key. Continuously assess the effectiveness of your strategies and stay informed about the latest AI advancements to stay one step ahead of abusers. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With ChatGPT on your side, you can be confident that your ecommerce store is better prepared to tackle the challenges of coupon code abuse and achieve long-term success in today&#8217;s competitive digital landscape.<\/p>\n\n\n\n<div class=\"card-next-steps\">\n\t<div class=\"card__content\">\n\t\t<h4>What to do next&#8230;<\/h4>\n<p>The fastest way to see automation working in your store is to start with a single workflow.<\/p>\n<ol>\n<li><a href=\"https:\/\/www.getmesa.com\/pricing\"><strong>Try MESA free<\/strong><\/a> \u2014 start a 7-day free trial and get your first workflow running.<\/li>\n<li><a href=\"https:\/\/www.getmesa.com\/templates\"><strong>Browse the template library<\/strong><\/a> \u2014 pre-built workflows for the most common Shopify automation tasks.<\/li>\n<li><a href=\"https:\/\/www.getmesa.com\/yedric\"><strong>Talk to Yedric<\/strong><\/a> \u2014 describe what you want to automate, and let our AI assistant build it for you.<\/li>\n<li><a href=\"https:\/\/www.getmesa.com\/support\"><strong>Get free workflow setup<\/strong><\/a> \u2014 MESA&#8217;s team will build your first workflow at no cost.<\/li>\n<\/ol>\n\t<\/div><!-- \/.card__content -->\n\n\t\n<div class=\"socials card__socials\">\n\t<ul>\n\t\t\t\t\t<li>\n\t\t\t\t<a href=\"https:\/\/twitter.com\/getmesa\" target=\"_blank\">\n\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/twitter-icon.svg\" class=\"attachment-small size-small\" alt=\"icon: twitter\" \/>\t\t\t\t<\/a>\n\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t<a href=\"https:\/\/www.youtube.com\/@getmesa\" target=\"_blank\">\n\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/youtube-icon.svg\" class=\"attachment-small size-small\" alt=\"icon: youtube\" \/>\t\t\t\t<\/a>\n\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t<a href=\"https:\/\/www.linkedin.com\/company\/9754608\/\" target=\"_blank\">\n\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/linkedin-icon.svg\" class=\"attachment-small size-small\" alt=\"linkedin icon\" \/>\t\t\t\t<\/a>\n\t\t\t<\/li>\n\t\t\t<\/ul>\n<\/div><!-- \/.socials -->\n<\/div><!-- \/.card-next-steps -->\n","protected":false},"excerpt":{"rendered":"<p>You&#8217;re undoubtedly familiar with the power of coupon codes in driving sales and attracting new customers to your online store&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":6657,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[48],"tags":[218,219,285,286,280,269,66],"class_list":["post-6737","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-workflow-tutorials","tag-ai","tag-chatgpt","tag-code","tag-data","tag-email","tag-filter","tag-shopify"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Detect Coupon Code Abuse Using ChatGPT - MESA<\/title>\n<meta name=\"description\" content=\"Learn how to leverage ChatGPT to detect coupon code abuse in your Shopify orders and protect your store&#039;s bottom line.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Detect Coupon Code Abuse Using ChatGPT - MESA\" \/>\n<meta property=\"og:description\" content=\"Learn how to leverage ChatGPT to detect coupon code abuse in your Shopify orders and protect your store&#039;s bottom line.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/\" \/>\n<meta property=\"og:site_name\" content=\"MESA\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/web.facebook.com\/mesabyshoppad\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-28T18:23:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-22T23:33:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/tutorial-shopify-to-chatgbt.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ryan ODonnell\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@getmesa\" \/>\n<meta name=\"twitter:site\" content=\"@getmesa\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ryan ODonnell\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"22 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/\"},\"author\":{\"name\":\"Ryan ODonnell\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/#\\\/schema\\\/person\\\/37dc9b968192b2be49af3950022179cc\"},\"headline\":\"How To Detect Coupon Code Abuse Using ChatGPT\",\"datePublished\":\"2023-03-28T18:23:15+00:00\",\"dateModified\":\"2025-12-22T23:33:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/\"},\"wordCount\":1480,\"publisher\":{\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.getmesa.com/blog\\\/wp-content\\\/uploads\\\/tutorial-shopify-to-chatgbt.jpg\",\"keywords\":[\"AI\",\"ChatGPT\",\"code\",\"data\",\"email\",\"filter\",\"shopify\"],\"articleSection\":[\"Workflow Tutorials\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/\",\"name\":\"How To Detect Coupon Code Abuse Using ChatGPT - MESA\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.getmesa.com/blog\\\/wp-content\\\/uploads\\\/tutorial-shopify-to-chatgbt.jpg\",\"datePublished\":\"2023-03-28T18:23:15+00:00\",\"dateModified\":\"2025-12-22T23:33:51+00:00\",\"description\":\"Learn how to leverage ChatGPT to detect coupon code abuse in your Shopify orders and protect your store's bottom line.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.getmesa.com/blog\\\/wp-content\\\/uploads\\\/tutorial-shopify-to-chatgbt.jpg\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com/blog\\\/wp-content\\\/uploads\\\/tutorial-shopify-to-chatgbt.jpg\",\"width\":1280,\"height\":720,\"caption\":\"shopify chatgpt\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Detect Coupon Code Abuse Using ChatGPT\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/\",\"name\":\"MESA\",\"description\":\"Discover how to automate your Shopify growth\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/#organization\",\"name\":\"MESA - AI automation Platform\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.getmesa.com/blog\\\/wp-content\\\/uploads\\\/mesa-shoppad.jpeg\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com/blog\\\/wp-content\\\/uploads\\\/mesa-shoppad.jpeg\",\"width\":225,\"height\":225,\"caption\":\"MESA - AI automation Platform\"},\"image\":{\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/web.facebook.com\\\/mesabyshoppad\\\/\",\"https:\\\/\\\/x.com\\\/getmesa\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/shoppad\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCqsf_WhcGEsZMvms1idivyw\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/#\\\/schema\\\/person\\\/37dc9b968192b2be49af3950022179cc\",\"name\":\"Ryan ODonnell\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/62bb965c979cc1de4c6f046fb47a28a57bc194da441ebe43b3dfbe2f2f893563?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/62bb965c979cc1de4c6f046fb47a28a57bc194da441ebe43b3dfbe2f2f893563?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/62bb965c979cc1de4c6f046fb47a28a57bc194da441ebe43b3dfbe2f2f893563?s=96&d=mm&r=g\",\"caption\":\"Ryan ODonnell\"},\"sameAs\":[\"https:\\\/\\\/www.getmesa.com\"]},{\"@type\":\"HowTo\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#howto-1\",\"name\":\"How To Detect Coupon Code Abuse Using ChatGPT\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#article\"},\"description\":\"We'll make 2 workflows to achieve the desired results. The first workflow will add every order total and its discounted totals to a database in MESA. The second workflow will ask ChatGPT if the values appear higher than usual. If so, the workflow will send an email notification.&lt;br>&lt;br>To get started, be sure to\u00a0&lt;a href=\\\"http:\\\/\\\/app.getmesa.com\\\/install\\\" target=\\\"_blank\\\" rel=\\\"noreferrer noopener\\\">get MESA&lt;\\\/a>\u00a0and connect it to your Shopify store. Then, follow these simple, step-by-step instructions. \",\"totalTime\":\"P0DT0H10M\",\"step\":[{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679941175866\",\"name\":\"For the first workflow, choose the Shopify trigger app, then choose the Order Created step\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"The trigger step is the event that starts this workflow.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-7d25c2ad6e19ec4bbba52185f876abac\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/shopify-order-created.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/shopify-order-created.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679943047820\",\"name\":\"Next, add the target app, Data by MESA\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"Use the search field to locate the Data by MESA. This built-in app lets you store data in MESA without setting up and configuring an external database.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-c3ad282762e73c2c50a439d47005e45c\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/data-by-mesa-action-step.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/data-by-mesa-action-step.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679943352539\",\"name\":\"Choose the Create Record\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"This action step will create a database record every time a new order is received.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-da1c9d012c0fc4e1c2453b8cad26f07b\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/data-by-mesa-create-record.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/data-by-mesa-create-record.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679943768908\",\"name\":\"Configure your new database\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"Create a new table called Orders Coupon Code Abuse. Then under the Columns section, click the button to Add Column. We'll be adding custom columns for various order data defined in the subsequent steps.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-d57c65b9c71d1786116b84e9bf4ac03f\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/database-create-record.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/database-create-record.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679945004102\",\"name\":\"Use the variable selector to connect new order data to database table columns\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"For your first custom column, enter \\\"Order #\\\" in the name field, choose Number for the type field then use the variable selector to choose the Number variable from the previous Order Created step.Repeat this to create these additional columns:1. (Name) Order Total, (Type) Number, (Value) Order Created > Current Total Price2. (Name) Order Total Discounts, (Type) Number, (Value) Order Created > Current Total Discounts3. (Name) Order Date, (Type) Date, (Value) Order Created > Created At\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-caaf968b9469951e3cbfcb017682d221\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/database-table-variables-1.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/database-table-variables-1.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679947982234\",\"name\":\"Save, then name your workflow\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"We'll call this workflow, New Orders to Orders Database. Then, be sure to add your email to receive any notifications about this workflow.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-278b71bbc57f9cfe69fbdc07287728ae\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/shopify-database-save.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/shopify-database-save.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679948094926\",\"name\":\"Turn your automation On\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"Be sure to enable your new workflow automation. This workflow is complete so let's make a new workflow based on the saved database records.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-bb9f0548027e700ce5619726a3016d44\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/shopify-orders-to-database.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/shopify-orders-to-database.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679948768516\",\"name\":\"For the next workflow, select the Data by MESA trigger app then, choose the Record Created step\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"On the table field, be sure to select the database called Orders Coupon Code Abuse that we created in the previous workflow. Under the advanced options, you can change how often this workflow run after the event occurs.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-4c733eea66fec26aa6691773e4e14719\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/database-record-created-trigger-app.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/database-record-created-trigger-app.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679949022310\",\"text\":\"Next, choose the Data by MESA app. Then, select the Query step.\"},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679949332452\",\"name\":\"Select the Orders table that we created from the previous workflow\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"Be sure the Orders table is selected.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-ff7f5fd119281dd57103542bf090186c\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/database-query-table-selected.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/database-query-table-selected.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1680012622849\",\"name\":\"Under Advanced Options, add this custom query\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"This step will query the database table we specify and fetch all the data within it. This query is looking for the same database columns we created in the first workflow so be sure they match.SELECT TO_CHAR(\\\"Order Date\\\", 'yyyy-mm-dd'), SUM(\\\"Order Total\\\") as total, SUM(\\\"Order Total Discounts\\\") as total_discounts, ROUND(SUM(\\\"Order Total Discounts\\\") \\\/ SUM(\\\"Order Total\\\"), 2) as percentage FROM \\\"Orders Coupon Code Abuse\\\" GROUP BY TO_CHAR(\\\"Order Date\\\", 'yyyy-mm-dd') ORDER BY TO_CHAR(\\\"Order Date\\\", 'yyyy-mm-dd')\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-5a6f72e5f0d8a2ddb8be8287f4d283d3\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/database-custom-query.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/database-custom-query.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679949432641\",\"name\":\"Next, add Code by MESA to the workflow\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"We need to make the results of the database query available as a JSON variable for use in another step of this workflow. Optionally, add a description value of \\\"Convert query to JSON\\\"\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-81f08e41c68145a296b847bbeb6d431d\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/code-by-mesa.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/code-by-mesa.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679949953054\",\"name\":\"Click Edit Code to open the editor. Then, paste this code snippet.\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"Under the code comment Add your custom code here, add this snippet:Mesa.log.info(\\\"payload\\\", payload); let newPayload = {}; newPayload.json_results = JSON.stringify(payload);Save then, close the editor view.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-0537df946eaa749ab2e69a63e0bd7b84\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/custom-code.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/custom-code.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679950386390\",\"name\":\"Next, choose the ChatGPT action app\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"Be sure to add your account credentials by following the simple link and instructions to obtain your API key.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-0e5d5dac94dd05b6845d682eeec3c6a0\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/chatgpt-credentials.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/chatgpt-credentials.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679950660308\",\"name\":\"Edit the Step Configuration then choose the highest Model preferred.\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"Your API key will decide which model is available. Click the Add Set button when you're ready.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-ec77e021534d7e538d0ab2212dcc6b8e\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/chagpt-add-prompt-instructions.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/chagpt-add-prompt-instructions.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679951016167\",\"name\":\"Instruct ChatGPT to detect coupon abuse\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"Use the following prompt in the Content field:Included is a JSON result showing order totals by day including their discount amounts. Is the discount rate higher than usual? Reply only \\\"Yes\\\" or \\\"No\\\" :{{ custom.json_results })The custom variable comes from the Code by MESA step and isn't available from the variable selector view so include it when pasting the instructions.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-6a65e036814813d70aa0932ddb231b35\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/chagpt-detect-coupon-code-abuse-message.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/chagpt-detect-coupon-code-abuse-message.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679951321298\",\"name\":\"Next, add Filter by MESA\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"Search then, select the Filter by MESA app action.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-89fae1b6c3489642ca4a62e7e4b78e8b\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/detect-coupon-code-abuse-filter.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/detect-coupon-code-abuse-filter.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679951525143\",\"name\":\"Add the ChatGPT response to filter against\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"Search then choose the Content variable. When prompted, click the Return first item button. Since we're not engaging in a conversion, we're only interested in the first response.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-7cbc29c20965615a4e0cc9622707eab2\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/detect-coupon-code-filter-chatgpt.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/detect-coupon-code-filter-chatgpt.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679951697602\",\"name\":\"Update the filter to look for the response, Yes\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"After the variable has been added to the condition logic, be sure the filter is looking to see it equals the value, Yes.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-cfccea5449e1665752171d2efa0f1ee8\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/detect-coupon-code-filter-chatgpt-response.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/detect-coupon-code-filter-chatgpt-response.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679951978131\",\"name\":\"Next, add Email by MESA to send yourself a notification\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"Add the Email by MESA app action, then enter your email, subject, and a brief message to investigate your order activity for coupon code abuse.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-d6673b0febaf181c49957362926f80a0\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/detect-coupon-code-email-status.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/detect-coupon-code-email-status.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#how-to-step-1679952158638\",\"name\":\"Save then, turn on your workflow\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"Be sure to name your workflow and enter an email address for any related workflow notifications.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/how-to-detect-coupon-code-abuse-using-chatgpt\\\/#schema-image-215a7d7eadcf87bba07f1fe6f6b20d3d\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/workflow-detect-coupon-code-abuse.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/wp-content\\\/uploads\\\/workflow-detect-coupon-code-abuse.png\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Detect Coupon Code Abuse Using ChatGPT - MESA","description":"Learn how to leverage ChatGPT to detect coupon code abuse in your Shopify orders and protect your store's bottom line.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/","og_locale":"en_US","og_type":"article","og_title":"How To Detect Coupon Code Abuse Using ChatGPT - MESA","og_description":"Learn how to leverage ChatGPT to detect coupon code abuse in your Shopify orders and protect your store's bottom line.","og_url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/","og_site_name":"MESA","article_publisher":"https:\/\/web.facebook.com\/mesabyshoppad\/","article_published_time":"2023-03-28T18:23:15+00:00","article_modified_time":"2025-12-22T23:33:51+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/tutorial-shopify-to-chatgbt.jpg","type":"image\/jpeg"}],"author":"Ryan ODonnell","twitter_card":"summary_large_image","twitter_creator":"@getmesa","twitter_site":"@getmesa","twitter_misc":{"Written by":"Ryan ODonnell","Est. reading time":"22 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#article","isPartOf":{"@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/"},"author":{"name":"Ryan ODonnell","@id":"https:\/\/www.getmesa.com\/blog\/#\/schema\/person\/37dc9b968192b2be49af3950022179cc"},"headline":"How To Detect Coupon Code Abuse Using ChatGPT","datePublished":"2023-03-28T18:23:15+00:00","dateModified":"2025-12-22T23:33:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/"},"wordCount":1480,"publisher":{"@id":"https:\/\/www.getmesa.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#primaryimage"},"thumbnailUrl":"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/tutorial-shopify-to-chatgbt.jpg","keywords":["AI","ChatGPT","code","data","email","filter","shopify"],"articleSection":["Workflow Tutorials"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/","name":"How To Detect Coupon Code Abuse Using ChatGPT - MESA","isPartOf":{"@id":"https:\/\/www.getmesa.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#primaryimage"},"image":{"@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#primaryimage"},"thumbnailUrl":"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/tutorial-shopify-to-chatgbt.jpg","datePublished":"2023-03-28T18:23:15+00:00","dateModified":"2025-12-22T23:33:51+00:00","description":"Learn how to leverage ChatGPT to detect coupon code abuse in your Shopify orders and protect your store's bottom line.","breadcrumb":{"@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#primaryimage","url":"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/tutorial-shopify-to-chatgbt.jpg","contentUrl":"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/tutorial-shopify-to-chatgbt.jpg","width":1280,"height":720,"caption":"shopify chatgpt"},{"@type":"BreadcrumbList","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.getmesa.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How To Detect Coupon Code Abuse Using ChatGPT"}]},{"@type":"WebSite","@id":"https:\/\/www.getmesa.com\/blog\/#website","url":"https:\/\/www.getmesa.com\/blog\/","name":"MESA","description":"Discover how to automate your Shopify growth","publisher":{"@id":"https:\/\/www.getmesa.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.getmesa.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.getmesa.com\/blog\/#organization","name":"MESA - AI automation Platform","url":"https:\/\/www.getmesa.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/mesa-shoppad.jpeg","contentUrl":"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/mesa-shoppad.jpeg","width":225,"height":225,"caption":"MESA - AI automation Platform"},"image":{"@id":"https:\/\/www.getmesa.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/web.facebook.com\/mesabyshoppad\/","https:\/\/x.com\/getmesa","https:\/\/www.linkedin.com\/company\/shoppad\/","https:\/\/www.youtube.com\/channel\/UCqsf_WhcGEsZMvms1idivyw"]},{"@type":"Person","@id":"https:\/\/www.getmesa.com\/blog\/#\/schema\/person\/37dc9b968192b2be49af3950022179cc","name":"Ryan ODonnell","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/62bb965c979cc1de4c6f046fb47a28a57bc194da441ebe43b3dfbe2f2f893563?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/62bb965c979cc1de4c6f046fb47a28a57bc194da441ebe43b3dfbe2f2f893563?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/62bb965c979cc1de4c6f046fb47a28a57bc194da441ebe43b3dfbe2f2f893563?s=96&d=mm&r=g","caption":"Ryan ODonnell"},"sameAs":["https:\/\/www.getmesa.com"]},{"@type":"HowTo","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#howto-1","name":"How To Detect Coupon Code Abuse Using ChatGPT","mainEntityOfPage":{"@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#article"},"description":"We'll make 2 workflows to achieve the desired results. The first workflow will add every order total and its discounted totals to a database in MESA. The second workflow will ask ChatGPT if the values appear higher than usual. If so, the workflow will send an email notification.&lt;br>&lt;br>To get started, be sure to\u00a0&lt;a href=\"http:\/\/app.getmesa.com\/install\" target=\"_blank\" rel=\"noreferrer noopener\">get MESA&lt;\/a>\u00a0and connect it to your Shopify store. Then, follow these simple, step-by-step instructions. ","totalTime":"P0DT0H10M","step":[{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679941175866","name":"For the first workflow, choose the Shopify trigger app, then choose the Order Created step","itemListElement":[{"@type":"HowToDirection","text":"The trigger step is the event that starts this workflow."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-7d25c2ad6e19ec4bbba52185f876abac","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/shopify-order-created.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/shopify-order-created.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679943047820","name":"Next, add the target app, Data by MESA","itemListElement":[{"@type":"HowToDirection","text":"Use the search field to locate the Data by MESA. This built-in app lets you store data in MESA without setting up and configuring an external database."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-c3ad282762e73c2c50a439d47005e45c","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/data-by-mesa-action-step.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/data-by-mesa-action-step.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679943352539","name":"Choose the Create Record","itemListElement":[{"@type":"HowToDirection","text":"This action step will create a database record every time a new order is received."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-da1c9d012c0fc4e1c2453b8cad26f07b","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/data-by-mesa-create-record.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/data-by-mesa-create-record.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679943768908","name":"Configure your new database","itemListElement":[{"@type":"HowToDirection","text":"Create a new table called Orders Coupon Code Abuse. Then under the Columns section, click the button to Add Column. We'll be adding custom columns for various order data defined in the subsequent steps."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-d57c65b9c71d1786116b84e9bf4ac03f","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/database-create-record.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/database-create-record.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679945004102","name":"Use the variable selector to connect new order data to database table columns","itemListElement":[{"@type":"HowToDirection","text":"For your first custom column, enter \"Order #\" in the name field, choose Number for the type field then use the variable selector to choose the Number variable from the previous Order Created step.Repeat this to create these additional columns:1. (Name) Order Total, (Type) Number, (Value) Order Created > Current Total Price2. (Name) Order Total Discounts, (Type) Number, (Value) Order Created > Current Total Discounts3. (Name) Order Date, (Type) Date, (Value) Order Created > Created At"}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-caaf968b9469951e3cbfcb017682d221","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/database-table-variables-1.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/database-table-variables-1.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679947982234","name":"Save, then name your workflow","itemListElement":[{"@type":"HowToDirection","text":"We'll call this workflow, New Orders to Orders Database. Then, be sure to add your email to receive any notifications about this workflow."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-278b71bbc57f9cfe69fbdc07287728ae","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/shopify-database-save.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/shopify-database-save.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679948094926","name":"Turn your automation On","itemListElement":[{"@type":"HowToDirection","text":"Be sure to enable your new workflow automation. This workflow is complete so let's make a new workflow based on the saved database records."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-bb9f0548027e700ce5619726a3016d44","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/shopify-orders-to-database.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/shopify-orders-to-database.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679948768516","name":"For the next workflow, select the Data by MESA trigger app then, choose the Record Created step","itemListElement":[{"@type":"HowToDirection","text":"On the table field, be sure to select the database called Orders Coupon Code Abuse that we created in the previous workflow. Under the advanced options, you can change how often this workflow run after the event occurs."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-4c733eea66fec26aa6691773e4e14719","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/database-record-created-trigger-app.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/database-record-created-trigger-app.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679949022310","text":"Next, choose the Data by MESA app. Then, select the Query step."},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679949332452","name":"Select the Orders table that we created from the previous workflow","itemListElement":[{"@type":"HowToDirection","text":"Be sure the Orders table is selected."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-ff7f5fd119281dd57103542bf090186c","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/database-query-table-selected.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/database-query-table-selected.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1680012622849","name":"Under Advanced Options, add this custom query","itemListElement":[{"@type":"HowToDirection","text":"This step will query the database table we specify and fetch all the data within it. This query is looking for the same database columns we created in the first workflow so be sure they match.SELECT TO_CHAR(\"Order Date\", 'yyyy-mm-dd'), SUM(\"Order Total\") as total, SUM(\"Order Total Discounts\") as total_discounts, ROUND(SUM(\"Order Total Discounts\") \/ SUM(\"Order Total\"), 2) as percentage FROM \"Orders Coupon Code Abuse\" GROUP BY TO_CHAR(\"Order Date\", 'yyyy-mm-dd') ORDER BY TO_CHAR(\"Order Date\", 'yyyy-mm-dd')"}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-5a6f72e5f0d8a2ddb8be8287f4d283d3","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/database-custom-query.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/database-custom-query.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679949432641","name":"Next, add Code by MESA to the workflow","itemListElement":[{"@type":"HowToDirection","text":"We need to make the results of the database query available as a JSON variable for use in another step of this workflow. Optionally, add a description value of \"Convert query to JSON\""}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-81f08e41c68145a296b847bbeb6d431d","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/code-by-mesa.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/code-by-mesa.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679949953054","name":"Click Edit Code to open the editor. Then, paste this code snippet.","itemListElement":[{"@type":"HowToDirection","text":"Under the code comment Add your custom code here, add this snippet:Mesa.log.info(\"payload\", payload); let newPayload = {}; newPayload.json_results = JSON.stringify(payload);Save then, close the editor view."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-0537df946eaa749ab2e69a63e0bd7b84","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/custom-code.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/custom-code.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679950386390","name":"Next, choose the ChatGPT action app","itemListElement":[{"@type":"HowToDirection","text":"Be sure to add your account credentials by following the simple link and instructions to obtain your API key."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-0e5d5dac94dd05b6845d682eeec3c6a0","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/chatgpt-credentials.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/chatgpt-credentials.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679950660308","name":"Edit the Step Configuration then choose the highest Model preferred.","itemListElement":[{"@type":"HowToDirection","text":"Your API key will decide which model is available. Click the Add Set button when you're ready."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-ec77e021534d7e538d0ab2212dcc6b8e","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/chagpt-add-prompt-instructions.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/chagpt-add-prompt-instructions.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679951016167","name":"Instruct ChatGPT to detect coupon abuse","itemListElement":[{"@type":"HowToDirection","text":"Use the following prompt in the Content field:Included is a JSON result showing order totals by day including their discount amounts. Is the discount rate higher than usual? Reply only \"Yes\" or \"No\" :{{ custom.json_results })The custom variable comes from the Code by MESA step and isn't available from the variable selector view so include it when pasting the instructions."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-6a65e036814813d70aa0932ddb231b35","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/chagpt-detect-coupon-code-abuse-message.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/chagpt-detect-coupon-code-abuse-message.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679951321298","name":"Next, add Filter by MESA","itemListElement":[{"@type":"HowToDirection","text":"Search then, select the Filter by MESA app action."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-89fae1b6c3489642ca4a62e7e4b78e8b","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/detect-coupon-code-abuse-filter.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/detect-coupon-code-abuse-filter.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679951525143","name":"Add the ChatGPT response to filter against","itemListElement":[{"@type":"HowToDirection","text":"Search then choose the Content variable. When prompted, click the Return first item button. Since we're not engaging in a conversion, we're only interested in the first response."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-7cbc29c20965615a4e0cc9622707eab2","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679951697602","name":"Update the filter to look for the response, Yes","itemListElement":[{"@type":"HowToDirection","text":"After the variable has been added to the condition logic, be sure the filter is looking to see it equals the value, Yes."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-cfccea5449e1665752171d2efa0f1ee8","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-response.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/detect-coupon-code-filter-chatgpt-response.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679951978131","name":"Next, add Email by MESA to send yourself a notification","itemListElement":[{"@type":"HowToDirection","text":"Add the Email by MESA app action, then enter your email, subject, and a brief message to investigate your order activity for coupon code abuse."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-d6673b0febaf181c49957362926f80a0","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/detect-coupon-code-email-status.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/detect-coupon-code-email-status.png"}},{"@type":"HowToStep","url":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#how-to-step-1679952158638","name":"Save then, turn on your workflow","itemListElement":[{"@type":"HowToDirection","text":"Be sure to name your workflow and enter an email address for any related workflow notifications."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/how-to-detect-coupon-code-abuse-using-chatgpt\/#schema-image-215a7d7eadcf87bba07f1fe6f6b20d3d","url":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/workflow-detect-coupon-code-abuse.png","contentUrl":"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/workflow-detect-coupon-code-abuse.png"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/posts\/6737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/comments?post=6737"}],"version-history":[{"count":12,"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/posts\/6737\/revisions"}],"predecessor-version":[{"id":17362,"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/posts\/6737\/revisions\/17362"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/media\/6657"}],"wp:attachment":[{"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/media?parent=6737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/categories?post=6737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/tags?post=6737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}