From wix-ecom-cowork
Manages Wix contact segments for email marketing campaigns using Contacts Segments API. Lists segments and matches to criteria like purchase history, engagement, location.
How this skill is triggered — by the user, by Claude, or both
Slash command
/wix-ecom-cowork:email-segmentsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Manage contact segments for email marketing campaigns using the Wix Contacts Segments API. Segments allow dynamic filtering of contacts based on criteria like purchase history, engagement, location, and more.
Manage contact segments for email marketing campaigns using the Wix Contacts Segments API. Segments allow dynamic filtering of contacts based on criteria like purchase history, engagement, location, and more.
IMPORTANT: All filtering criteria (spend amounts, dates, etc.) should match USER'S intent, not hardcoded values!
df7c18eb-009b-4868-9891-15e19dddbe67${API_KEY}${SITE_ID}Endpoint: GET https://www.wixapis.com/_api/contacts-segments-app/v1/segments
curl -X GET "https://www.wixapis.com/_api/contacts-segments-app/v1/segments" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}"
Response:
{
"segments": [
{
"id": "b7755068-85a6-4113-a5db-0b2727b0b852",
"name": "High Value Customers",
"description": "Customers who spent $500+",
"contactCount": 145,
"type": "DYNAMIC",
"filters": {
"totalSpent": {"$gte": 500}
}
},
{
"id": "segment-456",
"name": "Newsletter Subscribers",
"contactCount": 892,
"type": "STATIC"
}
]
}
High Value Customers:
Note: Actual spend threshold should match user's business model
New Customers:
Repeat Customers:
Dormant Customers:
Newsletter Subscribers:
Active Readers:
Unengaged:
By Location:
By Product Interest:
When user requests a campaign to specific audience, search for matching segment:
echo "🔍 Finding matching segment for: High-value customers who bought recently"
segments=$(curl -s -X GET "https://www.wixapis.com/_api/contacts-segments-app/v1/segments" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}")
# Search by name/description (AI matching)
echo "$segments" | jq '[.segments[] | select(
(.name | test("high value|vip|premium|big spender"; "i")) or
(.description | test("spent.*500|high.*spend|premium"; "i"))
)] | {
matchedSegments: [.[] | {id, name, contactCount}],
recommendation: (if length > 0 then "✅ Use existing segment" else "⚠️ Create new segment or label" end)
}'
Available Filters:
totalSpent - Total customer lifetime valueorderCount - Number of orderslastPurchaseDate - Date of last purchasefirstPurchaseDate - Date of first purchaseemailStatus - Subscribed, unsubscribed, bouncedlocation - Country, state, citytags - Custom contact tagscustomFields - Custom contact dataOperators:
$gt - Greater than$gte - Greater than or equal$lt - Less than$lte - Less than or equal$eq - Equals$in - In array$and - Logical AND$or - Logical ORsegments=$(curl -s -X GET "https://www.wixapis.com/_api/contacts-segments-app/v1/segments" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}")
# USER_SPEND_THRESHOLD should match user's request (not hardcoded!)
USER_SPEND_THRESHOLD=${USER_SPEND_THRESHOLD:-100} # Default, adjust to user intent
vip_segment=$(echo "$segments" | jq -r --arg threshold "$USER_SPEND_THRESHOLD" '.segments[] | select(
(.filters.totalSpent."$gte" // 0) >= ($threshold | tonumber) or
(.name | test("vip|premium|high value"; "i"))
) | {id, name, contactCount}')
echo "$vip_segment"
SEGMENT_ID="b7755068-85a6-4113-a5db-0b2727b0b852"
segments=$(curl -s -X GET "https://www.wixapis.com/_api/contacts-segments-app/v1/segments" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}")
echo "$segments" | jq --arg id "$SEGMENT_ID" '.segments[] | select(.id == $id) | {
segmentName: .name,
contactCount: .contactCount,
type: .type,
message: "This segment has \(.contactCount) contacts"
}'
When user says: "Send campaign to customers who bought in last 30 days"
AI Analysis:
User intent: Recent customers
Criteria: Purchase in last 30 days
Searching segments for matches:
1. "Recent Buyers" → 85% match ✅
2. "New Customers" → 75% match
3. "Active Shoppers" → 60% match
Recommendation: Use segment "Recent Buyers" (id: abc-123)
Contact count: 234
npx claudepluginhub wix/wix-ecom-cowork --plugin wix-ecom-coworkUpdates Wix email campaign recipients using segments, labels, contact IDs, or filters via the Wix Email Marketing API PATCH endpoint. Useful for dynamic audience management in campaigns.
Creates audience segments in CRM, email, or ad platforms based on behavioral, demographic, or engagement criteria. Supports RFM modeling and lifecycle segmentation.
Create foundational segmented lists for marketing and sales operations. Includes a master sendable list, ICP-based lists, persona lists, engagement lists, and behavioral lists. All active (dynamic) lists.