MAPI Manual

NAME

LIST_AGILE_TALKS

FUNCTION

List inbound and outbound messages of an agile

SYNOPSIS

agile_id, by_type, by_id, contact_id, io_type, from, to, time_from, time_to, order_type, search_limit

DESCRIPTION

This function allows users to list the talks of an agile, which includes the inbound and outbound messages. Multiple search criteria can be applied to filter your list results.

Required Parameters

* action: LIST_AGILE_TALKS.
* agile_id: ID of the agile activity.

Optional Parameters

* by_type: specifies whether search by contact group ID or contact book ID. Available values are given below:

  • MCPTYPE_BY_CONTACTGROUPID: search by contact group ID.
  • MCPTYPE_BY_CONTACTBOOKID: search by contact book ID.

* by_id: this is the corresponding contact group ID or contact book ID according to the "by_type".

* contact_id: ID of the contact. It'll list talks only for this contact. Note: If this parameter is included in the request, "by_type" and "by_id" must also be included.

* io_type: specifies the type of messages to be listed. Available values are given below:

  • MCPTYPE_IN: inbound messages.
  • MCPTYPE_OUT: outbound messages.

* from: sender number. It searches messages sent from this number. Number format is country code + mobile number, e.g., +61412345678. Note: Use "+" before the country code. Must be URL encoded.

* to: mobile number of the recipient. It searches the messages that were sent to this destination number. Number format is country code + mobile number, e.g., +61412345678. Note: Use "+" before the country code. Must be URL encoded.

* time_from: the beginning of time interval. This field together with "time_to" are used to filter search results based on the date and time the message was sent/received. Message whose timestamp is greater than or equal to the time_from and less than the time_to will be returned. The date and time format is YYYY-MM-DD HH:MM:SS. Must be URL encoded.

* time_to: the end of time interval. This field together with "time_from" are used to filter results based on the date and time the message was sent/received. Message whose timestamp is greater than or equal to the time_from and less than the time_to will be returned. The date and time format is YYYY-MM-DD HH:MM:SS. Must be URL encoded.

* order_type: specifies the list order of the results. Value is either "DESC" or "ASC", which means in descending or ascending order respectively. Default is "DESC", which lists the most recent talks first.

* search_limit: constrains the number of search results that are returned. It can also be used for pagination of search results. Value is a number or two numbers split by a comma. With one number, the value specifies the maximum number of results to return from the beginning of the search results. With two numbers, the first number specifies the offset of the first result to return, and the second specifies the maximum number of results to return. Note: The offset of the first result is 0 (not 1).  E.g., if value is "5", the first five search results will be returned; if value is "20,5", it will return maximum five results starting from the 21st result. Default value is 100.



RETURN DATA

The response contains the following attributes:

* mcp_talk_id: talk ID.

* mcp_channeltype_id: channel type.

* sender: originated mobile number, where the message was sent from.

* recipient: destination mobile number, where the message was sent to.

* contactbook_id: ID of the contact book.

* contact_id: ID of the contact.

* contact_name: name of the contact.

* content: the message content encoded in hexadecimal text.

* task_io: specifies whether the message was inbound or outbound. Below is a list of the types:

  • "MCPTYPE_IN": inbound message,
  • "MCPTYPE_OUT": outbound message.

* status: specifies the status of the message. Below is a list of the statuses:

  • "delivered": the outbound message has been received by the recipient,
  • "finish_success": the message has been successfully sent or received by us.

* talk_dt: the date and time the message was sent or received.

* note: a note about the message.

ROLE PERMITTED

Manager

EXAMPLES

The following example shows a successful HTTP GET request and response.

Request:

http://app02.yvntech.com/MapIHttpS/MapIS?action=LIST_AGILE_TALKS&agile_id=924&io_type=MCPTYPE_IN&login_name=user@example.com&login_passwd=1111

Response:

<result tftype='1' infotype='0'>
    <resultset name='mcp_butalk' search_found_rows='1'>
        <row>
            <field name='mcp_talk_id'>23772</field>
            <field name='mcp_channeltype_id'>sms</field>
            <field name='sender'>61412345678</field>
            <field name='recipient'>61447100306</field>
            <field name='contactbook_id'>1</field>
            <field name='contact_id'>6783</field>
            <field name='contact_name'>Drake</field>
            <field name='content'>48656c6c6f20776f726c64</field>
            <field name='task_io'>MCPTYPE_IN</field>
            <field name='status'>finish_success</field>
            <field name='talk_dt'>2014-10-24 11:28:24</field>
            <field name='note'></field>

        </row>

        ...

        ...

    </resultset>
</result>

TIPS

ENVIRONMENT

AUTHOR

YVN Tech

SEE ALSO

LIST_CONTACTGROUP_TALKS

Mweb v2.0 YVNTECH 2014