Scenario
You maintain curated Shopify collections (e.g., “Summer Essentials”). You pull all products from a target collection, use their existing descriptions to create a Mavera brand voice, then generate fresh marketing copy — product descriptions, social posts, email subject lines — with voice consistency across the entire collection.Architecture
Code
Example Output
Error Handling
Collection handle not found
Collection handle not found
If
collectionByHandle returns null, the handle doesn’t exist or is unpublished. Verify in Shopify Admin → Products → Collections → URL handle. Handles are case-sensitive and use hyphens. Query collections(first: 10) to list available handles.Brand voice — insufficient samples
Brand voice — insufficient samples
Mavera requires at least 3 text samples to create a brand voice. If your collection has fewer products with descriptions, combine from multiple collections or add sample copy manually.