All work

Personalized Nutrition Automation

A Shopify-integrated Rails app that turns quiz answers and orders into personalized nutrition plans, print-ready labels, and branded PDFs, automatically.

Custom Shopify AppAutomationDocument Generation
Nutrition quiz and order data being matched to several dog profiles, then turned into personalized food labels, plans, and fulfillment documents

Overview

Hungry Bark needed an internal system that could turn customer quiz responses and Shopify orders into personalized nutrition plans, product labels, and fulfillment-ready documents.

We helped build a Shopify-integrated Ruby on Rails application that automates the whole workflow, from receiving order and quiz data to generating branded PDFs and notifying the operations team.

The challenge

Each order could contain products for several dogs, with recommendations based on age, breed, activity level, dietary preferences, and health goals.

The operations team needed to:

  • Match Shopify orders with submitted nutrition quizzes.
  • Associate individual products with the correct dog.
  • Calculate and display feeding information.
  • Generate personalized front and back product labels.
  • Produce customer-specific nutrition-plan PDFs.
  • Track fulfillment and process multiple orders efficiently.

Done by hand, this was repetitive and easy to get wrong. One mismatched name, product, or feeding number, and the wrong label ships.

The solution

The application pulls three data sources into one operational workflow:

  1. Customer quiz submissions create or update owner and dog profiles.
  2. Shopify webhooks import new orders, line items, SKUs, tags, and fulfillment events.
  3. A matching engine connects each ordered SKU to the right dog and nutrition recommendation.

Once the data is matched, the system automatically builds personalized documents containing:

  • The dog’s name, age, breed, and activity level.
  • Health goals like digestion, mobility, skin and coat, or immunity.
  • Recommended recipes and supplements.
  • Daily calories and serving quantities.
  • Product weight, ingredients, and nutritional analysis.
  • Order-specific front and back packaging labels.

Operations dashboard

A Shopify-authenticated dashboard gives the operations team one place to:

  • Search orders by email, order number, or customer name.
  • See whether a customer completed the nutrition quiz.
  • Monitor fulfillment status in real time.
  • Correct customer email addresses.
  • Regenerate product labels.
  • Download individual PDFs and labels.
  • Queue emails for one or many orders.
  • Manage product information, ingredients, and notification addresses.

Long-running PDF and email jobs run in background queues, so the dashboard stays responsive. Shopify fulfillment webhooks update the interface over WebSockets, with no page refresh.

Technical approach

We built it with:

  • Ruby on Rails and PostgreSQL
  • Shopify API, App Bridge, and verified webhooks
  • Sidekiq for background processing
  • Action Cable and CableReady for live updates
  • Chromium-based HTML-to-PDF rendering
  • Active Storage and Action Mailer
  • SKU-based product and recipe mapping
  • Responsive HTML and CSS templates for print-ready documents

One decision mattered more than the rest: store a snapshot of the quiz data with every generated label. That preserves the exact customer information used when the document was created, even if the quiz changes later.

The result

The finished system replaced a multi-step manual process with an event-driven production workflow. A new Shopify order gets enriched with quiz data, turned into personalized nutrition materials, and handed to the operations team automatically.

It also handles multi-dog orders, multiple recipe families, subscription-order rules, bulk processing, missing-quiz cases, and manual regeneration when operations need a correction.

The result is a repeatable link between customer personalization, ecommerce data, and physical fulfillment, with the brand’s visual identity preserved across every generated document.

Need something like this built?

The first call is 30 minutes with zero pitch. We reply within one business day.

Book a free consult