Skip to Content
Uncodie Market Fit está disponible 🎉

Create Task

This tool creates a new task in the database using the appropriate category based on the client’s needs and business context. The tool only requires the lead_id and automatically obtains user_id and site_id from the lead information.

Input Schema

{ "title": "string", // Required - Title of the task "type": "string", // Required - Type/category of the task (free text, any custom type allowed) "lead_id": "string", // Required - ID of the lead (UUID format) "description": "string", // Optional - Detailed description of the task "status": "string", // Optional - Status of the task (default: "pending") "stage": "string", // Optional - Current stage of the task (default: "pending") "priority": "number", // Optional - Priority level (integer, 0 = lowest) "user_id": "string", // Optional - ID of the user (obtained automatically from lead if not specified) "site_id": "string", // Optional - ID of the site (obtained automatically from lead if not specified) "due_date": "string", // Optional - Due date for the task (ISO format) "scheduled_date": "string", // Optional - Scheduled date for the task (ISO format) "amount": "number", // Optional - Monetary amount associated with the task "assignee": "string", // Optional - User assigned to the task (UUID format) "notes": "string", // Optional - Additional notes about the task "command_id": "string", // Optional - ID of the command that generated this task "agent_id": "string", // Optional - ID of the agent that created this task "metadata": "object", // Optional - Additional metadata for the task "address": "object" // Optional - Address information as JSON object }

Output Schema

{ "success": "boolean", "task": { "id": "string", "title": "string", "description": "string", "type": "string", "status": "string", "stage": "string", "priority": "number", "user_id": "string", "site_id": "string", "lead_id": "string", "due_date": "string", "scheduled_date": "string", "amount": "number", "assignee": "string", "notes": "string", "command_id": "string", "agent_id": "string", "metadata": "object", "address": "object", "created_at": "string", "updated_at": "string" }, "error": "string" // Only included if there was an error }

Description

The Create Task tool automatically creates tasks with the most appropriate category based on the client’s context and business needs. The tool handles:

  1. Automatic category selection based on the business context and client requirements
  2. Lead-based tasks for follow-up and customer engagement activities
  3. Marketing tasks for campaigns, content creation, and promotional activities
  4. Sales tasks for prospecting, demos, and deal management
  5. Support tasks for customer service and issue resolution
  6. Content tasks for content planning, creation, and publishing
  7. Administrative tasks for internal processes and documentation

Task Categories/Types (Suggested Examples)

Note: The type field accepts any string value. These are common examples, but you can create custom task types as needed.

TypeDescriptionUse Case
website_visitWebsite visit tracking tasksTracking and following up on website visits
demoProduct demonstration tasksScheduling and conducting product demos
meetingMeeting and appointment tasksScheduling meetings with leads and clients
emailEmail communication tasksEmail follow-ups and communication
callPhone call tasksMaking calls to leads and customers
quoteQuote generation tasksCreating and sending quotes
contractContract management tasksContract creation and management
paymentPayment processing tasksPayment follow-ups and processing
referralReferral tracking tasksManaging and tracking referrals
feedbackFeedback collection tasksCollecting customer feedback
follow_upGeneral follow-up tasksFollowing up with leads and customers
supportCustomer support tasksHandling customer support issues
custom_typeAny custom task typeCreate your own task types as needed

Task Stages (Customer Journey)

StageDescription
awarenessCustomer becomes aware of the product/service
considerationCustomer is considering the product/service
decisionCustomer is making a decision about purchasing
purchaseCustomer is in the purchasing process
retentionCustomer has purchased and is being retained
referralCustomer is referring others to the product/service

Note: These are the standard customer journey stages, but custom stages can also be used as needed.

Task Status

StatusDescription
pendingTask is created but not yet started
in_progressTask is currently being worked on
completedTask has been finished successfully
failedTask has failed or encountered an error

Priority Levels

PriorityDescription
lowLow priority task
mediumMedium priority task (default)
highHigh priority task
urgentUrgent task requiring immediate attention

Address Object Format

The address field accepts a JSON object with flexible structure. Here are examples of common formats:

Basic Address Format

{ "street": "123 Main Street", "city": "New York", "state": "NY", "zipcode": "10001", "country": "USA" }

Business Address Format

{ "company": "ABC Corporation", "street": "456 Business Ave", "floor": "5th Floor", "suite": "Suite 500", "city": "San Francisco", "state": "CA", "zipcode": "94105", "country": "USA", "timezone": "PST" }

International Address Format

{ "street": "Calle Revolución 123", "neighborhood": "Zona Rosa", "city": "Ciudad de México", "state": "CDMX", "postal_code": "06600", "country": "México", "coordinates": { "lat": 19.4326, "lng": -99.1332 } }

Meeting Location Format

{ "venue_name": "Conference Center Downtown", "street": "789 Convention Blvd", "room": "Meeting Room A", "city": "Miami", "state": "FL", "zipcode": "33101", "country": "USA", "parking_instructions": "Valet parking available at main entrance", "access_code": "1234" }

Delivery Address Format

{ "recipient": "John Doe", "company": "Tech Solutions Inc", "street": "321 Innovation Drive", "apartment": "Unit 15B", "city": "Austin", "state": "TX", "zipcode": "78701", "country": "USA", "delivery_notes": "Ring doorbell twice, leave at front door if no answer", "preferred_time": "9:00 AM - 5:00 PM" }

Virtual/Online Address Format

{ "type": "virtual", "platform": "Zoom", "meeting_url": "https://zoom.us/j/1234567890", "meeting_id": "123 456 7890", "passcode": "meeting123", "backup_phone": "+1-555-000-0000" }

Note: The address field is completely flexible - you can include any JSON structure that makes sense for your specific task type.

Example Usage

// Example 1: Minimal task creation (only required fields) { "title": "Follow up with John Doe", "type": "call", "lead_id": "abcdef12-3456-7890-abcd-ef1234567890" } // Example 2: Task with additional details { "title": "Follow up with John Doe", "description": "Call to discuss product demo feedback and next steps", "type": "follow_up", "stage": "consideration", "priority": 10, "status": "pending", "lead_id": "abcdef12-3456-7890-abcd-ef1234567890", "scheduled_date": "2023-12-15T14:00:00Z" } // Example 3: Custom task type { "title": "Technical consultation", "description": "Provide technical consultation for enterprise integration", "type": "technical_consultation", "stage": "decision", "priority": 15, "status": "pending", "lead_id": "abcdef12-3456-7890-abcd-ef1234567890", "scheduled_date": "2023-12-20T00:00:00Z", "address": { "street": "123 Business Ave", "city": "New York", "state": "NY", "zipcode": "10001", "country": "USA" } } // Example 4: Quote task with amount { "title": "Send follow-up email about pricing", "description": "Send detailed pricing information and answer client questions", "type": "quote", "stage": "purchase", "priority": 8, "status": "pending", "lead_id": "abcdef12-3456-7890-abcd-ef1234567890", "scheduled_date": "2023-12-18T00:00:00Z", "amount": 25000.50, "notes": "Client interested in enterprise package with custom integrations" }

Error Handling

The tool will return an error in the following scenarios:

  • Missing required fields (title, type, lead_id)
  • Invalid lead ID (lead not found in the database)
  • Invalid user ID (if manually specified and user not found)
  • Invalid site ID (if manually specified and site not found)
  • Invalid date formats for scheduled_date
  • Invalid priority level
  • Database connection errors

Note: Task type validation has been removed - any string value is now accepted for maximum flexibility.

If an error occurs, the response will include an error field with a descriptive message, and the success field will be false.

Automatic Data Assignment

The tool includes intelligent data assignment based on lead information:

  • User Assignment: Automatically obtains the user_id from the lead’s assigned user
  • Site Assignment: Automatically obtains the site_id from the lead’s associated site
  • Override Capability: Manual specification of user_id or site_id will override the automatic assignment
  • Lead context: Uses lead information to suggest appropriate task categories
  • Agent context: Uses agent type to suggest appropriate task categories
  • Customer Journey Stages: Uses standard customer journey stages for better task categorization
  • Flexible Task Types: Supports any custom task type to meet specific business needs

Integration with Other Systems

  • CRM Integration: Automatically syncs tasks with connected CRM systems
  • Calendar Integration: Can create calendar events for scheduled tasks
  • Notification System: Sends notifications to assigned users
  • Reporting: Tasks are included in productivity and performance reports
  • Workflow Automation: Can trigger automated workflows based on task completion

API Tester

Prueba la API de Create Task directamente desde esta documentación:

Crear Nueva Tarea

Usa este formulario para probar la creación de tareas en tiempo real.

Last updated on