การจัดการงาน
Brevo CRM Tasks API ช่วยให้คุณสร้างและจัดการกิจกรรมการขาย การติดตามผล และการแจ้งเตือน เพื่อให้ทีมของคุณทำงานอย่างเป็นระบบภายในแพลตฟอร์ม Tajo
ภาพรวม
การจัดการงานมีความจำเป็นสำหรับ
- การติดตามผลการขาย พร้อมการแจ้งเตือนอัตโนมัติและวันครบกำหนด
- การประสานงานในทีม มอบหมายกิจกรรมให้สมาชิกทีมแต่ละคน
- ความคืบหน้าของดีล เชื่อมโยงงานเข้ากับดีลและบริษัท
- การติดตามกิจกรรม ตรวจสอบประสิทธิภาพของทีมและอัตราการทำงานสำเร็จ
- การสร้างความผูกพันกับลูกค้า วางกำหนดการติดต่อและเช็กอินสำหรับโปรแกรมสะสมคะแนน
เริ่มต้นอย่างรวดเร็ว
สร้างงาน
POST https://api.brevo.com/v3/crm/tasksContent-Type: application/jsonapi-key: YOUR_API_KEY
{ "name": "Follow up on Enterprise Loyalty proposal", "taskType": "call", "date": "2026-02-15T10:00:00Z", "duration": 1800, "notes": "Discuss volume discount tier and loyalty point allocation", "companiesIds": ["comp_123456789"], "dealsIds": ["deal_abc123def456"], "contactsIds": [12345], "done": false, "reminder": { "value": 15, "unit": "minutes" }}การตอบกลับ
{ "id": "task_xyz789", "name": "Follow up on Enterprise Loyalty proposal", "taskType": "call", "date": "2026-02-15T10:00:00Z", "done": false, "created_at": "2026-01-25T14:30:00Z"}ดึงข้อมูลงาน
แสดงรายการงานทั้งหมด
GET https://api.brevo.com/v3/crm/tasks?limit=50&offset=0&sort=descContent-Type: application/jsonapi-key: YOUR_API_KEYการตอบกลับ
{ "items": [ { "id": "task_xyz789", "name": "Follow up on Enterprise Loyalty proposal", "taskType": "call", "date": "2026-02-15T10:00:00Z", "duration": 1800, "done": false, "companiesIds": ["comp_123456789"], "dealsIds": ["deal_abc123def456"], "created_at": "2026-01-25T14:30:00Z" } ], "total": 1}กรองงาน
GET https://api.brevo.com/v3/crm/tasks?filters[done]=false&filters[taskType]=call&sort=date:ascดึงงานรายการเดียว
GET https://api.brevo.com/v3/crm/tasks/{task_id}Content-Type: application/jsonapi-key: YOUR_API_KEYประเภทของงาน
CRM รองรับงานหลายประเภทสำหรับกิจกรรมการขายที่แตกต่างกัน
| ประเภท | คำอธิบาย | กรณีใช้งาน |
|---|---|---|
call | การโทรศัพท์ | โทรติดตามผล เดโม การเช็กอิน |
email | การติดต่อทางอีเมล | ข้อเสนอ อัปเดต จดหมายข่าว |
meeting | การประชุมแบบพบตัวหรือออนไลน์ | เดโม การเจรจา การทบทวน |
todo | งานทั่วไป | งานภายใน การค้นคว้า การเตรียมงาน |
deadline | งานที่มีกำหนดเวลาจำกัด | การต่อสัญญา ไมล์สโตน |
การสร้างงานอัตโนมัติ
การสร้างงานอัตโนมัติตามดีล
สร้างงานโดยอัตโนมัติเมื่อดีลเคลื่อนผ่านแต่ละขั้น
class TaskAutomation { constructor() { this.tasksApi = new TasksApi(); }
async createDealFollowUp(deal, stageChange) { const taskTemplates = { 'Lead': { name: `Qualify lead: ${deal.name}`, taskType: 'call', daysFromNow: 1, duration: 900 }, 'Qualified': { name: `Schedule demo: ${deal.name}`, taskType: 'meeting', daysFromNow: 3, duration: 3600 }, 'Demo': { name: `Send proposal: ${deal.name}`, taskType: 'email', daysFromNow: 1, duration: 1800 }, 'Proposal': { name: `Follow up on proposal: ${deal.name}`, taskType: 'call', daysFromNow: 5, duration: 900 }, 'Negotiation': { name: `Finalize contract: ${deal.name}`, taskType: 'deadline', daysFromNow: 7, duration: 3600 }, 'Closed Won': { name: `Onboard customer: ${deal.name}`, taskType: 'meeting', daysFromNow: 2, duration: 3600 } };
const template = taskTemplates[stageChange.newStage]; if (!template) return null;
const taskDate = new Date(); taskDate.setDate(taskDate.getDate() + template.daysFromNow);
return await this.tasksApi.createTask({ name: template.name, taskType: template.taskType, date: taskDate.toISOString(), duration: template.duration, assignTo: deal.attributes.deal_owner, dealsIds: [deal.id], companiesIds: deal.attributes.company_id ? [deal.attributes.company_id] : [], contactsIds: deal.attributes.contact_id ? [deal.attributes.contact_id] : [], done: false, reminder: { value: 30, unit: 'minutes' } }); }
async createLoyaltyCheckIn(company) { return await this.tasksApi.createTask({ name: `Loyalty program check-in: ${company.name}`, taskType: 'call', date: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000).toISOString(), duration: 1800, assignTo: company.attributes.account_manager, companiesIds: [company.id], notes: `Review tier status: ${company.attributes.loyalty_tier}\nAnnual spend: $${company.attributes.annual_spend}`, done: false, reminder: { value: 1, unit: 'days' } }); }}การจัดการงานแบบกลุ่ม
class BulkTaskManager { async createRenewalTasks(daysBeforeExpiry = 90) { const renewalDate = new Date(); renewalDate.setDate(renewalDate.getDate() + daysBeforeExpiry);
const companies = await this.companiesApi.getCompanies({ filters: { 'attributes.renewal_date': `<${renewalDate.toISOString()}` } });
const tasks = []; for (const company of companies.items) { const task = await this.tasksApi.createTask({ name: `Contract renewal: ${company.name}`, taskType: 'deadline', date: company.attributes.renewal_date, assignTo: company.attributes.account_manager, companiesIds: [company.id], notes: `Contract value: $${company.attributes.contract_value}\nCurrent tier: ${company.attributes.loyalty_tier}`, done: false, reminder: { value: 7, unit: 'days' } }); tasks.push(task); }
return tasks; }}เอกสารอ้างอิงเมธอดของ API
// Create a new taskconst task = await tasksApi.createTask({ name: 'Follow up call', taskType: 'call', date: '2026-02-15T10:00:00Z', done: false});
// Get task by IDconst task = await tasksApi.getTask('task_xyz789');
// Update taskawait tasksApi.updateTask('task_xyz789', { done: true, notes: 'Customer agreed to upgrade tier'});
// Delete taskawait tasksApi.deleteTask('task_xyz789');
// List tasks with filteringconst tasks = await tasksApi.getTasks({ filters: { done: false, taskType: 'call', }, sort: 'date:asc', limit: 50});แนวทางปฏิบัติที่ดีที่สุด
- สร้างงานแบบอัตโนมัติ: เชื่อมโยงงานเข้ากับการเปลี่ยนขั้นของดีล เพื่อให้การติดตามผลมีความสม่ำเสมอ
- ตั้งการแจ้งเตือน: ตั้งค่าการแจ้งเตือนสำหรับงานที่มีกำหนดเวลาจำกัดเสมอ
- เชื่อมโยงเรกคอร์ด: ผูกงานเข้ากับดีล บริษัท และคอนแทกต์ เพื่อให้เห็นบริบทครบถ้วน
- ติดตามการทำงานสำเร็จ: ตรวจสอบอัตราการทำงานสำเร็จ เพื่อดูข้อมูลเชิงลึกด้านประสิทธิภาพของทีม
- ใช้ประเภทของงาน: จัดหมวดหมู่งานให้ถูกต้อง เพื่อให้รายงานกิจกรรมมีความแม่นยำ
การจัดการข้อผิดพลาด
try { const task = await tasksApi.createTask(taskData); console.log('Task created:', task.id);} catch (error) { if (error.status === 400) { console.error('Invalid task data:', error.message); } else if (error.status === 404) { console.error('Associated deal or contact not found'); } else { console.error('Unexpected error:', error); }}ขั้นตอนถัดไป
- การจัดการบริษัท - จัดการบัญชีองค์กร
- การจัดการดีล - ติดตามไปป์ไลน์การขาย
- โน้ต - บันทึกการปฏิสัมพันธ์กับลูกค้า
- ไฟล์ - จัดการไฟล์แนบของดีล