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.
From wix-ecom-coworknpx claudepluginhub itayher/wix-ecom-cowork --plugin wix-ecom-coworkThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
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