Skip to main content

CRM & Customers

Manage customer profiles, tags, comments, tasks, calendar events, and perform global searches across all data sources.

Customer Profile

Get a complete customer profile including CRM data, comments, tags, and conversation summary:

curl

curl -X POST https://www.wazion.com/api/mcp/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $WAZION_TOKEN" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "get_customer_info",
"arguments": {
"phone": "+34600000000"
}
},
"id": 1
}'

Python

import requests

def get_customer(token, phone):
return requests.post(
"https://www.wazion.com/api/mcp/",
headers={
"Content-Type": "application/json",
"Authorization": f"Bearer {token}"
},
json={
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "get_customer_info",
"arguments": {"phone": phone}
},
"id": 1
}
).json()

Search across all data sources (CRM, contacts, conversations):

{
"name": "global_search",
"arguments": {
"query": "John"
}
}

Comments / Notes

Add internal notes to customer profiles:

{
"name": "add_customer_comment",
"arguments": {
"phone": "+34600000000",
"comment": "Interested in premium plan. Follow up next week.",
"agent_name": "Ana"
}
}

Search across all customer notes:

{
"name": "search_customer_comments",
"arguments": {
"query": "premium plan"
}
}

Tags

Classify customers with colored tags:

// Add a tag
{
"name": "add_customer_tag",
"arguments": {
"phone": "+34600000000",
"tag_name": "VIP",
"tag_color": "#FFD700"
}
}

// Remove a tag
{
"name": "remove_customer_tag",
"arguments": {
"phone": "+34600000000",
"tag_name": "VIP"
}
}

Configure available tags for your shop:

{
"name": "update_customer_tags",
"arguments": {
"add_tag": {"name": "VIP", "color": "#FFD700"}
}
}

Customer Journey

View a complete timeline of all interactions with a customer:

{
"name": "get_customer_journey",
"arguments": {
"phone": "+34600000000",
"days": 30
}
}

Returns messages, comments, files, tasks, orders, and more in chronological order.

Customer Lifetime Value

Calculate business metrics for a customer:

{
"name": "get_customer_lifetime_value",
"arguments": {
"phone": "+34600000000"
}
}

Merge Customers

Combine two customer records into one:

{
"name": "merge_customers",
"arguments": {
"primary_phone": "+34600000001",
"secondary_phone": "+34600000002"
}
}

GDPR Compliance

Export or delete all customer data for GDPR compliance:

// Export all data (Article 15)
{
"name": "gdpr_export_customer_data",
"arguments": {
"phone": "+34600000000"
}
}

// Delete all data (Article 17) - requires confirmation
{
"name": "gdpr_delete_customer_data",
"arguments": {
"phone": "+34600000000",
"confirm": true
}
}

Tasks

Create and manage tasks linked to customers:

ToolDescription
list_tasksList tasks with filters
create_taskCreate a new task
update_taskUpdate task status, text, priority
delete_taskDelete a task
get_overdue_tasksList overdue tasks
get_agent_tasksTasks for a specific agent
{
"name": "create_task",
"arguments": {
"task_text": "Follow up on quote request",
"phone": "+34600000000",
"due_date": "2026-03-10",
"priority": "high",
"assigned_agent_id": 1
}
}

Calendar Events

Schedule events and appointments:

ToolDescription
list_calendar_eventsList events in a date range
create_calendar_eventCreate a new event
update_calendar_eventModify an event
delete_calendar_eventDelete an event
{
"name": "create_calendar_event",
"arguments": {
"title": "Demo call with John",
"start_datetime": "2026-03-10T10:00:00",
"end_datetime": "2026-03-10T11:00:00",
"phone": "+34600000000",
"assigned_agent_id": 1
}
}

All Customer Tools

ToolTypeDescription
get_customer_infoqueryFull customer profile
get_customer_commentsqueryCustomer comments and tags
add_customer_commentmutationAdd a comment
search_customer_commentsquerySearch all comments
add_customer_tagmutationAdd a tag to customer
remove_customer_tagmutationRemove a tag
search_customersquerySearch customers by name/phone/email
get_customer_journeyqueryFull interaction timeline
global_searchquerySearch across all data sources
merge_customersmutationMerge two customer records
get_customer_lifetime_valuequeryBusiness value metrics
gdpr_export_customer_dataqueryExport all data (GDPR)
gdpr_delete_customer_datamutationDelete all data (GDPR)

Gotchas

  • Phone numbers must include the + international prefix.
  • Tags are defined at the shop level with update_customer_tags and then applied to individual customers with add_customer_tag.
  • GDPR deletion is irreversible and requires a confirmation call (confirm: true).
  • global_search searches CRM records, contacts from marketing lists, and conversation history.