Tasks

Tasks are action items with a given date that are assigned to a sales rep
View as Markdown

Tasks are action items with a given date that are assigned to a sales rep.

Incomplete tasks (is_complete is false) show in the sales rep’s inbox, whereas complete tasks (is_complete is true) are shown in the archive. Archived tasks of certain types are automatically deleted after a certain amount of time.

The date of a task represents when the task is actionable and appears in the inbox. It can be date-only (e.g. 2015-01-05) or a date-time (e.g. 2015-01-10T05:00:00+00:00). When ordering by date, date-only tasks are ordered before date-time tasks at the given date, taking the time zone (x-tz-offset) into account. For example, in Pacific Standard Time (x-tz-offset: -8) and ascending order, a task dated 2015-01-12 will appear before 2015-01-12T08:00:00, but after 2015-01-12T07:00:00. The due_date field is deprecated and should not be used.

The _type field indicates the task type and can be used to filter tasks. When not filtering by _type, only lead tasks are returned. Use _type=all to show all types, or _type__in=missed_call,voicemail for multiple types. Task types:

  • lead: A to-do item for a given lead. Both object_type and object_id are null.
  • incoming_email: Incoming emails on an email thread. The object_type is emailthread. Multiple unread emails in one thread are consolidated into one task.
    • emails: array of email activity IDs related to this task.
    • subject: subject of the email thread.
  • email_followup: A reminder to follow up on a sent email with no response. The object_type is emailthread.
    • email_id: the email activity you sent originally.
    • subject, body_preview: data from the email to follow up on.
  • missed_call: A missed call. The object_type is call, and object_id is the activity ID of the missed call.
    • phone: phone number of the remote party.
    • local_phone: the number that was called.
  • answered_detached_call: A call from a number not associated with any contact. The object_type is call.
    • phone: phone number of the remote party.
  • voicemail: A voicemail, similar to missed_call with additional fields.
    • phone, local_phone: same as missed_call.
    • voicemail_duration: duration in seconds.
    • voicemail_url: URL of the voicemail recording.
  • opportunity_due: An opportunity scheduled to close on this date. The object_type is opportunity.
  • incoming_sms: An incoming SMS. The object_type is sms.
    • remote_phone: phone number of the sender.
    • local_phone: the number that was texted.
    • attachments: present for MMS; array of attachment objects.
  • outgoing_call: A call task for a given contact. The object_type is call, and object_id is the activity ID of the call.