---
created: 2026-03-24T07:02:11.636Z
title: New Card button with recipient search and Shopify draft order creation
area: ui
files:
  - crates/app/ui/dashboard.slint
  - crates/app/src/main.rs
  - crates/integrations/src/shopify
---

## Problem

There's no way to initiate a new shipment/card from within WITwhat. The user must manually go to Shopify, find the right customer, create a draft order, and tag it. This breaks the workflow — WITwhat knows all the recipients and their Shopify profiles already.

## Solution

Add a "New Card" button to the dashboard that:

1. **Opens a fuzzy search modal** — reuse or extend the existing recipient picker pattern. User types to filter recipients by name.
2. **On recipient selection** — opens the user's browser to the Shopify admin draft order creation page for that recipient's corresponding Shopify customer profile. URL format: `https://{store-slug}.myshopify.com/admin/draft_orders/new?customer_id={shopify_customer_id}`
3. **Auto-populate the `wit-what` tag** on the draft order if possible. Research whether Shopify draft order creation URL supports query params for tags, or whether a Shopify Admin API call (`POST /admin/api/2024-01/draft_orders.json`) is needed to pre-create the draft with the tag attached.

Key data already available:
- `shopify_customer_id` is on each recipient (from cards table / RecipientCardSnapshot)
- `shopify_store_slug` is in AppConfig
- Fuzzy search is already implemented for the recipient picker modal

If the Shopify URL doesn't support tag pre-population, consider: create the draft order via API with the tag, then open the browser to the draft order edit page instead of the new page.
