<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Top Edge AI</title>
    <description>The latest articles on DEV Community by Top Edge AI (@topedge_ai).</description>
    <link>https://dev.to/topedge_ai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4215498%2F7ed9cf7c-7369-41a7-9a49-ded1518af6f5.png</url>
      <title>DEV Community: Top Edge AI</title>
      <link>https://dev.to/topedge_ai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/topedge_ai"/>
    <language>en</language>
    <item>
      <title>Before 2027: 9 Shopify Automation Problems Every Indian D2C Store Should Fix</title>
      <dc:creator>Top Edge AI</dc:creator>
      <pubDate>Sat, 14 Nov 2026 08:22:54 +0000</pubDate>
      <link>https://dev.to/topedge_ai/before-2027-9-shopify-automation-problems-every-indian-d2c-store-should-fix-1e0d</link>
      <guid>https://dev.to/topedge_ai/before-2027-9-shopify-automation-problems-every-indian-d2c-store-should-fix-1e0d</guid>
      <description>&lt;p&gt;Your Shopify store might be working perfectly today. That doesn't mean your integrations, APIs, checkout recovery and order automation are ready for 2027.*&lt;/p&gt;

&lt;p&gt;Most Shopify problems don't appear during development.&lt;/p&gt;

&lt;p&gt;They appear when traffic increases.&lt;/p&gt;

&lt;p&gt;When multiple customers place orders simultaneously.&lt;/p&gt;

&lt;p&gt;When a webhook gets delivered twice.&lt;/p&gt;

&lt;p&gt;When an access token expires.&lt;/p&gt;

&lt;p&gt;Or when your automation sends an abandoned checkout reminder to someone who has already purchased.&lt;/p&gt;

&lt;p&gt;With 2027 approaching, here are nine things I'd audit before the year ends.&lt;/p&gt;

&lt;p&gt;Some are developer problems.&lt;/p&gt;

&lt;p&gt;Some are operational problems.&lt;/p&gt;

&lt;p&gt;All of them can affect your store's reliability.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Check your Shopify app's access tokens before January 2027
&lt;/h2&gt;

&lt;p&gt;This is probably the most important upcoming technical change to check.&lt;/p&gt;

&lt;p&gt;Shopify is moving public apps away from non-expiring offline access tokens.&lt;/p&gt;

&lt;p&gt;The deadlines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;January 1, 2027: Public apps using non-expiring offline tokens are blocked from new installations.&lt;/li&gt;
&lt;li&gt;April 1, 2027: Their Admin API requests are rejected.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This requirement concerns public apps, not merchant-created custom apps.&lt;/p&gt;

&lt;p&gt;If you're building your own Shopify application, check which token type your OAuth implementation currently requests.&lt;/p&gt;

&lt;p&gt;Your checklist:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Support expiring offline access tokens.&lt;/li&gt;
&lt;li&gt;Store access and refresh tokens securely.&lt;/li&gt;
&lt;li&gt;Implement token refresh.&lt;/li&gt;
&lt;li&gt;Handle expired and revoked credentials.&lt;/li&gt;
&lt;li&gt;Never expose access tokens in frontend code or application logs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One small authentication decision today could prevent a production outage next year.&lt;/p&gt;

&lt;p&gt;Official documentation: &lt;a href="https://shopify.dev/docs/apps/build/authentication-authorization/access-tokens" rel="noopener noreferrer"&gt;https://shopify.dev/docs/apps/build/authentication-authorization/access-tokens&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Stop building new integrations around the legacy REST Admin API
&lt;/h2&gt;

&lt;p&gt;If you're starting a new Shopify integration, use the GraphQL Admin API.&lt;/p&gt;

&lt;p&gt;Shopify marked the REST Admin API as legacy on October 1, 2024.&lt;/p&gt;

&lt;p&gt;GraphQL also introduces a different way of managing API limits.&lt;/p&gt;

&lt;p&gt;Instead of counting requests alone, Shopify calculates the cost of GraphQL queries.&lt;/p&gt;

&lt;p&gt;A query returning deeply nested product, variant and inventory data can consume significantly more capacity than a simple query.&lt;/p&gt;

&lt;p&gt;What I'd implement:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Explicit API versioning.&lt;/li&gt;
&lt;li&gt;Cursor-based pagination.&lt;/li&gt;
&lt;li&gt;Smaller queries.&lt;/li&gt;
&lt;li&gt;Query-cost monitoring.&lt;/li&gt;
&lt;li&gt;Retry handling for throttled requests.&lt;/li&gt;
&lt;li&gt;Bulk operations for large data exports.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pay attention to the &lt;code&gt;extensions.cost.throttleStatus&lt;/code&gt; object in GraphQL responses.&lt;/p&gt;

&lt;p&gt;It tells you how much query capacity remains and how quickly it restores.&lt;/p&gt;

&lt;p&gt;Documentation: &lt;a href="https://shopify.dev/docs/apps/build/apis/graphql-admin/rate-limits" rel="noopener noreferrer"&gt;https://shopify.dev/docs/apps/build/apis/graphql-admin/rate-limits&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Never assume a Shopify webhook will arrive only once
&lt;/h2&gt;

&lt;p&gt;This is an easy mistake to make.&lt;/p&gt;

&lt;p&gt;Imagine receiving an order-created webhook.&lt;/p&gt;

&lt;p&gt;Your application:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Creates an order record.&lt;/li&gt;
&lt;li&gt;Starts a COD confirmation workflow.&lt;/li&gt;
&lt;li&gt;Sends a WhatsApp message.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now imagine receiving the same webhook again.&lt;/p&gt;

&lt;p&gt;Without idempotency, the customer could receive duplicate confirmations.&lt;/p&gt;

&lt;p&gt;The solution is to maintain a persistent webhook delivery record.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;shopify_webhook_inbox&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;shop_domain&lt;/span&gt; &lt;span class="kt"&gt;TEXT&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="kc"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;webhook_id&lt;/span&gt; &lt;span class="kt"&gt;TEXT&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="kc"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;topic&lt;/span&gt; &lt;span class="kt"&gt;TEXT&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="kc"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;api_version&lt;/span&gt; &lt;span class="kt"&gt;TEXT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;payload&lt;/span&gt; &lt;span class="kt"&gt;JSONB&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="kc"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;received_at&lt;/span&gt; &lt;span class="kt"&gt;TIMESTAMPTZ&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="nb"&gt;NOW&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;processed_at&lt;/span&gt; &lt;span class="kt"&gt;TIMESTAMPTZ&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;shop_domain&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;webhook_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On receiving a webhook, insert its delivery ID.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;shopify_webhook_inbox&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;shop_domain&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;webhook_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;topic&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;payload&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;VALUES&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;CONFLICT&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;shop_domain&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;webhook_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;DO&lt;/span&gt; &lt;span class="k"&gt;NOTHING&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the record already exists, don't execute the same side effect again.&lt;/p&gt;

&lt;p&gt;One important detail:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;X-Shopify-Webhook-Id&lt;/code&gt; identifies an individual delivery.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;X-Shopify-Event-Id&lt;/code&gt; helps correlate deliveries originating from the same merchant action.&lt;/p&gt;

&lt;p&gt;Don't blindly treat them as interchangeable.&lt;/p&gt;

&lt;p&gt;Also, always verify the webhook HMAC against the original request body before trusting the payload.&lt;/p&gt;

&lt;p&gt;Documentation: &lt;a href="https://shopify.dev/docs/apps/build/webhooks/verify-deliveries" rel="noopener noreferrer"&gt;https://shopify.dev/docs/apps/build/webhooks/verify-deliveries&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Don't perform your entire business workflow inside a webhook request
&lt;/h2&gt;

&lt;p&gt;Your webhook endpoint should receive, validate and persist the event.&lt;/p&gt;

&lt;p&gt;It shouldn't wait for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multiple Shopify API requests.&lt;/li&gt;
&lt;li&gt;Database-heavy operations.&lt;/li&gt;
&lt;li&gt;WhatsApp API responses.&lt;/li&gt;
&lt;li&gt;AI-generated messages.&lt;/li&gt;
&lt;li&gt;Third-party integrations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;Shopify requires a response within five seconds.&lt;/p&gt;

&lt;p&gt;It retries failed deliveries up to eight times over four hours. Persistent delivery failures can result in the subscription being removed.&lt;/p&gt;

&lt;p&gt;A better architecture:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Shopify Webhook
      |
      v
HMAC Verification
      |
      v
Persistent Event Storage
      |
      v
Immediate HTTP 200
      |
      v
Background Worker
      |
      v
Business Logic
      |
      v
External API / WhatsApp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use a durable queue or transactional outbox.&lt;/p&gt;

&lt;p&gt;Don't acknowledge an event before it has been safely persisted.&lt;/p&gt;

&lt;p&gt;I'd also build a reconciliation job that periodically compares critical order data against Shopify.&lt;/p&gt;

&lt;p&gt;Webhooks are useful for keeping systems updated.&lt;/p&gt;

&lt;p&gt;Reconciliation helps recover from missed events and downtime.&lt;/p&gt;

&lt;p&gt;Documentation: &lt;a href="https://shopify.dev/docs/apps/build/webhooks/troubleshoot" rel="noopener noreferrer"&gt;https://shopify.dev/docs/apps/build/webhooks/troubleshoot&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Build automation around order states, not just webhook events
&lt;/h2&gt;

&lt;p&gt;This matters particularly for abandoned checkout recovery.&lt;/p&gt;

&lt;p&gt;Consider this sequence:&lt;/p&gt;

&lt;p&gt;A customer abandons checkout.&lt;/p&gt;

&lt;p&gt;Your application schedules three reminders.&lt;/p&gt;

&lt;p&gt;The customer returns through the first reminder and completes the purchase.&lt;/p&gt;

&lt;p&gt;But your second reminder is already sitting in a queue.&lt;/p&gt;

&lt;p&gt;What happens next?&lt;/p&gt;

&lt;p&gt;Without purchase suppression, the customer receives another abandoned checkout notification.&lt;/p&gt;

&lt;p&gt;A better approach is to maintain a shared order and recovery state.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;recoveryStates&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="no"&gt;PENDING&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"pending"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="no"&gt;ACTIVE&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"active"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="no"&gt;CONVERTED&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"converted"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="no"&gt;CANCELLED&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"cancelled"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="no"&gt;EXPIRED&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"expired"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before every scheduled message:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check the latest Shopify order state.&lt;/li&gt;
&lt;li&gt;Check whether recovery is still active.&lt;/li&gt;
&lt;li&gt;Verify the customer's messaging permission.&lt;/li&gt;
&lt;li&gt;Verify that the message is still relevant.&lt;/li&gt;
&lt;li&gt;Send only when all conditions pass.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Don't assume that a previously scheduled message is still valid.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The customer's latest purchase state should take priority over an old automation event.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Treat WhatsApp opt-in and template approvals as part of your architecture
&lt;/h2&gt;

&lt;p&gt;If you're running an Indian D2C store using WhatsApp automation, don't leave consent management until the end.&lt;/p&gt;

&lt;p&gt;A phone number collected during checkout isn't automatically permission for promotional WhatsApp messages.&lt;/p&gt;

&lt;p&gt;Your system should maintain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Customer phone number.&lt;/li&gt;
&lt;li&gt;Consent status.&lt;/li&gt;
&lt;li&gt;Consent source.&lt;/li&gt;
&lt;li&gt;Consent timestamp.&lt;/li&gt;
&lt;li&gt;Opt-out status.&lt;/li&gt;
&lt;li&gt;Messaging purpose.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also, understand the WhatsApp Business Platform messaging window.&lt;/p&gt;

&lt;p&gt;When a customer messages your business, a 24-hour customer service window opens and resets with each new customer message.&lt;/p&gt;

&lt;p&gt;Within that window, you can send free-form replies.&lt;/p&gt;

&lt;p&gt;Outside it, business-initiated messages require approved templates.&lt;/p&gt;

&lt;p&gt;Automated replies must also have an accessible escalation path to human support.&lt;/p&gt;

&lt;p&gt;Read Meta's official policy: &lt;a href="https://whatsappbusiness.com/policy/" rel="noopener noreferrer"&gt;https://whatsappbusiness.com/policy/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Stop treating COD orders like prepaid orders
&lt;/h2&gt;

&lt;p&gt;For Indian e-commerce stores, this deserves its own workflow.&lt;/p&gt;

&lt;p&gt;A COD order and a prepaid order represent different payment states.&lt;/p&gt;

&lt;p&gt;They shouldn't automatically enter identical automation journeys.&lt;/p&gt;

&lt;p&gt;For COD orders, consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Order confirmation.&lt;/li&gt;
&lt;li&gt;Confirm or cancel actions.&lt;/li&gt;
&lt;li&gt;A separate no-response follow-up.&lt;/li&gt;
&lt;li&gt;Duplicate confirmation prevention.&lt;/li&gt;
&lt;li&gt;Order-state synchronization.&lt;/li&gt;
&lt;li&gt;Prepaid conversion where appropriate.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Maintain an explicit confirmation state:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;codStatus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="no"&gt;PENDING&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"pending"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="no"&gt;CONFIRMED&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"confirmed"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="no"&gt;CANCELLED&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"cancelled"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="no"&gt;EXPIRED&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"expired"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Never treat silence as confirmation.&lt;/p&gt;

&lt;p&gt;And never dispatch the same order twice because two webhook events arrived.&lt;/p&gt;

&lt;p&gt;A properly designed COD confirmation system can help merchants identify customer intent before dispatch.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Monitor the entire automation stack, not just server uptime
&lt;/h2&gt;

&lt;p&gt;Your server returning HTTP 200 doesn't mean your entire application is healthy.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shopify webhooks are received.&lt;/li&gt;
&lt;li&gt;Database writes succeed.&lt;/li&gt;
&lt;li&gt;Queue jobs are created.&lt;/li&gt;
&lt;li&gt;WhatsApp API calls fail.&lt;/li&gt;
&lt;li&gt;Customers never receive their messages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your monitoring should cover:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;What to monitor&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Webhooks&lt;/td&gt;
&lt;td&gt;Success and failure rates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Queue&lt;/td&gt;
&lt;td&gt;Pending jobs and processing delays&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;Query latency and connection usage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shopify API&lt;/td&gt;
&lt;td&gt;Throttling and GraphQL cost&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WhatsApp&lt;/td&gt;
&lt;td&gt;Delivery failures and template status&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Automation&lt;/td&gt;
&lt;td&gt;Duplicate and suppressed messages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Revenue&lt;/td&gt;
&lt;td&gt;Actual recovered orders&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Keep structured logs with shop ID, webhook ID, job ID and order ID.&lt;/p&gt;

&lt;p&gt;Never put customer access tokens or unnecessary personal information in logs.&lt;/p&gt;

&lt;p&gt;And make sure failed jobs have a retry strategy and a dead-letter mechanism.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Measure recovered revenue, not automation activity
&lt;/h2&gt;

&lt;p&gt;A system can send thousands of messages without generating meaningful revenue.&lt;/p&gt;

&lt;p&gt;Delivered messages aren't completed purchases.&lt;/p&gt;

&lt;p&gt;A better measurement system should track:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Customers entering recovery journeys.&lt;/li&gt;
&lt;li&gt;Messages successfully delivered.&lt;/li&gt;
&lt;li&gt;Customers returning to checkout.&lt;/li&gt;
&lt;li&gt;Completed orders.&lt;/li&gt;
&lt;li&gt;Revenue attributed to recovery.&lt;/li&gt;
&lt;li&gt;Messaging cost.&lt;/li&gt;
&lt;li&gt;Duplicate messages prevented.&lt;/li&gt;
&lt;li&gt;COD orders confirmed before dispatch.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also, distinguish attributed revenue from genuinely incremental revenue.&lt;/p&gt;

&lt;p&gt;A customer who was already going to purchase shouldn't automatically be counted as an incremental sale.&lt;/p&gt;

&lt;p&gt;Your goal should be profitable recovery, not impressive dashboard numbers.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd audit first before 2027
&lt;/h2&gt;

&lt;p&gt;If I were reviewing a Shopify store and its automation stack today, this would be my order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check public app token migration requirements.&lt;/li&gt;
&lt;li&gt;Review API versions and GraphQL implementation.&lt;/li&gt;
&lt;li&gt;Test webhook verification and idempotency.&lt;/li&gt;
&lt;li&gt;Check queue retries and recovery after downtime.&lt;/li&gt;
&lt;li&gt;Test abandoned checkout purchase suppression.&lt;/li&gt;
&lt;li&gt;Audit WhatsApp consent and templates.&lt;/li&gt;
&lt;li&gt;Separate COD and prepaid workflows.&lt;/li&gt;
&lt;li&gt;Set up proper monitoring.&lt;/li&gt;
&lt;li&gt;Measure actual recovered revenue.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You don't need to rebuild your entire Shopify infrastructure before 2027.&lt;/p&gt;

&lt;p&gt;But you should know exactly where it can fail.&lt;/p&gt;

&lt;h2&gt;
  
  
  A little about what we're building at TopEdge AI
&lt;/h2&gt;

&lt;p&gt;Disclosure: I work on &lt;strong&gt;TopEdge AI&lt;/strong&gt;, a Shopify and WhatsApp automation platform for Indian D2C brands.&lt;/p&gt;

&lt;p&gt;One of the problems we're working on is connecting actual Shopify customer activity with the right WhatsApp workflow.&lt;/p&gt;

&lt;p&gt;This includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Abandoned cart and checkout recovery.&lt;/li&gt;
&lt;li&gt;COD order confirmation.&lt;/li&gt;
&lt;li&gt;COD-to-prepaid journeys.&lt;/li&gt;
&lt;li&gt;Automated order and shipping updates.&lt;/li&gt;
&lt;li&gt;Consent-based subscriber collection.&lt;/li&gt;
&lt;li&gt;Customer conversations with Shopify order context.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We approach this around connected Shopify data rather than disconnected message triggers.&lt;/p&gt;

&lt;p&gt;You can explore the platform at &lt;a href="https://topedgeai.com/" rel="noopener noreferrer"&gt;https://topedgeai.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We've also documented practical implementation guides for &lt;a href="https://topedgeai.com/docs/guides/abandoned-cart-recovery" rel="noopener noreferrer"&gt;Shopify abandoned cart recovery&lt;/a&gt; and &lt;a href="https://topedgeai.com/docs/guides/cod-confirmation" rel="noopener noreferrer"&gt;WhatsApp COD confirmation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The bigger takeaway:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Shopify store should not just be able to process orders. Its entire ecosystem should be able to handle failures, recover from events, protect customer data and communicate intelligently.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's the kind of infrastructure worth building before 2027.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>WhatsApp + Shopify: 7 gotchas that cost me a week</title>
      <dc:creator>Top Edge AI</dc:creator>
      <pubDate>Thu, 29 Oct 2026 14:39:54 +0000</pubDate>
      <link>https://dev.to/topedge_ai/whatsapp-shopify-7-gotchas-that-cost-me-a-week-50lg</link>
      <guid>https://dev.to/topedge_ai/whatsapp-shopify-7-gotchas-that-cost-me-a-week-50lg</guid>
      <description>&lt;p&gt;I spent last month wiring WhatsApp order notifications into Shopify stores. The docs are decent. The gotchas aren’t documented anywhere.&lt;/p&gt;

&lt;p&gt;Here are the seven that actually cost me time.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Signature verification needs the raw body&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This one burned a full day.&lt;/p&gt;

&lt;p&gt;Meta signs every webhook with HMAC-SHA256 over the exact bytes it sent. If express.json() runs first, the raw body is gone — you’re hashing a re-serialised object, and the signature never matches.&lt;/p&gt;

&lt;p&gt;`// ❌ Signature will never verify&lt;br&gt;
app.use(express.json());&lt;br&gt;
app.post('/webhooks/whatsapp', verifySignature, handler);&lt;/p&gt;

&lt;p&gt;Mount the raw parser on that route before the global JSON parser:&lt;/p&gt;

&lt;p&gt;`import crypto from 'node:crypto';&lt;/p&gt;

&lt;p&gt;app.post(&lt;br&gt;
  '/webhooks/whatsapp',&lt;br&gt;
  express.raw({ type: 'application/json' }),&lt;br&gt;
  (req, res) =&amp;gt; {&lt;br&gt;
    const sig = req.get('x-hub-signature-256') || '';&lt;br&gt;
    const expected =&lt;br&gt;
      'sha256=' +&lt;br&gt;
      crypto&lt;br&gt;
        .createHmac('sha256', process.env.META_APP_SECRET)&lt;br&gt;
        .update(req.body)          // Buffer, not parsed JSON&lt;br&gt;
        .digest('hex');&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const a = Buffer.from(sig);
const b = Buffer.from(expected);
// timingSafeEqual throws on length mismatch — check first
if (a.length !== b.length || !crypto.timingSafeEqual(a, b)) {
  return res.sendStatus(401);
}

res.sendStatus(200);                      // ack fast
queue.add(JSON.parse(req.body.toString('utf8')));  // process after
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
);&lt;/p&gt;

&lt;p&gt;app.use(express.json());  // everything else``&lt;/p&gt;

&lt;p&gt;Two things in there matter beyond the signature: ack before you process, and use timingSafeEqual, not ===.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Meta retries aggressively if you’re slow&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Meta expects a 200 fast. Take too long and it retries — so your “send order confirmation” handler fires three times and the customer gets three messages.&lt;/p&gt;

&lt;p&gt;Ack immediately, queue the work. Same for Shopify: it retries on non-2xx, so every handler needs to be idempotent. Dedupe on the event ID before you do anything with side effects.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Shopify uses a different HMAC encoding&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Both sign webhooks. They don’t agree on the format.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;   Header  Encoding&lt;br&gt;
Meta    x-hub-signature-256 hex, prefixed sha256=&lt;br&gt;
Shopify x-shopify-hmac-sha256   base64, no prefix&lt;br&gt;
const digest = crypto&lt;br&gt;
  .createHmac('sha256', process.env.SHOPIFY_API_SECRET)&lt;br&gt;
  .update(req.body)&lt;br&gt;
  .digest('base64');   // not hex&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Copy-pasting your Meta verifier for Shopify fails silently. Ask me how I know.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The 24-hour window changes what you can send&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is the one that breaks product assumptions, not just code.&lt;/p&gt;

&lt;p&gt;Customer messages you → 24-hour window opens → you can send free-form text&lt;br&gt;
Window closes → template only, and templates need pre-approval&lt;/p&gt;

&lt;p&gt;So “just reply to the customer” only works inside the window. Outside it, you need an approved template with variables filled in. Design your flows around this or you’ll ship something that works in testing (where you just messaged yourself) and fails in production.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Template category decides your bill&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every template is marketing, utility, or authentication. Meta classifies it, and it drives the price per conversation.&lt;/p&gt;

&lt;p&gt;In India the gap is large — marketing conversations cost several times what utility ones do. An order confirmation is utility. A discount blast is marketing. Mislabel a utility template as marketing and you pay more for the same message.&lt;/p&gt;

&lt;p&gt;Rejections are usually one of:&lt;/p&gt;

&lt;p&gt;Promotional language in a utility template&lt;br&gt;
Unclear variables — {{1}} with no sample value&lt;br&gt;
Variables at the very start or end of the body&lt;br&gt;
A placeholder you forgot to replace&lt;/p&gt;

&lt;p&gt;Submit with realistic sample values. “John” and “1042”, not “xxx”.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Phone numbers must be E.164, and India trips people up&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;No +, no spaces, no dashes, country code always. 919876543210, not +91 98765 43210 and not 09876543210.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const toE164 = (raw, cc = '91') =&amp;gt; {&lt;br&gt;
  const d = String(raw).replace(/\D/g, '');&lt;br&gt;
  if (d.length === 10) return cc + d;         // bare local&lt;br&gt;
  if (d.startsWith('0')) return cc + d.slice(1);  // leading zero&lt;br&gt;
  return d;&lt;br&gt;
};&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Normalise on the way in, not at send time. Otherwise the same customer ends up as three contacts.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Opt-in isn’t legal boilerplate — it’s your delivery rate&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Message people who didn’t opt in and they block you. Enough blocks and your number’s quality rating drops. Low quality means lower messaging limits, and Meta can restrict the number.&lt;/p&gt;

&lt;p&gt;Record consent per customer with its source and timestamp. Treat it as operational data, not a compliance checkbox — it’s the thing protecting your ability to send at all.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{ customerId, phone, consent: true, source: 'checkout_opt_in', at: '2026-10-29T…' }&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The order I’d build in&lt;/p&gt;

&lt;p&gt;Shopify OAuth, store the token&lt;br&gt;
Webhook endpoints with both HMAC verifiers, acking fast&lt;/p&gt;

&lt;p&gt;Opt-in capture before any sending&lt;/p&gt;

&lt;p&gt;One utility template (order confirmation), approved end to end&lt;br&gt;
Then flows&lt;/p&gt;

&lt;p&gt;Getting one template through approval before you build the flow engine saves a lot of rework. &lt;/p&gt;

&lt;p&gt;Approval is the step with the unpredictable timeline.&lt;/p&gt;

&lt;p&gt;I work on &lt;a href="https://topedgeai.com/" rel="noopener noreferrer"&gt;TopEdge&lt;/a&gt;, which does this for Shopify stores in India &lt;/p&gt;

&lt;p&gt;we publish Meta’s India conversation rates if you want the current numbers for the template-category math in #5. &lt;/p&gt;

&lt;p&gt;Everything above applies whether you build it or buy it.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>node</category>
      <category>shopify</category>
      <category>api</category>
    </item>
  </channel>
</rss>
