All Classes Pages
ActivitySearchExamples Class Reference

More...

Detailed Description

Examples for Activity Search

Example 1 - Search for activities by customer

This example demonstrates the following:

  • Search for activities based on customer ID.
  • Requesting all attributes to be returned in the response.
  • Representation of all supported attributes in the response.
  • Default sorting (on activity ID in ascending order)

XML

Request

Method URL
GET /ws/v12/interaction/activity?customer=1002&$attribute=all

Request headers

Name Value
X-egain-session Valid session ID
Accept application/xml
Accept-Language en-US

Response
HTTP/1.1 200 OK

Response headers

Name Value
X-egain-session current session ID
Content-Type application/xml

Response body

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<activities xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity"
xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/interaction/case"
xmlns:ns3="http://bindings.egain.com/ws/model/v12/gen/platform"
xmlns:ns4="http://bindings.egain.com/ws/model/v12/gen/common"
xmlns:ns5="http://bindings.egain.com/ws/model/v12/gen/interaction/folder"
xmlns:ns6="http://bindings.egain.com/ws/model/v12/gen/interaction/customer"
xmlns:ns7="http://bindings.egain.com/ws/model/v12/gen/interaction/contactperson"
xmlns:ns8="http://bindings.egain.com/ws/model/v12/gen/interaction/contactpoint"
xmlns:ns9="http://bindings.egain.com/ws/model/v12/gen/kb"
xmlns:ns10="http://bindings.egain.com/ws/model/v15/gen/kb/edition"
xmlns:ns11="http://bindings.egain.com/ws/model/v15/gen/kb/profile"
xmlns:ns12="http://bindings.egain.com/ws/model/v12/gen/interaction/attachment"
xmlns:ns13="http://bindings.egain.com/ws/model/v12/gen/mail/alias"
xmlns:ns14="http://bindings.egain.com/ws/model/v12/gen/live/entrypoint">
    <activity id="1011">
        <link rel="self" href="/system/ws/v12/interaction/activity/1011"/>
        <case id="1001">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1001"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>inbound</ns4:value>
            <ns4:displayValue>Inbound</ns4:displayValue>
        </mode>
        <type>
            <value>email</value>
            <displayValue>Email</displayValue>
            <subtype>
                <ns4:value>general</ns4:value>
                <ns4:displayValue>General</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>assigned</value>
            <displayValue>Assigned</displayValue>
            <substatus>
                <ns4:value>in_progress</ns4:value>
                <ns4:displayValue>In Progress</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1002">
                    <ns3:name>JennyAnthony</ns3:name>
                    <ns3:firstName>Jenny</ns3:firstName>
                    <ns3:lastName>Anthony</ns3:lastName>
                </user>
                <activityFolder id="6">
                    <ns5:name>
                        <ns4:value>activities_current</ns4:value>
                        <ns4:displayValue>Current</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <priority>2</priority>
        <created date="2016-03-29T18:18:10.000Z">
            <ns4:user id="12">
                <ns3:name>system</ns3:name>
                <ns3:firstName>System</ns3:firstName>
                <ns3:lastName>Services</ns3:lastName>
            </ns4:user>
        </created>
        <lastModified date="2016-03-29T18:40:32.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </lastModified>
        <dueDate>2016-04-06T07:00:00.000Z</dueDate>
        <subject>Issue with laptop configuration</subject>
        <language>
             <ns4:value>en</ns4:value>
             <ns4:displayValue>English</ns4:displayValue>
        </language>       
        <customer id="1002">
            <ns6:link rel="customer" href="/system/ws/v12/interaction/customer/1002"/>
            <ns6:customerName>John Davis</ns6:customerName>
            <ns6:contactPersons>
                <ns7:contactPerson id="1002">
                    <ns7:isSystemCreated>false</ns7:isSystemCreated>
                    <ns7:firstName>John</ns7:firstName>
                    <ns7:lastName>Davis</ns7:lastName>
                    <ns7:contactPoints>
                        <ns8:contactPoint id="1004">
                            <ns8:type>
                                <ns8:value>email</ns8:value>
                                <ns8:displayValue>Email</ns8:displayValue>
                                <ns8:email>
                                    <ns8:emailAddress>johndavis@example.com</ns8:emailAddress>
                                </ns8:email>
                            </ns8:type>
                        </ns8:contactPoint>
                    </ns7:contactPoints>
                </ns7:contactPerson>
            </ns6:contactPersons>
        </customer>
        <classifications>
            <ns3:category id="456700000001000">
                <ns3:name>Laptop Configuration</ns3:name>
                <ns3:isComplaint>false</ns3:isComplaint>
            </ns3:category>
            <ns3:resolutionCode id="456700000001001">
                <ns3:name>Share Documentation</ns3:name>
            </ns3:resolutionCode>
        </classifications>
        <queue id="1001">
            <ns3:name>Email queue</ns3:name>
        </queue>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1011/attachment"/>
        </attachments>
        <notes>
            <count>1</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1011/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
        <contactPointData>johndavis@example.com</contactPointData>
        <payload>
            <email>
                <hasDraft>false</hasDraft>
                <leaveOpen>false</leaveOpen>
                <isEscalated>false</isEscalated>
                <isOutboundFailed>false</isOutboundFailed>
                <alias id="1000">
                    <ns13:name>alias</ns13:name>
                    <ns13:value>support@business.com</ns13:value>
                </alias>
                <date date="2016-03-29T18:18:10.000Z"/>
                <emailAddresses>
                    <from>johndavis@example.com</from>
                    <to>
                        <address>johndavis@example.com</address>
                    </to>
                    <replyTo>
                        <address>support@business.com</address>
                    </replyTo>
                    <receiver>support@business.com</receiver>
                </emailAddresses>
            </email>
        </payload>
        <customAttributes>
            <ns4:customAttribute>
                <ns4:attribName>complainttype</ns4:attribName>
                <ns4:attribValues>
                    <ns4:attribValue>
                        <ns4:value>incorrect_order</ns4:value>
                        <ns4:displayValue>Incorrect Order</ns4:displayValue>
                    </ns4:attribValue>
                </ns4:attribValues>
            </ns4:customAttribute>
        </customAttributes>
    </activity>
    <activity id="1022">
        <link rel="self" href="/system/ws/v12/interaction/activity/1022"/>
        <case id="1008">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1008"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>none</ns4:value>
            <ns4:displayValue>None</ns4:displayValue>
        </mode>
        <type>
            <value>reorder</value>
            <displayValue>reorder</displayValue>
            <subtype>
                <ns4:value>general</ns4:value>
                <ns4:displayValue>General</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>assignment</value>
            <displayValue>Awaiting Assignment</displayValue>
            <substatus>
                <ns4:value>ready_for_internal_assignment</ns4:value>
                <ns4:displayValue>Ready for assignment</ns4:displayValue>
            </substatus>
            <assigned>
                <activityFolder id="6">
                    <ns5:name>
                        <ns4:value>activities_current</ns4:value>
                        <ns4:displayValue>Current</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <created date="2016-04-01T22:33:37.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </created>
        <lastModified date="2016-04-01T22:36:17.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </lastModified>
        <subject>No Subject [#1008]</subject>
        <userLastWorked id="1002">
            <ns3:name>JennyAnthony</ns3:name>
            <ns3:firstName>Jenny</ns3:firstName>
            <ns3:lastName>Anthony</ns3:lastName>
        </userLastWorked>
        <customer id="1002">
            <ns6:link rel="customer" href="/system/ws/v12/interaction/customer/1002"/>
            <ns6:customerName>John Davis</ns6:customerName>
            <ns6:contactPersons>
                <ns7:contactPerson id="1002">
                    <ns7:isSystemCreated>false</ns7:isSystemCreated>
                    <ns7:firstName>John</ns7:firstName>
                    <ns7:lastName>Davis</ns7:lastName>
                    <ns7:contactPoints>
                        <ns8:contactPoint id="1004">
                            <ns8:type>
                                <ns8:value>email</ns8:value>
                                <ns8:displayValue>Email</ns8:displayValue>
                                <ns8:email>
                                    <ns8:emailAddress>johndavis@example.com</ns8:emailAddress>
                                </ns8:email>
                            </ns8:type>
                        </ns8:contactPoint>
                    </ns7:contactPoints>
                </ns7:contactPerson>
            </ns6:contactPersons>
        </customer>
        <classifications>
            <ns3:category id="456700000001000">
                <ns3:name>Laptop Configuration</ns3:name>
                <ns3:isComplaint>false</ns3:isComplaint>
            </ns3:category>
            <ns3:resolutionCode id="456700000001001">
                <ns3:name>Share Documentation</ns3:name>
            </ns3:resolutionCode>
        </classifications>
        <queue id="1001">
            <ns3:name>Email queue</ns3:name>
        </queue>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1022/attachment"/>
        </attachments>
        <notes>
            <count>0</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1022/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
        <contactPointData>johndavis@example.com</contactPointData>
    </activity>
    <paginationInfo>
        <ns4:count>2</ns4:count>
        <ns4:pagenum>1</ns4:pagenum>
        <ns4:pagesize>25</ns4:pagesize>
    </paginationInfo>
</activities>

     

JSON

Request

Method URL
GET /ws/v12/interaction/activity?customer=1002&$attribute=all

Request headers

Name Value
X-egain-session Valid session ID
Accept application/json
Accept-Language en-US

Response
HTTP/1.1 200 OK

Response headers

Name Value
X-egain-session current session ID
Content-Type application/json

Response body

{
    "activity": [
        {
            "link": {
                "rel": "self",
                "href": "/system/ws/v12/interaction/activity/1011"
            },
            "case": {
                "link": {
                    "rel": "case",
                    "href": "/system/ws/v12/interaction/case/1001"
                },
                "id": 1001
            },
            "department": {
                "name": "Service",
                "id": 999
            },
            "mode": {
                "value": "inbound",
                "displayValue": "Inbound"
            },
            "type": {
                "value": "email",
                "displayValue": "Email",
                "subtype": {
                    "value": "general",
                    "displayValue": "General"
                }
            },
            "isSecure": false,
            "sentOnBehalf": false,
            "status": {
                "value": "assigned",
                "displayValue": "Assigned",
                "substatus": {
                    "value": "in_progress",
                    "displayValue": "In Progress"
                },
                "assigned": {
                    "user": {
                        "name": "JennyAnthony",
                        "firstName": "Jenny",
                        "lastName": "Anthony",
                        "id": 1002
                    },
                    "activityFolder": {
                        "name": {
                            "value": "activities_current",
                            "displayValue": "Current"
                        },
                        "id": 6
                    },
                    "isPinned": false,
                    "isLocked": false
                }
            },
            "priority": "2",
            "created": {
                "user": {
                    "name": "system",
                    "firstName": "System",
                    "lastName": "Services",
                    "id": 12
                },
                "date": "2016-03-29T18:18:10.000Z"
            },
            "lastModified": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-03-29T18:40:32.000Z"
            },
            "dueDate": "2016-04-06T07:00:00.000Z",
            "subject": "Issue with laptop configuration",
            "language":{
                "value": "en",
                "displayValue": "English"
            },
            "customer": {
                "link": {
                    "rel": "customer",
                    "href": "/system/ws/v12/interaction/customer/1002"
                },
                "customerName": "John Davis",
                "contactPersons": {
                    "contactPerson": [
                        {
                            "isSystemCreated": false,
                            "firstName": "John",
                            "lastName": "Davis",
                            "contactPoints": {
                                "contactPoint": [
                                    {
                                        "type": {
                                            "value": "email",
                                            "displayValue": "Email",
                                            "email": {
                                                "emailAddress": "johndavis@example.com"
                                            }
                                        },
                                        "id": 1004
                                    }
                                ]
                            },
                            "id": 1002
                        }
                    ]
                },
                "id": 1002
            },
            "classifications": {
                "category": [
                    {
                        "name": "Laptop Configuration",
                        "isComplaint": false,
                        "id": 456700000001000
                    }
                ],
                "resolutionCode": [
                    {
                        "name": "Share Documentation",
                        "id": 456700000001001
                    }
                ]
            },
            "queue": {
                "name": "Email queue",
                "id": 1001
            },
            "attachments": {
                "count": 0,
                "purgedCount": 0,
                "link": {
                    "rel": "attachment",
                    "href": "/system/ws/v12/interaction/activity/1011/attachment"
                }
            },
            "notes": {
                "count": 1,
                "Link": {
                   "rel": "note",
                   "href": "/system/ws/v12/interaction/activity/1011/note"
                }
            },
            "contactPointData": "johndavis@example.com",
	  "isContentPurged": false,
            "payload": {
                "email": {
                    "hasDraft": false,
                    "leaveOpen": false,
                    "isEscalated": false,
                    "isOutboundFailed": false,
                    "alias": {
                        "name": "alias",
                        "value": "support@business.com",
                        "id": 1000
                    },
                    "date": {
                        "date": "2016-03-29T18:18:10.000Z"
                    },
                    "emailAddresses": {
                        "from": "johndavis@example.com",
                        "to": {
                            "address": [
                                "johndavis@example.com"
                            ]
                        },
                        "replyTo": {
                            "address": [
                                "support@business.com"
                            ]
                        },
                        "receiver": "support@business.com"
                    }
                }
            },
            "customAttributes": {
                "customAttribute": [
                    {
                        "attribName": "complainttype",
                        "attribValues": {
                            "attribValue": [
                                {
                                    "value": "incorrect_order",
                                    "displayValue": "Incorrect Order"
                                }
                            ]
                        }
                    }
                ]
            },
            "id": 1011
        },
        {
            "link": {
                "rel": "self",
                "href": "/system/ws/v12/interaction/activity/1022"
            },
            "case": {
                "link": {
                    "rel": "case",
                    "href": "/system/ws/v12/interaction/case/1008"
                },
                "id": 1008
            },
            "department": {
                "name": "Service",
                "id": 999
            },
            "mode": {
                "value": "none",
                "displayValue": "None"
            },
            "type": {
                "value": "reorder",
                "displayValue": "reorder",
                "subtype": {
                    "value": "general",
                    "displayValue": "General"
                }
            },
            "isSecure": false,
            "sentOnBehalf": false,
            "status": {
                "value": "assignment",
                "displayValue": "Awaiting Assignment",
                "substatus": {
                    "value": "ready_for_internal_assignment",
                    "displayValue": "Ready for assignment"
                },
                "assigned": {
                    "activityFolder": {
                        "name": {
                            "value": "activities_current",
                            "displayValue": "Current"
                        },
                        "id": 6
                    },
                    "isPinned": false,
                    "isLocked": false
                }
            },
            "created": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-01T22:33:37.000Z"
            },
            "lastModified": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-01T22:36:17.000Z"
            },
            "subject": "No Subject [#1008]",
            "userLastWorked": {
                "name": "JennyAnthony",
                "firstName": "Jenny",
                "lastName": "Anthony",
                "id": 1002
            },
            "customer": {
                "link": {
                    "rel": "customer",
                    "href": "/system/ws/v12/interaction/customer/1002"
                },
                "customerName": "John Davis",
                "contactPersons": {
                    "contactPerson": [
                        {
                            "isSystemCreated": false,
                            "firstName": "John",
                            "lastName": "Davis",
                            "contactPoints": {
                                "contactPoint": [
                                    {
                                        "type": {
                                            "value": "email",
                                            "displayValue": "Email",
                                            "email": {
                                                "emailAddress": "johndavis@example.com"
                                            }
                                        },
                                        "id": 1004
                                    }
                                ]
                            },
                            "id": 1002
                        }
                    ]
                },
                "id": 1002
            },
            "classifications": {
                "category": [
                    {
                        "name": "Laptop Configuration",
                        "isComplaint": false,
                        "id": 456700000001000
                    }
                ],
                "resolutionCode": [
                    {
                        "name": "Share Documentation",
                        "id": 456700000001001
                    }
                ]
            },
            "queue": {
                "name": "Reorder queue",
                "id": 1006
            },
            "attachments": {
                "count": 0,
                "purgedCount": 0,
                "link": {
                    "rel": "attachment",
                    "href": "/system/ws/v12/interaction/activity/1022/attachment"
                }
            },
            "notes": {
                "count": 0,
                "Link": {
                   "rel": "note",
                   "href": "/system/ws/v12/interaction/activity/1022/note"
                }
            },
            "contactPointData": "johndavis@example.com",
	  "isContentPurged": false,
            "id": 1022
        }
    ],
    "paginationInfo": {
        "count": 2,
        "pagenum": 1,
        "pagesize": 25
    }
}

     


Example 2 - Search for activities by case with pagination parameters

This example demonstrates the following:

  • Search for activities based on case ID.
  • Getting summary attributes along with payload for the activities.
  • Provide pagination parameters in the request ($pagenum and $pagesize). The paginationInfo element in the response shows the links to the previous and next pages.
  • Default sorting (on activity ID in ascending order)

XML

Request

Method URL
GET /ws/v12/interaction/activity?case=1002&$attribute=payload&$pagenum=2&$pagesize=2

Request headers

Name Value
X-egain-session Valid session ID
Accept application/xml
Accept-Language en-US

Response
HTTP/1.1 200 OK

Response headers

Name Value
X-egain-session current session ID
Content-Type application/xml

Response body

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<activities xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity"
xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/interaction/case"
xmlns:ns3="http://bindings.egain.com/ws/model/v12/gen/platform"
xmlns:ns4="http://bindings.egain.com/ws/model/v12/gen/common"
xmlns:ns5="http://bindings.egain.com/ws/model/v12/gen/interaction/folder"
xmlns:ns6="http://bindings.egain.com/ws/model/v12/gen/interaction/customer"
xmlns:ns7="http://bindings.egain.com/ws/model/v12/gen/interaction/contactperson"
xmlns:ns8="http://bindings.egain.com/ws/model/v12/gen/interaction/contactpoint"
xmlns:ns9="http://bindings.egain.com/ws/model/v12/gen/kb"
xmlns:ns10="http://bindings.egain.com/ws/model/v15/gen/kb/edition"
xmlns:ns11="http://bindings.egain.com/ws/model/v15/gen/kb/profile"
xmlns:ns12="http://bindings.egain.com/ws/model/v12/gen/interaction/attachment"
xmlns:ns13="http://bindings.egain.com/ws/model/v12/gen/mail/alias"
xmlns:ns14="http://bindings.egain.com/ws/model/v12/gen/live/entrypoint">
    <activity id="1015">
        <link rel="self" href="/system/ws/v12/interaction/activity/1015"/>
        <case id="1002">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1002"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>inbound</ns4:value>
            <ns4:displayValue>Inbound</ns4:displayValue>
        </mode>
        <type>
            <value>email</value>
            <displayValue>Email</displayValue>
            <subtype>
                <ns4:value>general</ns4:value>
                <ns4:displayValue>General</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>completed</value>
            <displayValue>Completed</displayValue>
            <substatus>
                <ns4:value>done</ns4:value>
                <ns4:displayValue>Done</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1002">
                    <ns3:name>JennyAnthony</ns3:name>
                    <ns3:firstName>Jenny</ns3:firstName>
                    <ns3:lastName>Anthony</ns3:lastName>
                </user>
                <activityFolder id="7">
                    <ns5:name>
                        <ns4:value>activities_completed</ns4:value>
                        <ns4:displayValue>Completed</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <lastModified date="2016-04-01T21:32:25.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </lastModified>
        <subject>offers [#1002]</subject>
        <customer id="1002">
            <ns6:link rel="customer" href="/system/ws/v12/interaction/customer/1002"/>
            <ns6:customerName>John Davis</ns6:customerName>
            <ns6:contactPersons>
                <ns7:contactPerson id="1002">
                    <ns7:isSystemCreated>false</ns7:isSystemCreated>
                    <ns7:firstName>John</ns7:firstName>
                    <ns7:lastName>Davis</ns7:lastName>
                    <ns7:contactPoints>
                        <ns8:contactPoint id="1004">
                            <ns8:type>
                                <ns8:value>email</ns8:value>
                                <ns8:displayValue>Email</ns8:displayValue>
                                <ns8:email>
                                    <ns8:emailAddress>johndavis@example.com</ns8:emailAddress>
                                </ns8:email>
                            </ns8:type>
                        </ns8:contactPoint>
                    </ns7:contactPoints>
                </ns7:contactPerson>
            </ns6:contactPersons>
        </customer>
        <queue id="1001">
            <ns3:name>Email queue</ns3:name>
        </queue>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1015/attachment"/>
        </attachments>
        <notes>
            <count>1</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1015/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
        <payload>
            <email>
                <lastAction>
                    <value>I18N_CASEMGMT_ACTION_REPLIED</value>
                    <displayValue>Sent</displayValue>
                </lastAction>
                <hasDraft>false</hasDraft>
                <leaveOpen>false</leaveOpen>
                <isEscalated>true</isEscalated>
                <isOutboundFailed>false</isOutboundFailed>
                <alias id="1000">
                    <ns13:name>alias</ns13:name>
                    <ns13:value>support@business.com</ns13:value>
                </alias>
                <date date="2016-04-01T21:00:42.000Z"/>
                <emailAddresses>
                    <from>johndavis@example.com</from>
                    <to>
                        <address>support@business.com</address>
                    </to>
                    <replyTo>
                        <address>johndavis@example.com</address>
                    </replyTo>
                    <receiver>support@business.com</receiver>
                </emailAddresses>
            </email>
        </payload>
    </activity>
    <activity id="1016">
        <link rel="self" href="/system/ws/v12/interaction/activity/1016"/>
        <case id="1002">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1002"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>outbound</ns4:value>
            <ns4:displayValue>Outbound</ns4:displayValue>
        </mode>
        <type>
            <value>email</value>
            <displayValue>Email</displayValue>
            <subtype>
                <ns4:value>reply</ns4:value>
                <ns4:displayValue>Reply</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>completed</value>
            <displayValue>Completed</displayValue>
            <substatus>
                <ns4:value>done</ns4:value>
                <ns4:displayValue>Done</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1002">
                    <ns3:name>JennyAnthony</ns3:name>
                    <ns3:firstName>Jenny</ns3:firstName>
                    <ns3:lastName>Anthony</ns3:lastName>
                </user>
                <activityFolder id="7">
                    <ns5:name>
                        <ns4:value>activities_completed</ns4:value>
                        <ns4:displayValue>Completed</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <lastModified date="2016-04-01T21:32:44.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </lastModified>
        <subject>Re: offers [#1002]</subject>
        <customer id="1002">
            <ns6:link rel="customer" href="/system/ws/v12/interaction/customer/1002"/>
            <ns6:customerName>John Davis</ns6:customerName>
            <ns6:contactPersons>
                <ns7:contactPerson id="1002">
                    <ns7:isSystemCreated>false</ns7:isSystemCreated>
                    <ns7:firstName>John</ns7:firstName>
                    <ns7:lastName>Davis</ns7:lastName>
                    <ns7:contactPoints>
                        <ns8:contactPoint id="1004">
                            <ns8:type>
                                <ns8:value>email</ns8:value>
                                <ns8:displayValue>Email</ns8:displayValue>
                                <ns8:email>
                                    <ns8:emailAddress>johndavis@example.com</ns8:emailAddress>
                                </ns8:email>
                            </ns8:type>
                        </ns8:contactPoint>
                    </ns7:contactPoints>
                </ns7:contactPerson>
            </ns6:contactPersons>
        </customer>
        <queue id="1001">
            <ns3:name>Email queue</ns3:name>
        </queue>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1016/attachment"/>
        </attachments>
        <notes>
            <count>0</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1016/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
        <payload>
            <email>
                <lastAction>
                    <displayValue/>
                </lastAction>
                <hasDraft>false</hasDraft>
                <leaveOpen>false</leaveOpen>
                <isEscalated>false</isEscalated>
                <isOutboundFailed>false</isOutboundFailed>
                <alias id="1000">
                    <ns13:name>alias</ns13:name>
                    <ns13:value>support@business.com</ns13:value>
                </alias>
                <date date="2016-04-01T21:32:25.000Z"/>
                <emailAddresses>
                    <from>support@business.com</from>
                    <to>
                        <address>johndavis@example.com</address>
                    </to>
                    <replyTo>
                        <address>support@business.com</address>
                    </replyTo>
                    <receiver>support@business.com</receiver>
                </emailAddresses>
            </email>
        </payload>
    </activity>
    <paginationInfo>
        <ns4:count>5</ns4:count>
        <ns4:pagenum>2</ns4:pagenum>
        <ns4:pagesize>2</ns4:pagesize>
        <ns4:link rel="prev" href="/system/ws/v12/interaction/activity?case=1002&$attribute=payload&$pagenum=1&$pagesize=2"/>
        <ns4:link rel="next" href="/system/ws/v12/interaction/activity?case=1002&$attribute=payload&$pagenum=3&$pagesize=2"/>
    </paginationInfo>
</activities>

     

JSON

Request

Method URL
GET /ws/v12/interaction/activity?case=1002&$attribute=payload&$pagenum=2&$pagesize=2

Request headers

Name Value
X-egain-session Valid session ID
Accept application/json
Accept-Language en-US

Response
HTTP/1.1 200 OK

Response headers

Name Value
X-egain-session current session ID
Content-Type application/json

Response body

{
    "activity": [
        {
            "link": {
                "rel": "self",
                "href": "/system/ws/v12/interaction/activity/1015"
            },
            "case": {
                "link": {
                    "rel": "case",
                    "href": "/system/ws/v12/interaction/case/1002"
                },
                "id": 1002
            },
            "department": {
                "name": "Service",
                "id": 999
            },
            "mode": {
                "value": "inbound",
                "displayValue": "Inbound"
            },
            "type": {
                "value": "email",
                "displayValue": "Email",
                "subtype": {
                    "value": "general",
                    "displayValue": "General"
                }
            },
            "isSecure": false,
            "sentOnBehalf": false,
            "status": {
                "value": "completed",
                "displayValue": "Completed",
                "substatus": {
                    "value": "done",
                    "displayValue": "Done"
                },
                "assigned": {
                    "user": {
                        "name": "JennyAnthony",
                        "firstName": "Jenny",
                        "lastName": "Anthony",
                        "id": 1002
                    },
                    "activityFolder": {
                        "name": {
                            "value": "activities_completed",
                            "displayValue": "Completed"
                        },
                        "id": 7
                    },
                    "isPinned": false,
                    "isLocked": false
                }
            },
            "lastModified": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-01T21:32:25.000Z"
            },
            "subject": "offers [#1002]",
            "customer": {
                "link": {
                    "rel": "customer",
                    "href": "/system/ws/v12/interaction/customer/1002"
                },
                "customerName": "John Davis",
                "contactPersons": {
                    "contactPerson": [
                        {
                            "isSystemCreated": false,
                            "firstName": "John",
                            "lastName": "Davis",
                            "contactPoints": {
                                "contactPoint": [
                                    {
                                        "type": {
                                            "value": "email",
                                            "displayValue": "Email",
                                            "email": {
                                                "emailAddress": "johndavis@example.com"
                                            }
                                        },
                                        "id": 1004
                                    }
                                ]
                            },
                            "id": 1002
                        }
                    ]
                },
                "id": 1002
            },
            "queue": {
                "name": "Email queue",
                "id": 1001
            },
            "attachments": {
                "count": 0,
                "purgedCount": 0,
                "link": {
                    "rel": "attachment",
                    "href": "/system/ws/v12/interaction/activity/1015/attachment"
                }
            },
            "notes": {
                "count": 1,
                "Link": {
                   "rel": "note",
                   "href": "/system/ws/v12/interaction/activity/1015/note"
                }
            },
	  "isContentPurged": false,
            "payload": {
                "email": {
                    "lastAction": {
                        "value": "I18N_CASEMGMT_ACTION_REPLIED",
                        "displayValue": "Sent"
                    },
                    "hasDraft": false,
                    "leaveOpen": false,
                    "isEscalated": true,
                    "isOutboundFailed": false,
                    "alias": {
                        "name": "alias",
                        "value": "support@business.com",
                        "id": 1000
                    },
                    "date": {
                        "date": "2016-04-01T21:00:42.000Z"
                    },
                    "emailAddresses": {
                        "from": "johndavis@example.com",
                        "to": {
                            "address": [
                                "support@business.com"
                            ]
                        },
                        "replyTo": {
                            "address": [
                                "johndavis@example.com"
                            ]
                        },
                        "receiver": "support@business.com"
                    }
                }
            },
            "id": 1015
        },
        {
            "link": {
                "rel": "self",
                "href": "/system/ws/v12/interaction/activity/1016"
            },
            "case": {
                "link": {
                    "rel": "case",
                    "href": "/system/ws/v12/interaction/case/1002"
                },
                "id": 1002
            },
            "department": {
                "name": "Service",
                "id": 999
            },
            "mode": {
                "value": "outbound",
                "displayValue": "Outbound"
            },
            "type": {
                "value": "email",
                "displayValue": "Email",
                "subtype": {
                    "value": "reply",
                    "displayValue": "Reply"
                }
            },
            "isSecure": false,
            "sentOnBehalf": false,
            "status": {
                "value": "completed",
                "displayValue": "Completed",
                "substatus": {
                    "value": "done",
                    "displayValue": "Done"
                },
                "assigned": {
                    "user": {
                        "name": "JennyAnthony",
                        "firstName": "Jenny",
                        "lastName": "Anthony",
                        "id": 1002
                    },
                    "activityFolder": {
                        "name": {
                            "value": "activities_completed",
                            "displayValue": "Completed"
                        },
                        "id": 7
                    },
                    "isPinned": false,
                    "isLocked": false
                }
            },
            "lastModified": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-01T21:32:44.000Z"
            },
            "subject": "Re: offers [#1002]",
            "customer": {
                "link": {
                    "rel": "customer",
                    "href": "/system/ws/v12/interaction/customer/1002"
                },
                "customerName": "John Davis",
                "contactPersons": {
                    "contactPerson": [
                        {
                            "isSystemCreated": false,
                            "firstName": "John",
                            "lastName": "Davis",
                            "contactPoints": {
                                "contactPoint": [
                                    {
                                        "type": {
                                            "value": "email",
                                            "displayValue": "Email",
                                            "email": {
                                                "emailAddress": "johndavis@example.com"
                                            }
                                        },
                                        "id": 1004
                                    }
                                ]
                            },
                            "id": 1002
                        }
                    ]
                },
                "id": 1002
            },
            "queue": {
                "name": "Email queue",
                "id": 1001
            },
            "attachments": {
                "count": 0,
                "purgedCount": 0,
                "link": {
                    "rel": "attachment",
                    "href": "/system/ws/v12/interaction/activity/1016/attachment"
                }
            },
            "notes": {
                "count": 0,
                "Link": {
                   "rel": "note",
                   "href": "/system/ws/v12/interaction/activity/1016/note"
                }
            },
	  "isContentPurged": false,
            "payload": {
                "email": {                 
                    "hasDraft": false,
                    "leaveOpen": false,
                    "isEscalated": false,
                    "isOutboundFailed": false,
                    "alias": {
                        "name": "alias",
                        "value": "support@business.com",
                        "id": 1000
                    },
                    "date": {
                        "date": "2016-04-01T21:32:25.000Z"
                    },
                    "emailAddresses": {
                        "from": "support@business.com",
                        "to": {
                            "address": [
                                "johndavis@example.com"
                            ]
                        },
                        "replyTo": {
                            "address": [
                                "support@business.com"
                            ]
                        },
                        "receiver": "support@business.com"
                    }
                }
            },
            "id": 1016
        }
    ],
    "paginationInfo": {
        "count": 5,
        "pagenum": 2,
        "pagesize": 2,
        "link": [
            {
                "rel": "prev",
                "href": "/system/ws/v12/interaction/activity?case=1002&$attribute=payload&$pagenum=1&$pagesize=2"
            },
            {
                "rel": "next",
                "href": "/system/ws/v12/interaction/activity?case=1002&$attribute=payload&$pagenum=3&$pagesize=2"
            }
        ]
    }
}

     


Example 3 - Search for activities by custom attribute with range parameters

This example demonstrates the following:

  • Search for activities based on custom attribute.
  • Specifying a custom attribute to be returned in the response.
  • Using range parameters ($rangestart and $rangesize) in the request. Note that paginationInfo node is not returned for range parameters.
  • Default sorting (on activity ID in ascending order)

XML

Request

Method URL
GET /ws/v12/interaction/activity?custom.ordertype=2,3&$rangestart=5&$rangesize=2&$attribute=custom.ordertype

Request headers

Name Value
X-egain-session Valid session ID
Accept application/xml
Accept-Language en-US

Response
HTTP/1.1 200 OK

Response headers

Name Value
X-egain-session current session ID
Content-Type application/xml

Response body

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<activities xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity"
xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/interaction/case"
xmlns:ns3="http://bindings.egain.com/ws/model/v12/gen/platform"
xmlns:ns4="http://bindings.egain.com/ws/model/v12/gen/common"
xmlns:ns5="http://bindings.egain.com/ws/model/v12/gen/interaction/folder"
xmlns:ns6="http://bindings.egain.com/ws/model/v12/gen/interaction/customer"
xmlns:ns7="http://bindings.egain.com/ws/model/v12/gen/interaction/contactperson"
xmlns:ns8="http://bindings.egain.com/ws/model/v12/gen/interaction/contactpoint"
xmlns:ns9="http://bindings.egain.com/ws/model/v12/gen/kb"
xmlns:ns10="http://bindings.egain.com/ws/model/v15/gen/kb/edition"
xmlns:ns11="http://bindings.egain.com/ws/model/v15/gen/kb/profile"
xmlns:ns12="http://bindings.egain.com/ws/model/v12/gen/interaction/attachment"
xmlns:ns13="http://bindings.egain.com/ws/model/v12/gen/mail/alias"
xmlns:ns14="http://bindings.egain.com/ws/model/v12/gen/live/entrypoint">
    <activity id="1020">
        <link rel="self" href="/system/ws/v12/interaction/activity/1020"/>
        <case id="1006">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1006"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>none</ns4:value>
            <ns4:displayValue>None</ns4:displayValue>
        </mode>
        <type>
            <value>task</value>
            <displayValue>Task</displayValue>
            <subtype>
                <ns4:value>general</ns4:value>
                <ns4:displayValue>General</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>assigned</value>
            <displayValue>Assigned</displayValue>
            <substatus>
                <ns4:value>in_progress</ns4:value>
                <ns4:displayValue>In Progress</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1002">
                    <ns3:name>JennyAnthony</ns3:name>
                    <ns3:firstName>Jenny</ns3:firstName>
                    <ns3:lastName>Anthony</ns3:lastName>
                </user>
                <activityFolder id="6">
                    <ns5:name>
                        <ns4:value>activities_current</ns4:value>
                        <ns4:displayValue>Current</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <priority>3</priority>
        <lastModified date="2016-04-01T22:03:13.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </lastModified>
        <dueDate>2016-04-14T07:00:00.000Z</dueDate>
        <subject>Answer Oliver's question [#1006]</subject>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1020/attachment"/>
        </attachments>
        <notes>
            <count>1</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1020/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
        <customAttributes>
            <ns4:customAttribute>
                <ns4:attribName>ordertype</ns4:attribName>
                <ns4:attribValues>
                    <ns4:attribValue>
                        <ns4:value>2</ns4:value>
                        <ns4:displayValue>2</ns4:displayValue>
                    </ns4:attribValue>
                    <ns4:attribValue>
                        <ns4:value>3</ns4:value>
                        <ns4:displayValue>3</ns4:displayValue>
                    </ns4:attribValue>
                </ns4:attribValues>
            </ns4:customAttribute>
        </customAttributes>
    </activity>
    <activity id="1021">
        <link rel="self" href="/system/ws/v12/interaction/activity/1021"/>
        <case id="1007">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1007"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>outbound</ns4:value>
            <ns4:displayValue>Outbound</ns4:displayValue>
        </mode>
        <type>
            <value>social</value>
            <displayValue>Social</displayValue>
            <subtype>
                <ns4:value>twittercompose</ns4:value>
                <ns4:displayValue>TwitterCompose</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>assigned</value>
            <displayValue>Assigned</displayValue>
            <substatus>
                <ns4:value>in_progress</ns4:value>
                <ns4:displayValue>In Progress</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1002">
                    <ns3:name>JennyAnthony</ns3:name>
                    <ns3:firstName>Jenny</ns3:firstName>
                    <ns3:lastName>Anthony</ns3:lastName>
                </user>
                <activityFolder id="6">
                    <ns5:name>
                        <ns4:value>activities_current</ns4:value>
                        <ns4:displayValue>Current</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <priority>4</priority>
        <lastModified date="2016-04-01T22:05:33.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </lastModified>
        <dueDate>2016-04-29T11:30:00.000Z</dueDate>
        <subject>No Subject</subject>
        <customer id="1002">
            <ns6:link rel="customer" href="/system/ws/v12/interaction/customer/1002"/>
            <ns6:customerName>John Davis</ns6:customerName>
            <ns6:contactPersons>
                <ns7:contactPerson id="1002">
                    <ns7:isSystemCreated>false</ns7:isSystemCreated>
                    <ns7:firstName>John</ns7:firstName>
                    <ns7:lastName>Davis</ns7:lastName>
                    <ns7:contactPoints>
                        <ns8:contactPoint id="1004">
                            <ns8:type>
                                <ns8:value>social</ns8:value>
                                <ns8:displayValue>Social</ns8:displayValue>
                                <ns8:social>
                                    <ns8:type>
                                        <ns4:value>twitter</ns4:value>
                                        <ns4:displayValue>Twitter</ns4:displayValue>
                                    </ns8:type>
                                    <ns8:socialId>jd1234</ns8:socialId>
                                </ns8:social>
                            </ns8:type>
                        </ns8:contactPoint>
                    </ns7:contactPoints>
                </ns7:contactPerson>
            </ns6:contactPersons>
        </customer>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1021/attachment"/>
        </attachments>
        <notes>
            <count>0</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1021/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
        <customAttributes>
            <ns4:customAttribute>
                <ns4:attribName>ordertype</ns4:attribName>
                <ns4:attribValues>
                    <ns4:attribValue>
                        <ns4:value>2</ns4:value>
                        <ns4:displayValue>2</ns4:displayValue>
                    </ns4:attribValue>
                    <ns4:attribValue>
                        <ns4:value>3</ns4:value>
                        <ns4:displayValue>3</ns4:displayValue>
                    </ns4:attribValue>
                </ns4:attribValues>
            </ns4:customAttribute>
        </customAttributes>
    </activity>
</activities>

     

JSON

Request

Method URL
GET /ws/v12/interaction/activity?custom.ordertype=2,3&$rangestart=5&$rangesize=2&$attribute=custom.ordertype

Request headers

Name Value
X-egain-session Valid session ID
Accept application/json
Accept-Language en-US

Response
HTTP/1.1 200 OK

Response headers

Name Value
X-egain-session current session ID
Content-Type application/json

Response body

{
    "activity": [
        {
            "link": {
                "rel": "self",
                "href": "/system/ws/v12/interaction/activity/1020"
            },
            "case": {
                "link": {
                    "rel": "case",
                    "href": "/system/ws/v12/interaction/case/1006"
                },
                "id": 1006
            },
            "department": {
                "name": "Service",
                "id": 999
            },
            "mode": {
                "value": "none",
                "displayValue": "None"
            },
            "type": {
                "value": "task",
                "displayValue": "Task",
                "subtype": {
                    "value": "general",
                    "displayValue": "General"
                }
            },
            "isSecure": false,
            "sentOnBehalf": false,
            "status": {
                "value": "assigned",
                "displayValue": "Assigned",
                "substatus": {
                    "value": "in_progress",
                    "displayValue": "In Progress"
                },
                "assigned": {
                    "user": {
                        "name": "JennyAnthony",
                        "firstName": "Jenny",
                        "lastName": "Anthony",
                        "id": 1002
                    },
                    "activityFolder": {
                        "name": {
                            "value": "activities_current",
                            "displayValue": "Current"
                        },
                        "id": 6
                    },
                    "isPinned": false,
                    "isLocked": false
                }
            },
            "priority": "3",
            "lastModified": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-01T22:03:13.000Z"
            },
            "dueDate": "2016-04-14T07:00:00.000Z",
            "subject": "Answer Oliver's question [#1006]",
            "attachments": {
                "count": 0,
                "purgedCount": 0,
                "link": {
                    "rel": "attachment",
                    "href": "/system/ws/v12/interaction/activity/1020/attachment"
                }
            },
            "notes": {
                "count": 1,
                "Link": {
                   "rel": "note",
                   "href": "/system/ws/v12/interaction/activity/1020/note"
                }
            },
	  "isContentPurged": false,
            "customAttributes": {
                "customAttribute": [
                    {
                        "attribName": "ordertype",
                        "attribValues": {
                            "attribValue": [
                                {
                                    "value": "2",
                                    "displayValue": "2"
                                },
                                {
                                    "value": "3",
                                    "displayValue": "3"
                                }
                            ]
                        }
                    }
                ]
            },
            "id": 1020
        },
        {
            "link": {
                "rel": "self",
                "href": "/system/ws/v12/interaction/activity/1021"
            },
            "case": {
                "link": {
                    "rel": "case",
                    "href": "/system/ws/v12/interaction/case/1007"
                },
                "id": 1007
            },
            "department": {
                "name": "Service",
                "id": 999
            },
            "mode": {
                "value": "outbound",
                "displayValue": "Outbound"
            },
            "type": {
                "value": "social",
                "displayValue": "Social",
                "subtype": {
                    "value": "twittercompose",
                    "displayValue": "TwitterCompose"
                }
            },
            "isSecure": false,
            "sentOnBehalf": false,
            "status": {
                "value": "assigned",
                "displayValue": "Assigned",
                "substatus": {
                    "value": "in_progress",
                    "displayValue": "In Progress"
                },
                "assigned": {
                    "user": {
                        "name": "JennyAnthony",
                        "firstName": "Jenny",
                        "lastName": "Anthony",
                        "id": 1002
                    },
                    "activityFolder": {
                        "name": {
                            "value": "activities_current",
                            "displayValue": "Current"
                        },
                        "id": 6
                    },
                    "isPinned": false,
                    "isLocked": false
                }
            },
            "priority": "4",
            "lastModified": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-01T22:05:33.000Z"
            },
            "dueDate": "2016-04-29T11:30:00.000Z",
            "subject": "No Subject",
            "customer": {
                "link": {
                    "rel": "customer",
                    "href": "/system/ws/v12/interaction/customer/1002"
                },
                "customerName": "John Davis",
                "contactPersons": {
                    "contactPerson": [
                        {
                            "isSystemCreated": false,
                            "firstName": "John",
                            "lastName": "Davis",
                            "contactPoints": {
                                "contactPoint": [
                                    {
                                        "type": {
                                            "value": "social",
                                            "displayValue": "Social",
                                            "social": {
                                                "type": {
                                                    "value": "twitter",
                                                    "displayValue": "Twitter"
                                                },
                                                "socialId": "jd1234"
                                            }
                                        },
                                        "id": 1004
                                    }
                                ]
                            },
                            "id": 1002
                        }
                    ]
                },
                "id": 1002
            },
            "attachments": {
                "count": 0,
                "purgedCount": 0,
                "link": {
                    "rel": "attachment",
                    "href": "/system/ws/v12/interaction/activity/1021/attachment"
                }
            },
            "notes": {
                "count": 0,
                "Link": {
                   "rel": "note",
                   "href": "/system/ws/v12/interaction/activity/1021/note"
                }
            },
	  "isContentPurged": false,
            "customAttributes": {
                "customAttribute": [
                    {
                        "attribName": "ordertype",
                        "attribValues": {
                            "attribValue": [
                                {
                                    "value": "2",
                                    "displayValue": "2"
                                },
                                {
                                    "value": "3",
                                    "displayValue": "3"
                                }
                            ]
                        }
                    }
                ]
            },
            "id": 1021
        }
    ]
}

     


Example 4 - Search for activities by status and last modified date

This example demonstrates the following:

  • Search for activities that are in status "assigned" and substatus "in_progress" that were modified on or after a given date.
  • Default sorting (on activity ID in ascending order).

XML

Request

Method URL
GET /ws/v12/interaction/activity?status=assigned:in_progress&lastModifiedDate=[2016-04-08T23:41:41.000Z,]

Request headers

Name Value
X-egain-session Valid session ID
Accept application/xml
Accept-Language en-US

Response
HTTP/1.1 200 OK

Response headers

Name Value
X-egain-session current session ID
Content-Type application/xml

Response body

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<activities xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity"
xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/interaction/case"
xmlns:ns3="http://bindings.egain.com/ws/model/v12/gen/platform"
xmlns:ns4="http://bindings.egain.com/ws/model/v12/gen/common"
xmlns:ns5="http://bindings.egain.com/ws/model/v12/gen/interaction/folder"
xmlns:ns6="http://bindings.egain.com/ws/model/v12/gen/interaction/customer"
xmlns:ns7="http://bindings.egain.com/ws/model/v12/gen/interaction/contactperson"
xmlns:ns8="http://bindings.egain.com/ws/model/v12/gen/interaction/contactpoint"
xmlns:ns9="http://bindings.egain.com/ws/model/v12/gen/kb"
xmlns:ns10="http://bindings.egain.com/ws/model/v15/gen/kb/edition"
xmlns:ns11="http://bindings.egain.com/ws/model/v15/gen/kb/profile"
xmlns:ns12="http://bindings.egain.com/ws/model/v12/gen/interaction/attachment"
xmlns:ns13="http://bindings.egain.com/ws/model/v12/gen/mail/alias"
xmlns:ns14="http://bindings.egain.com/ws/model/v12/gen/live/entrypoint">
    <activity id="1011">
        <link rel="self" href="/system/ws/v12/interaction/activity/1011"/>
        <case id="1002">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1002"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>inbound</ns4:value>
            <ns4:displayValue>Inbound</ns4:displayValue>
        </mode>
        <type>
            <value>email</value>
            <displayValue>Email</displayValue>
            <subtype>
                <ns4:value>general</ns4:value>
                <ns4:displayValue>General</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>assigned</value>
            <displayValue>Assigned</displayValue>
            <substatus>
                <ns4:value>in_progress</ns4:value>
                <ns4:displayValue>In Progress</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1002">
                    <ns3:name>JennyAnthony</ns3:name>
                    <ns3:firstName>Jenny</ns3:firstName>
                    <ns3:lastName>Anthony</ns3:lastName>
                </user>
                <activityFolder id="6">
                    <ns5:name>
                        <ns4:value>activities_current</ns4:value>
                        <ns4:displayValue>Current</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <priority>2</priority>
        <lastModified date="2016-04-08T23:41:41.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </lastModified>
        <dueDate>2016-04-06T07:00:00.000Z</dueDate>
        <subject>Issue with laptop configuration</subject>
        <customer id="1002">
            <ns6:link rel="customer" href="/system/ws/v12/interaction/customer/1002"/>
            <ns6:customerName>John Davis</ns6:customerName>
            <ns6:contactPersons>
                <ns7:contactPerson id="1002">
                    <ns7:isSystemCreated>false</ns7:isSystemCreated>
                    <ns7:firstName>John</ns7:firstName>
                    <ns7:lastName>Davis</ns7:lastName>
                    <ns7:contactPoints>
                        <ns8:contactPoint id="1004">
                            <ns8:type>
                                <ns8:value>email</ns8:value>
                                <ns8:displayValue>Email</ns8:displayValue>
                                <ns8:email>
                                    <ns8:emailAddress>johndavis@example.com</ns8:emailAddress>
                                </ns8:email>
                            </ns8:type>
                        </ns8:contactPoint>
                    </ns7:contactPoints>
                </ns7:contactPerson>
            </ns6:contactPersons>
        </customer>
        <queue id="1001">
            <ns3:name>Email queue</ns3:name>
        </queue>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1011/attachment"/>
        </attachments>
        <notes>
            <count>1</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1011/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
    </activity>
    <activity id="1019">
        <link rel="self" href="/system/ws/v12/interaction/activity/1019"/>
        <case id="1002">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1002"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>outbound</ns4:value>
            <ns4:displayValue>Outbound</ns4:displayValue>
        </mode>
        <type>
            <value>call_track</value>
            <displayValue>Calltrack</displayValue>
            <subtype>
                <ns4:value>general</ns4:value>
                <ns4:displayValue>General</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>assigned</value>
            <displayValue>Assigned</displayValue>
            <substatus>
                <ns4:value>in_progress</ns4:value>
                <ns4:displayValue>In Progress</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1002">
                    <ns3:name>JennyAnthony</ns3:name>
                    <ns3:firstName>Jenny</ns3:firstName>
                    <ns3:lastName>Anthony</ns3:lastName>
                </user>
                <activityFolder id="6">
                    <ns5:name>
                        <ns4:value>activities_current</ns4:value>
                        <ns4:displayValue>Current</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <lastModified date="2016-04-08T23:42:16.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </lastModified>
        <subject>Summary of phone call [#1002]</subject>
        <customer id="1004">
            <ns6:link rel="customer" href="/system/ws/v12/interaction/customer/1004"/>
            <ns6:customerName>Oliver</ns6:customerName>
            <ns6:contactPersons>
                <ns7:contactPerson id="1004">
                    <ns7:isSystemCreated>false</ns7:isSystemCreated>
                    <ns7:firstName>Oliver</ns7:firstName>
                    <ns7:contactPoints>
                        <ns8:contactPoint id="1011">
                            <ns8:type>
                                <ns8:value>phone</ns8:value>
                                <ns8:displayValue>Telephone</ns8:displayValue>
                                <ns8:phone>
                                    <ns8:type>
                                        <ns4:value>mobile</ns4:value>
                                        <ns4:displayValue>Cell</ns4:displayValue>
                                    </ns8:type>
                                    <ns8:phoneNo>408-980-8765</ns8:phoneNo>
                                </ns8:phone>
                            </ns8:type>
                        </ns8:contactPoint>
                    </ns7:contactPoints>
                </ns7:contactPerson>
            </ns6:contactPersons>
        </customer>
        <queue id="1002">
            <ns3:name>Call queue</ns3:name>
        </queue>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1019/attachment"/>
        </attachments>
        <notes>
            <count>0</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1019/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
    </activity>
    <paginationInfo>
        <ns4:count>2</ns4:count>
        <ns4:pagenum>1</ns4:pagenum>
        <ns4:pagesize>25</ns4:pagesize>
    </paginationInfo>
</activities>

     

JSON

Request

Method URL
GET /ws/v12/interaction/activity?status=assigned:in_progress&lastModifiedDate=[2016-04-08T23:41:41.000Z,]

Request headers

Name Value
X-egain-session Valid session ID
Accept application/json
Accept-Language en-US

Response
HTTP/1.1 200 OK

Response headers

Name Value
X-egain-session current session ID
Content-Type application/json

Response body

{
    "activity": [
        {
            "link": {
                "rel": "self",
                "href": "/system/ws/v12/interaction/activity/1011"
            },
            "case": {
                "link": {
                    "rel": "case",
                    "href": "/system/ws/v12/interaction/case/1002"
                },
                "id": 1002
            },
            "department": {
                "name": "Service",
                "id": 999
            },
            "mode": {
                "value": "inbound",
                "displayValue": "Inbound"
            },
            "type": {
                "value": "email",
                "displayValue": "Email",
                "subtype": {
                    "value": "general",
                    "displayValue": "General"
                }
            },
            "isSecure": false,
            "sentOnBehalf": false,
            "status": {
                "value": "assigned",
                "displayValue": "Assigned",
                "substatus": {
                    "value": "in_progress",
                    "displayValue": "In Progress"
                },
                "assigned": {
                    "user": {
                        "name": "JennyAnthony",
                        "firstName": "Jenny",
                        "lastName": "Anthony",
                        "id": 1002
                    },
                    "activityFolder": {
                        "name": {
                            "value": "activities_current",
                            "displayValue": "Current"
                        },
                        "id": 6
                    },
                    "isPinned": false,
                    "isLocked": false
                }
            },
            "priority": "2",
            "lastModified": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-08T23:41:41.000Z"
            },
            "dueDate": "2016-04-06T07:00:00.000Z",
            "subject": "Issue with laptop configuration",
            "customer": {
                "link": {
                    "rel": "customer",
                    "href": "/system/ws/v12/interaction/customer/1002"
                },
                "customerName": "John Davis",
                "contactPersons": {
                    "contactPerson": [
                        {
                            "isSystemCreated": false,
                            "firstName": "John",
                            "lastName": "Davis",
                            "contactPoints": {
                                "contactPoint": [
                                    {
                                        "type": {
                                            "value": "email",
                                            "displayValue": "Email",
                                            "email": {
                                                "emailAddress": "johndavis@example.com"
                                            }
                                        },
                                        "id": 1004
                                    }
                                ]
                            },
                            "id": 1002
                        }
                    ]
                },
                "id": 1002
            },
            "queue": {
                "name": "Email queue",
                "id": 1001
            },
            "attachments": {
                "count": 0,
                "purgedCount": 0,
                "link": {
                    "rel": "attachment",
                    "href": "/system/ws/v12/interaction/activity/1011/attachment"
                }
            },
            "notes": {
                "count": 1,
                "Link": {
                   "rel": "note",
                   "href": "/system/ws/v12/interaction/activity/1011/note"
                }
            },
	  "isContentPurged": false,
            "id": 1011
        },
        {
            "link": {
                "rel": "self",
                "href": "/system/ws/v12/interaction/activity/1019"
            },
            "case": {
                "link": {
                    "rel": "case",
                    "href": "/system/ws/v12/interaction/case/1002"
                },
                "id": 1002
            },
            "department": {
                "name": "Service",
                "id": 999
            },
            "mode": {
                "value": "outbound",
                "displayValue": "Outbound"
            },
            "type": {
                "value": "call_track",
                "displayValue": "Calltrack",
                "subtype": {
                    "value": "general",
                    "displayValue": "General"
                }
            },
            "isSecure": false,
            "sentOnBehalf": false,
            "status": {
                "value": "assigned",
                "displayValue": "Assigned",
                "substatus": {
                    "value": "in_progress",
                    "displayValue": "In Progress"
                },
                "assigned": {
                    "user": {
                        "name": "JennyAnthony",
                        "firstName": "Jenny",
                        "lastName": "Anthony",
                        "id": 1002
                    },
                    "activityFolder": {
                        "name": {
                            "value": "activities_current",
                            "displayValue": "Current"
                        },
                        "id": 6
                    },
                    "isPinned": false,
                    "isLocked": false
                }
            },
            "lastModified": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-08T23:42:16.000Z"
            },
            "subject": "Summary of phone call [#1002]",
            "customer": {
                "link": {
                    "rel": "customer",
                    "href": "/system/ws/v12/interaction/customer/1004"
                },
                "customerName": "Oliver  ",
                "contactPersons": {
                    "contactPerson": [
                        {
                            "isSystemCreated": false,
                            "firstName": "Oliver",
                            "contactPoints": {
                                "contactPoint": [
                                    {
                                        "type": {
                                            "value": "phone",
                                            "displayValue": "Telephone",
                                            "phone": {
                                                "type": {
                                                    "value": "mobile",
                                                    "displayValue": "Cell"
                                                },
                                                "phoneNo": "408-980-8765"
                                            }
                                        },
                                        "id": 1011
                                    }
                                ]
                            },
                            "id": 1004
                        }
                    ]
                },
                "id": 1004
            },
            "queue": {
                "name": "Call queue",
                "id": 1002
            },
            "attachments": {
                "count": 0,
                "purgedCount": 0,
                "link": {
                    "rel": "attachment",
                    "href": "/system/ws/v12/interaction/activity/1019/attachment"
                }
            },
            "notes": {
                "count": 0,
                "Link": {
                   "rel": "note",
                   "href": "/system/ws/v12/interaction/activity/1019/note"
                }
            },
	  "isContentPurged": false,
            "id": 1019
        }
    ],
    "paginationInfo": {
        "count": 2,
        "pagenum": 1,
        "pagesize": 25
    }
}

     


Example 5 - Search for activities by assigned user with sorting on last modified date

This example demonstrates the following:

  • Search for activities that are assigned to a user.
  • Sorting on last modified date of the activity in descending order.

XML

Request

Method URL
GET /ws/v12/interaction/activity?assignedTo=1002&$sort=lastModifiedDate&$order=desc

Request headers

Name Value
X-egain-session Valid session ID
Accept application/xml
Accept-Language en-US

Response
HTTP/1.1 200 OK

Response headers

Name Value
X-egain-session current session ID
Content-Type application/xml

Response body

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<activities xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity"
xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/interaction/case"
xmlns:ns3="http://bindings.egain.com/ws/model/v12/gen/platform"
xmlns:ns4="http://bindings.egain.com/ws/model/v12/gen/common"
xmlns:ns5="http://bindings.egain.com/ws/model/v12/gen/interaction/folder"
xmlns:ns6="http://bindings.egain.com/ws/model/v12/gen/interaction/customer"
xmlns:ns7="http://bindings.egain.com/ws/model/v12/gen/interaction/contactperson"
xmlns:ns8="http://bindings.egain.com/ws/model/v12/gen/interaction/contactpoint"
xmlns:ns9="http://bindings.egain.com/ws/model/v12/gen/kb"
xmlns:ns10="http://bindings.egain.com/ws/model/v15/gen/kb/edition"
xmlns:ns11="http://bindings.egain.com/ws/model/v15/gen/kb/profile"
xmlns:ns12="http://bindings.egain.com/ws/model/v12/gen/interaction/attachment"
xmlns:ns13="http://bindings.egain.com/ws/model/v12/gen/mail/alias"
xmlns:ns14="http://bindings.egain.com/ws/model/v12/gen/live/entrypoint">
    <activity id="1011">
        <link rel="self" href="/system/ws/v12/interaction/activity/1011"/>
        <case id="1002">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1002"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>inbound</ns4:value>
            <ns4:displayValue>Inbound</ns4:displayValue>
        </mode>
        <type>
            <value>email</value>
            <displayValue>Email</displayValue>
            <subtype>
                <ns4:value>general</ns4:value>
                <ns4:displayValue>General</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>assigned</value>
            <displayValue>Assigned</displayValue>
            <substatus>
                <ns4:value>in_progress</ns4:value>
                <ns4:displayValue>In Progress</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1002">
                    <ns3:name>JennyAnthony</ns3:name>
                    <ns3:firstName>Jenny</ns3:firstName>
                    <ns3:lastName>Anthony</ns3:lastName>
                </user>
                <activityFolder id="6">
                    <ns5:name>
                        <ns4:value>activities_current</ns4:value>
                        <ns4:displayValue>Current</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <priority>2</priority>
        <lastModified date="2016-04-08T23:41:41.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </lastModified>
        <dueDate>2016-04-06T07:00:00.000Z</dueDate>
        <subject>Issue with laptop configuration</subject>
        <customer id="1002">
            <ns6:link rel="customer" href="/system/ws/v12/interaction/customer/1002"/>
            <ns6:customerName>John Davis</ns6:customerName>
            <ns6:contactPersons>
                <ns7:contactPerson id="1002">
                    <ns7:isSystemCreated>false</ns7:isSystemCreated>
                    <ns7:firstName>John</ns7:firstName>
                    <ns7:lastName>Davis</ns7:lastName>
                    <ns7:contactPoints>
                        <ns8:contactPoint id="1004">
                            <ns8:type>
                                <ns8:value>email</ns8:value>
                                <ns8:displayValue>Email</ns8:displayValue>
                                <ns8:email>
                                    <ns8:emailAddress>johndavis@example.com</ns8:emailAddress>
                                </ns8:email>
                            </ns8:type>
                        </ns8:contactPoint>
                    </ns7:contactPoints>
                </ns7:contactPerson>
            </ns6:contactPersons>
        </customer>
        <queue id="1001">
            <ns3:name>Email queue</ns3:name>
        </queue>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1011/attachment"/>
        </attachments>
        <notes>
            <count>1</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1011/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
    </activity>
    <activity id="1016">
        <link rel="self" href="/system/ws/v12/interaction/activity/1016"/>
        <case id="1002">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1002"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>outbound</ns4:value>
            <ns4:displayValue>Outbound</ns4:displayValue>
        </mode>
        <type>
            <value>email</value>
            <displayValue>Email</displayValue>
            <subtype>
                <ns4:value>reply</ns4:value>
                <ns4:displayValue>Reply</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>completed</value>
            <displayValue>Completed</displayValue>
            <substatus>
                <ns4:value>done</ns4:value>
                <ns4:displayValue>Done</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1002">
                    <ns3:name>JennyAnthony</ns3:name>
                    <ns3:firstName>Jenny</ns3:firstName>
                    <ns3:lastName>Anthony</ns3:lastName>
                </user>
                <activityFolder id="7">
                    <ns5:name>
                        <ns4:value>activities_completed</ns4:value>
                        <ns4:displayValue>Completed</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <lastModified date="2016-04-01T21:32:44.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </lastModified>
        <subject>Re: offers [#1002]</subject>
        <customer id="1002">
            <ns6:link rel="customer" href="/system/ws/v12/interaction/customer/1002"/>
            <ns6:customerName>John Davis</ns6:customerName>
            <ns6:contactPersons>
                <ns7:contactPerson id="1002">
                    <ns7:isSystemCreated>false</ns7:isSystemCreated>
                    <ns7:firstName>John</ns7:firstName>
                    <ns7:lastName>Davis</ns7:lastName>
                    <ns7:contactPoints>
                        <ns8:contactPoint id="1004">
                            <ns8:type>
                                <ns8:value>email</ns8:value>
                                <ns8:displayValue>Email</ns8:displayValue>
                                <ns8:email>
                                    <ns8:emailAddress>johndavis@example.com</ns8:emailAddress>
                                </ns8:email>
                            </ns8:type>
                        </ns8:contactPoint>
                    </ns7:contactPoints>
                </ns7:contactPerson>
            </ns6:contactPersons>
        </customer>
        <queue id="1001">
            <ns3:name>Email queue</ns3:name>
        </queue>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1016/attachment"/>
        </attachments>
        <notes>
            <count>0</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1016/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
    </activity>
    <activity id="1015">
        <link rel="self" href="/system/ws/v12/interaction/activity/1015"/>
        <case id="1002">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1002"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>inbound</ns4:value>
            <ns4:displayValue>Inbound</ns4:displayValue>
        </mode>
        <type>
            <value>email</value>
            <displayValue>Email</displayValue>
            <subtype>
                <ns4:value>general</ns4:value>
                <ns4:displayValue>General</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>completed</value>
            <displayValue>Completed</displayValue>
            <substatus>
                <ns4:value>done</ns4:value>
                <ns4:displayValue>Done</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1002">
                    <ns3:name>JennyAnthony</ns3:name>
                    <ns3:firstName>Jenny</ns3:firstName>
                    <ns3:lastName>Anthony</ns3:lastName>
                </user>
                <activityFolder id="7">
                    <ns5:name>
                        <ns4:value>activities_completed</ns4:value>
                        <ns4:displayValue>Completed</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <lastModified date="2016-04-01T21:32:25.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </lastModified>
        <subject>offers [#1002]</subject>
        <customer id="1002">
            <ns6:link rel="customer" href="/system/ws/v12/interaction/customer/1002"/>
            <ns6:customerName>John Davis</ns6:customerName>
            <ns6:contactPersons>
                <ns7:contactPerson id="1002">
                    <ns7:isSystemCreated>false</ns7:isSystemCreated>
                    <ns7:firstName>John</ns7:firstName>
                    <ns7:lastName>Davis</ns7:lastName>
                    <ns7:contactPoints>
                        <ns8:contactPoint id="1004">
                            <ns8:type>
                                <ns8:value>email</ns8:value>
                                <ns8:displayValue>Email</ns8:displayValue>
                                <ns8:email>
                                    <ns8:emailAddress>johndavis@example.com</ns8:emailAddress>
                                </ns8:email>
                            </ns8:type>
                        </ns8:contactPoint>
                    </ns7:contactPoints>
                </ns7:contactPerson>
            </ns6:contactPersons>
        </customer>
        <queue id="1001">
            <ns3:name>Email queue</ns3:name>
        </queue>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1015/attachment"/>
        </attachments>
        <notes>
            <count>1</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1015/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
    </activity>
    <paginationInfo>
        <ns4:count>3</ns4:count>
        <ns4:pagenum>1</ns4:pagenum>
        <ns4:pagesize>25</ns4:pagesize>
    </paginationInfo>
</activities>

     

JSON

Request

Method URL
GET /ws/v12/interaction/activity?assignedTo=1002&$sort=lastModifiedDate&$order=desc

Request headers

Name Value
X-egain-session Valid session ID
Accept application/json
Accept-Language en-US

Response
HTTP/1.1 200 OK

Response headers

Name Value
X-egain-session current session ID
Content-Type application/json

Response body

{
    "activity": [
        {
            "link": {
                "rel": "self",
                "href": "/system/ws/v12/interaction/activity/1011"
            },
            "case": {
                "link": {
                    "rel": "case",
                    "href": "/system/ws/v12/interaction/case/1002"
                },
                "id": 1002
            },
            "department": {
                "name": "Service",
                "id": 999
            },
            "mode": {
                "value": "inbound",
                "displayValue": "Inbound"
            },
            "type": {
                "value": "email",
                "displayValue": "Email",
                "subtype": {
                    "value": "general",
                    "displayValue": "General"
                }
            },
            "isSecure": false,
            "sentOnBehalf": false,
            "status": {
                "value": "assigned",
                "displayValue": "Assigned",
                "substatus": {
                    "value": "in_progress",
                    "displayValue": "In Progress"
                },
                "assigned": {
                    "user": {
                        "name": "JennyAnthony",
                        "firstName": "Jenny",
                        "lastName": "Anthony",
                        "id": 1002
                    },
                    "activityFolder": {
                        "name": {
                            "value": "activities_current",
                            "displayValue": "Current"
                        },
                        "id": 6
                    },
                    "isPinned": false,
                    "isLocked": false
                }
            },
            "priority": "2",
            "lastModified": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-08T23:41:41.000Z"
            },
            "dueDate": "2016-04-06T07:00:00.000Z",
            "subject": "Issue with laptop configuration",
            "customer": {
                "link": {
                    "rel": "customer",
                    "href": "/system/ws/v12/interaction/customer/1002"
                },
                "customerName": "John Davis",
                "contactPersons": {
                    "contactPerson": [
                        {
                            "isSystemCreated": false,
                            "firstName": "John",
                            "lastName": "Davis",
                            "contactPoints": {
                                "contactPoint": [
                                    {
                                        "type": {
                                            "value": "email",
                                            "displayValue": "Email",
                                            "email": {
                                                "emailAddress": "johndavis@example.com"
                                            }
                                        },
                                        "id": 1004
                                    }
                                ]
                            },
                            "id": 1002
                        }
                    ]
                },
                "id": 1002
            },
            "queue": {
                "name": "Email queue",
                "id": 1001
            },
            "attachments": {
                "count": 0,
                "purgedCount": 0,
                "link": {
                    "rel": "attachment",
                    "href": "/system/ws/v12/interaction/activity/1011/attachment"
                }
            },
            "notes": {
                "count": 1,
                "Link": {
                   "rel": "note",
                   "href": "/system/ws/v12/interaction/activity/1011/note"
                }
            },
	  "isContentPurged": false,
            "id": 1011
        },
        {
            "link": {
                "rel": "self",
                "href": "/system/ws/v12/interaction/activity/1016"
            },
            "case": {
                "link": {
                    "rel": "case",
                    "href": "/system/ws/v12/interaction/case/1002"
                },
                "id": 1002
            },
            "department": {
                "name": "Service",
                "id": 999
            },
            "mode": {
                "value": "outbound",
                "displayValue": "Outbound"
            },
            "type": {
                "value": "email",
                "displayValue": "Email",
                "subtype": {
                    "value": "reply",
                    "displayValue": "Reply"
                }
            },
            "isSecure": false,
            "sentOnBehalf": false,
            "status": {
                "value": "completed",
                "displayValue": "Completed",
                "substatus": {
                    "value": "done",
                    "displayValue": "Done"
                },
                "assigned": {
                    "user": {
                        "name": "JennyAnthony",
                        "firstName": "Jenny",
                        "lastName": "Anthony",
                        "id": 1002
                    },
                    "activityFolder": {
                        "name": {
                            "value": "activities_completed",
                            "displayValue": "Completed"
                        },
                        "id": 7
                    },
                    "isPinned": false,
                    "isLocked": false
                }
            },
            "lastModified": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-01T21:32:44.000Z"
            },
            "subject": "Re: offers [#1002]",
            "customer": {
                "link": {
                    "rel": "customer",
                    "href": "/system/ws/v12/interaction/customer/1002"
                },
                "customerName": "John Davis",
                "contactPersons": {
                    "contactPerson": [
                        {
                            "isSystemCreated": false,
                            "firstName": "John",
                            "lastName": "Davis",
                            "contactPoints": {
                                "contactPoint": [
                                    {
                                        "type": {
                                            "value": "email",
                                            "displayValue": "Email",
                                            "email": {
                                                "emailAddress": "johndavis@example.com"
                                            }
                                        },
                                        "id": 1004
                                    }
                                ]
                            },
                            "id": 1002
                        }
                    ]
                },
                "id": 1002
            },
            "queue": {
                "name": "Email queue",
                "id": 1001
            },
            "attachments": {
                "count": 0,
                "purgedCount": 0,
                "link": {
                    "rel": "attachment",
                    "href": "/system/ws/v12/interaction/activity/1016/attachment"
                }
            },
            "notes": {
                "count": 0,
                "Link": {
                   "rel": "note",
                   "href": "/system/ws/v12/interaction/activity/1016/note"
                }
            },
	  "isContentPurged": false,
            "id": 1016
        },
        {
            "link": {
                "rel": "self",
                "href": "/system/ws/v12/interaction/activity/1015"
            },
            "case": {
                "link": {
                    "rel": "case",
                    "href": "/system/ws/v12/interaction/case/1002"
                },
                "id": 1002
            },
            "department": {
                "name": "Service",
                "id": 999
            },
            "mode": {
                "value": "inbound",
                "displayValue": "Inbound"
            },
            "type": {
                "value": "email",
                "displayValue": "Email",
                "subtype": {
                    "value": "general",
                    "displayValue": "General"
                }
            },
            "isSecure": false,
            "sentOnBehalf": false,
            "status": {
                "value": "completed",
                "displayValue": "Completed",
                "substatus": {
                    "value": "done",
                    "displayValue": "Done"
                },
                "assigned": {
                    "user": {
                        "name": "JennyAnthony",
                        "firstName": "Jenny",
                        "lastName": "Anthony",
                        "id": 1002
                    },
                    "activityFolder": {
                        "name": {
                            "value": "activities_completed",
                            "displayValue": "Completed"
                        },
                        "id": 7
                    },
                    "isPinned": false,
                    "isLocked": false
                }
            },
            "lastModified": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-01T21:32:25.000Z"
            },
            "subject": "offers [#1002]",
            "customer": {
                "link": {
                    "rel": "customer",
                    "href": "/system/ws/v12/interaction/customer/1002"
                },
                "customerName": "John Davis",
                "contactPersons": {
                    "contactPerson": [
                        {
                            "isSystemCreated": false,
                            "firstName": "John",
                            "lastName": "Davis",
                            "contactPoints": {
                                "contactPoint": [
                                    {
                                        "type": {
                                            "value": "email",
                                            "displayValue": "Email",
                                            "email": {
                                                "emailAddress": "johndavis@example.com"
                                            }
                                        },
                                        "id": 1004
                                    }
                                ]
                            },
                            "id": 1002
                        }
                    ]
                },
                "id": 1002
            },
            "queue": {
                "name": "Email queue",
                "id": 1001
            },
            "attachments": {
                "count": 0,
                "purgedCount": 0,
                "link": {
                    "rel": "attachment",
                    "href": "/system/ws/v12/interaction/activity/1015/attachment"
                }
            },
            "notes": {
                "count": 1,
                "Link": {
                   "rel": "note",
                   "href": "/system/ws/v12/interaction/activity/1015/note"
                }
            },
	  "isContentPurged": false,
            "id": 1015
        }
    ],
    "paginationInfo": {
        "count": 3,
        "pagenum": 1,
        "pagesize": 25
    }
}

     


Example 6 - Search for activities by queue and when created date

This example demonstrates the following:

  • Search for activities that are in a queue and created within a date range.
  • Sorting on created date of the activity in ascending order.
  • Specifying to get an additional attribute "created" in the response.


XML

Request

Method URL
GET /ws/v12/interaction/activity?queue=1001&createdDate=[2016-04-01T21:00:42.000Z,2016-04-01T22:33:37.000Z]&$sort=createdDate&$attribute=created

Request headers

Name Value
X-egain-session Valid session ID
Accept application/xml
Accept-Language en-US

Response
HTTP/1.1 200 OK

Response headers

Name Value
X-egain-session current session ID
Content-Type application/xml

Response body

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<activities xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity"
xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/interaction/case"
xmlns:ns3="http://bindings.egain.com/ws/model/v12/gen/platform"
xmlns:ns4="http://bindings.egain.com/ws/model/v12/gen/common"
xmlns:ns5="http://bindings.egain.com/ws/model/v12/gen/interaction/folder"
xmlns:ns6="http://bindings.egain.com/ws/model/v12/gen/interaction/customer"
xmlns:ns7="http://bindings.egain.com/ws/model/v12/gen/interaction/contactperson"
xmlns:ns8="http://bindings.egain.com/ws/model/v12/gen/interaction/contactpoint"
xmlns:ns9="http://bindings.egain.com/ws/model/v12/gen/kb"
xmlns:ns10="http://bindings.egain.com/ws/model/v15/gen/kb/edition"
xmlns:ns11="http://bindings.egain.com/ws/model/v15/gen/kb/profile"
xmlns:ns12="http://bindings.egain.com/ws/model/v12/gen/interaction/attachment"
xmlns:ns13="http://bindings.egain.com/ws/model/v12/gen/mail/alias"
xmlns:ns14="http://bindings.egain.com/ws/model/v12/gen/live/entrypoint">
    <activity id="1015">
        <link rel="self" href="/system/ws/v12/interaction/activity/1015"/>
        <case id="1002">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1002"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>inbound</ns4:value>
            <ns4:displayValue>Inbound</ns4:displayValue>
        </mode>
        <type>
            <value>email</value>
            <displayValue>Email</displayValue>
            <subtype>
                <ns4:value>general</ns4:value>
                <ns4:displayValue>General</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>completed</value>
            <displayValue>Completed</displayValue>
            <substatus>
                <ns4:value>done</ns4:value>
                <ns4:displayValue>Done</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1002">
                    <ns3:name>JennyAnthony</ns3:name>
                    <ns3:firstName>Jenny</ns3:firstName>
                    <ns3:lastName>Anthony</ns3:lastName>
                </user>
                <activityFolder id="7">
                    <ns5:name>
                        <ns4:value>activities_completed</ns4:value>
                        <ns4:displayValue>Completed</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <created date="2016-04-01T21:00:42.000Z">
            <ns4:user id="17">
                <ns3:name>sscustomer</ns3:name>
                <ns3:firstName>SS Customer</ns3:firstName>
                <ns3:lastName>SS Customer</ns3:lastName>
            </ns4:user>
        </created>
        <lastModified date="2016-04-01T21:32:25.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </lastModified>
        <subject>offers [#1002]</subject>
        <customer id="1002">
            <ns6:link rel="customer" href="/system/ws/v12/interaction/customer/1002"/>
            <ns6:customerName>John Davis</ns6:customerName>
            <ns6:contactPersons>
                <ns7:contactPerson id="1002">
                    <ns7:isSystemCreated>false</ns7:isSystemCreated>
                    <ns7:firstName>John</ns7:firstName>
                    <ns7:lastName>Davis</ns7:lastName>
                    <ns7:contactPoints>
                        <ns8:contactPoint id="1004">
                            <ns8:type>
                                <ns8:value>email</ns8:value>
                                <ns8:displayValue>Email</ns8:displayValue>
                                <ns8:email>
                                    <ns8:emailAddress>johndavis@example.com</ns8:emailAddress>
                                </ns8:email>
                            </ns8:type>
                        </ns8:contactPoint>
                    </ns7:contactPoints>
                </ns7:contactPerson>
            </ns6:contactPersons>
        </customer>
        <queue id="1001">
            <ns3:name>Email queue</ns3:name>
        </queue>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1015/attachment"/>
        </attachments>
        <notes>
            <count>1</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1015/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
    </activity>
    <activity id="1016">
        <link rel="self" href="/system/ws/v12/interaction/activity/1016"/>
        <case id="1002">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1002"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>outbound</ns4:value>
            <ns4:displayValue>Outbound</ns4:displayValue>
        </mode>
        <type>
            <value>email</value>
            <displayValue>Email</displayValue>
            <subtype>
                <ns4:value>reply</ns4:value>
                <ns4:displayValue>Reply</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>completed</value>
            <displayValue>Completed</displayValue>
            <substatus>
                <ns4:value>done</ns4:value>
                <ns4:displayValue>Done</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1002">
                    <ns3:name>JennyAnthony</ns3:name>
                    <ns3:firstName>Jenny</ns3:firstName>
                    <ns3:lastName>Anthony</ns3:lastName>
                </user>
                <activityFolder id="7">
                    <ns5:name>
                        <ns4:value>activities_completed</ns4:value>
                        <ns4:displayValue>Completed</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <created date="2016-04-01T21:32:25.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </created>
        <lastModified date="2016-04-01T21:32:44.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </lastModified>
        <subject>Re: offers [#1002]</subject>
        <customer id="1002">
            <ns6:link rel="customer" href="/system/ws/v12/interaction/customer/1002"/>
            <ns6:customerName>John Davis</ns6:customerName>
            <ns6:contactPersons>
                <ns7:contactPerson id="1002">
                    <ns7:isSystemCreated>false</ns7:isSystemCreated>
                    <ns7:firstName>John</ns7:firstName>
                    <ns7:lastName>Davis</ns7:lastName>
                    <ns7:contactPoints>
                        <ns8:contactPoint id="1004">
                            <ns8:type>
                                <ns8:value>email</ns8:value>
                                <ns8:displayValue>Email</ns8:displayValue>
                                <ns8:email>
                                    <ns8:emailAddress>johndavis@example.com</ns8:emailAddress>
                                </ns8:email>
                            </ns8:type>
                        </ns8:contactPoint>
                    </ns7:contactPoints>
                </ns7:contactPerson>
            </ns6:contactPersons>
        </customer>
        <queue id="1001">
            <ns3:name>Email queue</ns3:name>
        </queue>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1016/attachment"/>
        </attachments>
        <notes>
            <count>0</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1016/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
    </activity>
    <paginationInfo>
        <ns4:count>2</ns4:count>
        <ns4:pagenum>1</ns4:pagenum>
        <ns4:pagesize>25</ns4:pagesize>
    </paginationInfo>
</activities>

     

JSON

Request

Method URL
GET /ws/v12/interaction/activity?queue=1001&createdDate=[2016-04-01T21:00:42.000Z,2016-04-01T22:33:37.000Z]&$sort=createdDate&$attribute=created

Request headers

Name Value
X-egain-session Valid session ID
Accept application/json
Accept-Language en-US

Response
HTTP/1.1 200 OK

Response headers

Name Value
X-egain-session current session ID
Content-Type application/json

Response body

{
    "activity": [
        {
            "link": {
                "rel": "self",
                "href": "/system/ws/v12/interaction/activity/1015"
            },
            "case": {
                "link": {
                    "rel": "case",
                    "href": "/system/ws/v12/interaction/case/1002"
                },
                "id": 1002
            },
            "department": {
                "name": "Service",
                "id": 999
            },
            "mode": {
                "value": "inbound",
                "displayValue": "Inbound"
            },
            "type": {
                "value": "email",
                "displayValue": "Email",
                "subtype": {
                    "value": "general",
                    "displayValue": "General"
                }
            },
            "isSecure": false,
            "sentOnBehalf": false,
            "status": {
                "value": "completed",
                "displayValue": "Completed",
                "substatus": {
                    "value": "done",
                    "displayValue": "Done"
                },
                "assigned": {
                    "user": {
                        "name": "JennyAnthony",
                        "firstName": "Jenny",
                        "lastName": "Anthony",
                        "id": 1002
                    },
                    "activityFolder": {
                        "name": {
                            "value": "activities_completed",
                            "displayValue": "Completed"
                        },
                        "id": 7
                    },
                    "isPinned": false,
                    "isLocked": false
                }
            },
            "created": {
                "user": {
                    "name": "sscustomer",
                    "firstName": "SS Customer",
                    "lastName": "SS Customer",
                    "id": 17
                },
                "date": "2016-04-01T21:00:42.000Z"
            },
            "lastModified": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-01T21:32:25.000Z"
            },
            "subject": "offers [#1002]",
            "customer": {
                "link": {
                    "rel": "customer",
                    "href": "/system/ws/v12/interaction/customer/1002"
                },
                "customerName": "John Davis",
                "contactPersons": {
                    "contactPerson": [
                        {
                            "isSystemCreated": false,
                            "firstName": "John",
                            "lastName": "Davis",
                            "contactPoints": {
                                "contactPoint": [
                                    {
                                        "type": {
                                            "value": "email",
                                            "displayValue": "Email",
                                            "email": {
                                                "emailAddress": "johndavis@example.com"
                                            }
                                        },
                                        "id": 1004
                                    }
                                ]
                            },
                            "id": 1002
                        }
                    ]
                },
                "id": 1002
            },
            "queue": {
                "name": "Email queue",
                "id": 1001
            },
            "attachments": {
                "count": 0,
                "purgedCount": 0,
                "link": {
                    "rel": "attachment",
                    "href": "/system/ws/v12/interaction/activity/1015/attachment"
                }
            },
            "notes": {
                "count": 1,
                "Link": {
                   "rel": "note",
                   "href": "/system/ws/v12/interaction/activity/1015/note"
                }
            },
	  "isContentPurged": false,
            "id": 1015
        },
        {
            "link": {
                "rel": "self",
                "href": "/system/ws/v12/interaction/activity/1016"
            },
            "case": {
                "link": {
                    "rel": "case",
                    "href": "/system/ws/v12/interaction/case/1002"
                },
                "id": 1002
            },
            "department": {
                "name": "Service",
                "id": 999
            },
            "mode": {
                "value": "outbound",
                "displayValue": "Outbound"
            },
            "type": {
                "value": "email",
                "displayValue": "Email",
                "subtype": {
                    "value": "reply",
                    "displayValue": "Reply"
                }
            },
            "isSecure": false,
            "sentOnBehalf": false,
            "status": {
                "value": "completed",
                "displayValue": "Completed",
                "substatus": {
                    "value": "done",
                    "displayValue": "Done"
                },
                "assigned": {
                    "user": {
                        "name": "JennyAnthony",
                        "firstName": "Jenny",
                        "lastName": "Anthony",
                        "id": 1002
                    },
                    "activityFolder": {
                        "name": {
                            "value": "activities_completed",
                            "displayValue": "Completed"
                        },
                        "id": 7
                    },
                    "isPinned": false,
                    "isLocked": false
                }
            },
            "created": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-01T21:32:25.000Z"
            },
            "lastModified": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-01T21:32:44.000Z"
            },
            "subject": "Re: offers [#1002]",
            "customer": {
                "link": {
                    "rel": "customer",
                    "href": "/system/ws/v12/interaction/customer/1002"
                },
                "customerName": "John Davis",
                "contactPersons": {
                    "contactPerson": [
                        {
                            "isSystemCreated": false,
                            "firstName": "John",
                            "lastName": "Davis",
                            "contactPoints": {
                                "contactPoint": [
                                    {
                                        "type": {
                                            "value": "email",
                                            "displayValue": "Email",
                                            "email": {
                                                "emailAddress": "johndavis@example.com"
                                            }
                                        },
                                        "id": 1004
                                    }
                                ]
                            },
                            "id": 1002
                        }
                    ]
                },
                "id": 1002
            },
            "queue": {
                "name": "Email queue",
                "id": 1001
            },
            "attachments": {
                "count": 0,
                "purgedCount": 0,
                "link": {
                    "rel": "attachment",
                    "href": "/system/ws/v12/interaction/activity/1016/attachment"
                }
            },
            "notes": {
                "count": 0,
                "Link": {
                   "rel": "note",
                   "href": "/system/ws/v12/interaction/activity/1016/note"
                }
            },
	  "isContentPurged": false,
            "id": 1016
        }
    ],
    "paginationInfo": {
        "count": 2,
        "pagenum": 1,
        "pagesize": 25
    }
}

     


Example 7 - Search for activities by mode and last modified date

This example demonstrates the following:

  • Search for activities with mode "inbound" and modified on or before a given date.
  • Default sorting (on activity ID in ascending order).

XML

Request

Method URL
GET /ws/v12/interaction/activity?mode=inbound&lastModifiedDate=[,2016-04-01T22:33:37.000Z]

Request headers

Name Value
X-egain-session Valid session ID
Accept application/xml
Accept-Language en-US

Response
HTTP/1.1 200 OK

Response headers

Name Value
X-egain-session current session ID
Content-Type application/xml

Response body

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<activities xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity"
xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/interaction/case"
xmlns:ns3="http://bindings.egain.com/ws/model/v12/gen/platform"
xmlns:ns4="http://bindings.egain.com/ws/model/v12/gen/common"
xmlns:ns5="http://bindings.egain.com/ws/model/v12/gen/interaction/folder"
xmlns:ns6="http://bindings.egain.com/ws/model/v12/gen/interaction/customer"
xmlns:ns7="http://bindings.egain.com/ws/model/v12/gen/interaction/contactperson"
xmlns:ns8="http://bindings.egain.com/ws/model/v12/gen/interaction/contactpoint"
xmlns:ns9="http://bindings.egain.com/ws/model/v12/gen/kb"
xmlns:ns10="http://bindings.egain.com/ws/model/v15/gen/kb/edition"
xmlns:ns11="http://bindings.egain.com/ws/model/v15/gen/kb/profile"
xmlns:ns12="http://bindings.egain.com/ws/model/v12/gen/interaction/attachment"
xmlns:ns13="http://bindings.egain.com/ws/model/v12/gen/mail/alias"
xmlns:ns14="http://bindings.egain.com/ws/model/v12/gen/live/entrypoint">
    <activity id="1015">
        <link rel="self" href="/system/ws/v12/interaction/activity/1015"/>
        <case id="1002">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1002"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>inbound</ns4:value>
            <ns4:displayValue>Inbound</ns4:displayValue>
        </mode>
        <type>
            <value>email</value>
            <displayValue>Email</displayValue>
            <subtype>
                <ns4:value>general</ns4:value>
                <ns4:displayValue>General</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>completed</value>
            <displayValue>Completed</displayValue>
            <substatus>
                <ns4:value>done</ns4:value>
                <ns4:displayValue>Done</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1002">
                    <ns3:name>JennyAnthony</ns3:name>
                    <ns3:firstName>Jenny</ns3:firstName>
                    <ns3:lastName>Anthony</ns3:lastName>
                </user>
                <activityFolder id="7">
                    <ns5:name>
                        <ns4:value>activities_completed</ns4:value>
                        <ns4:displayValue>Completed</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <lastModified date="2016-04-01T21:32:25.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </lastModified>
        <subject>offers [#1002]</subject>
        <customer id="1002">
            <ns6:link rel="customer" href="/system/ws/v12/interaction/customer/1002"/>
            <ns6:customerName>John Davis</ns6:customerName>
            <ns6:contactPersons>
                <ns7:contactPerson id="1002">
                    <ns7:isSystemCreated>false</ns7:isSystemCreated>
                    <ns7:firstName>John</ns7:firstName>
                    <ns7:lastName>Davis</ns7:lastName>
                    <ns7:contactPoints>
                        <ns8:contactPoint id="1004">
                            <ns8:type>
                                <ns8:value>email</ns8:value>
                                <ns8:displayValue>Email</ns8:displayValue>
                                <ns8:email>
                                    <ns8:emailAddress>johndavis@example.com</ns8:emailAddress>
                                </ns8:email>
                            </ns8:type>
                        </ns8:contactPoint>
                    </ns7:contactPoints>
                </ns7:contactPerson>
            </ns6:contactPersons>
        </customer>
        <queue id="1001">
            <ns3:name>Email queue</ns3:name>
        </queue>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1015/attachment"/>
        </attachments>
        <notes>
            <count>1</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1015/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
    </activity>
    <activity id="1017">
        <link rel="self" href="/system/ws/v12/interaction/activity/1017"/>
        <case id="1003">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1003"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>inbound</ns4:value>
            <ns4:displayValue>Inbound</ns4:displayValue>
        </mode>
        <type>
            <value>chat</value>
            <displayValue>Chat</displayValue>
            <subtype>
                <ns4:value>general</ns4:value>
                <ns4:displayValue>General</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>completed</value>
            <displayValue>Completed</displayValue>
            <substatus>
                <ns4:value>done</ns4:value>
                <ns4:displayValue>Done</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1002">
                    <ns3:name>JennyAnthony</ns3:name>
                    <ns3:firstName>Jenny</ns3:firstName>
                    <ns3:lastName>Anthony</ns3:lastName>
                </user>
                <activityFolder id="7">
                    <ns5:name>
                        <ns4:value>activities_completed</ns4:value>
                        <ns4:displayValue>Completed</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <lastModified date="2016-04-01T21:43:13.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </lastModified>
        <subject>I am looking for a new laptop.</subject>
        <customer id="1003">
            <ns6:link rel="customer" href="/system/ws/v12/interaction/customer/1003"/>
            <ns6:customerName>amy</ns6:customerName>
            <ns6:contactPersons>
                <ns7:contactPerson id="1003">
                    <ns7:isSystemCreated>false</ns7:isSystemCreated>
                    <ns7:firstName>amy</ns7:firstName>
                    <ns7:contactPoints>
                        <ns8:contactPoint id="1008">
                            <ns8:type>
                                <ns8:value>email</ns8:value>
                                <ns8:displayValue>Email</ns8:displayValue>
                                <ns8:email>
                                    <ns8:emailAddress>amy@example.com</ns8:emailAddress>
                                </ns8:email>
                            </ns8:type>
                        </ns8:contactPoint>
                    </ns7:contactPoints>
                </ns7:contactPerson>
            </ns6:contactPersons>
        </customer>
        <queue id="1000">
            <ns3:name>Chat queue</ns3:name>
        </queue>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1017/attachment"/>
        </attachments>
        <notes>
            <count>0</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1017/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
    </activity>
    <activity id="1018">
        <link rel="self" href="/system/ws/v12/interaction/activity/1018"/>
        <case id="1004">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1004"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>inbound</ns4:value>
            <ns4:displayValue>Inbound</ns4:displayValue>
        </mode>
        <type>
            <value>chat</value>
            <displayValue>Chat</displayValue>
            <subtype>
                <ns4:value>general</ns4:value>
                <ns4:displayValue>General</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>completed</value>
            <displayValue>Completed</displayValue>
            <substatus>
                <ns4:value>done</ns4:value>
                <ns4:displayValue>Done</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1002">
                    <ns3:name>JennyAnthony</ns3:name>
                    <ns3:firstName>Jenny</ns3:firstName>
                    <ns3:lastName>Anthony</ns3:lastName>
                </user>
                <activityFolder id="7">
                    <ns5:name>
                        <ns4:value>activities_completed</ns4:value>
                        <ns4:displayValue>Completed</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <lastModified date="2016-04-01T22:00:44.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </lastModified>
        <subject>hi</subject>
        <customer id="1003">
            <ns6:link rel="customer" href="/system/ws/v12/interaction/customer/1003"/>
            <ns6:customerName>amy</ns6:customerName>
            <ns6:contactPersons>
                <ns7:contactPerson id="1003">
                    <ns7:isSystemCreated>false</ns7:isSystemCreated>
                    <ns7:firstName>amy</ns7:firstName>
                    <ns7:contactPoints>
                        <ns8:contactPoint id="1008">
                            <ns8:type>
                                <ns8:value>email</ns8:value>
                                <ns8:displayValue>Email</ns8:displayValue>
                                <ns8:email>
                                    <ns8:emailAddress>amy@example.com</ns8:emailAddress>
                                </ns8:email>
                            </ns8:type>
                        </ns8:contactPoint>
                    </ns7:contactPoints>
                </ns7:contactPerson>
            </ns6:contactPersons>
        </customer>
        <queue id="1000">
            <ns3:name>Chat queue</ns3:name>
        </queue>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1018/attachment"/>
        </attachments>
        <notes>
            <count>0</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1018/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
    </activity>
    <paginationInfo>
        <ns4:count>3</ns4:count>
        <ns4:pagenum>1</ns4:pagenum>
        <ns4:pagesize>25</ns4:pagesize>
    </paginationInfo>
</activities>

     

JSON

Request

Method URL
GET /ws/v12/interaction/activity?mode=inbound&lastModifiedDate=[,2016-04-01T22:33:37.000Z]

Request headers

Name Value
X-egain-session Valid session ID
Accept application/json
Accept-Language en-US

Response
HTTP/1.1 200 OK

Response headers

Name Value
X-egain-session current session ID
Content-Type application/json

Response body

{
    "activity": [
        {
            "link": {
                "rel": "self",
                "href": "/system/ws/v12/interaction/activity/1015"
            },
            "case": {
                "link": {
                    "rel": "case",
                    "href": "/system/ws/v12/interaction/case/1002"
                },
                "id": 1002
            },
            "department": {
                "name": "Service",
                "id": 999
            },
            "mode": {
                "value": "inbound",
                "displayValue": "Inbound"
            },
            "type": {
                "value": "email",
                "displayValue": "Email",
                "subtype": {
                    "value": "general",
                    "displayValue": "General"
                }
            },
            "isSecure": false,
            "sentOnBehalf": false,
            "status": {
                "value": "completed",
                "displayValue": "Completed",
                "substatus": {
                    "value": "done",
                    "displayValue": "Done"
                },
                "assigned": {
                    "user": {
                        "name": "JennyAnthony",
                        "firstName": "Jenny",
                        "lastName": "Anthony",
                        "id": 1002
                    },
                    "activityFolder": {
                        "name": {
                            "value": "activities_completed",
                            "displayValue": "Completed"
                        },
                        "id": 7
                    },
                    "isPinned": false,
                    "isLocked": false
                }
            },
            "lastModified": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-01T21:32:25.000Z"
            },
            "subject": "offers [#1002]",
            "customer": {
                "link": {
                    "rel": "customer",
                    "href": "/system/ws/v12/interaction/customer/1002"
                },
                "customerName": "John Davis",
                "contactPersons": {
                    "contactPerson": [
                        {
                            "isSystemCreated": false,
                            "firstName": "John",
                            "lastName": "Davis",
                            "contactPoints": {
                                "contactPoint": [
                                    {
                                        "type": {
                                            "value": "email",
                                            "displayValue": "Email",
                                            "email": {
                                                "emailAddress": "johndavis@example.com"
                                            }
                                        },
                                        "id": 1004
                                    }
                                ]
                            },
                            "id": 1002
                        }
                    ]
                },
                "id": 1002
            },
            "queue": {
                "name": "Email queue",
                "id": 1001
            },
            "attachments": {
                "count": 0,
                "purgedCount": 0,
                "link": {
                    "rel": "attachment",
                    "href": "/system/ws/v12/interaction/activity/1015/attachment"
                }
            },
            "notes": {
                "count": 1,
                "Link": {
                   "rel": "note",
                   "href": "/system/ws/v12/interaction/activity/1015/note"
                }
            },
	  "isContentPurged": false,
            "id": 1015
        },
        {
            "link": {
                "rel": "self",
                "href": "/system/ws/v12/interaction/activity/1017"
            },
            "case": {
                "link": {
                    "rel": "case",
                    "href": "/system/ws/v12/interaction/case/1003"
                },
                "id": 1003
            },
            "department": {
                "name": "Service",
                "id": 999
            },
            "mode": {
                "value": "inbound",
                "displayValue": "Inbound"
            },
            "type": {
                "value": "chat",
                "displayValue": "Chat",
                "subtype": {
                    "value": "general",
                    "displayValue": "General"
                }
            },
            "isSecure": false,
            "sentOnBehalf": false,
            "status": {
                "value": "completed",
                "displayValue": "Completed",
                "substatus": {
                    "value": "done",
                    "displayValue": "Done"
                },
                "assigned": {
                    "user": {
                        "name": "JennyAnthony",
                        "firstName": "Jenny",
                        "lastName": "Anthony",
                        "id": 1002
                    },
                    "activityFolder": {
                        "name": {
                            "value": "activities_completed",
                            "displayValue": "Completed"
                        },
                        "id": 7
                    },
                    "isPinned": false,
                    "isLocked": false
                }
            },
            "lastModified": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-01T21:43:13.000Z"
            },
            "subject": "I am looking for a new laptop.",
            "customer": {
                "link": {
                    "rel": "customer",
                    "href": "/system/ws/v12/interaction/customer/1003"
                },
                "customerName": "amy  ",
                "contactPersons": {
                    "contactPerson": [
                        {
                            "isSystemCreated": false,
                            "firstName": "amy",
                            "contactPoints": {
                                "contactPoint": [
                                    {
                                        "type": {
                                            "value": "email",
                                            "displayValue": "Email",
                                            "email": {
                                                "emailAddress": "amy@example.com"
                                            }
                                        },
                                        "id": 1008
                                    }
                                ]
                            },
                            "id": 1003
                        }
                    ]
                },
                "id": 1003
            },
            "queue": {
                "name": "Chat queue",
                "id": 1000
            },
            "attachments": {
                "count": 0,
                "purgedCount": 0,
                "link": {
                    "rel": "attachment",
                    "href": "/system/ws/v12/interaction/activity/1017/attachment"
                }
            },
            "notes": {
                "count": 0,
                "Link": {
                   "rel": "note",
                   "href": "/system/ws/v12/interaction/activity/1017/note"
                }
            },
	  "isContentPurged": false,
            "id": 1017
        },
        {
            "link": {
                "rel": "self",
                "href": "/system/ws/v12/interaction/activity/1018"
            },
            "case": {
                "link": {
                    "rel": "case",
                    "href": "/system/ws/v12/interaction/case/1004"
                },
                "id": 1004
            },
            "department": {
                "name": "Service",
                "id": 999
            },
            "mode": {
                "value": "inbound",
                "displayValue": "Inbound"
            },
            "type": {
                "value": "chat",
                "displayValue": "Chat",
                "subtype": {
                    "value": "general",
                    "displayValue": "General"
                }
            },
            "isSecure": false,
            "sentOnBehalf": false,
            "status": {
                "value": "completed",
                "displayValue": "Completed",
                "substatus": {
                    "value": "done",
                    "displayValue": "Done"
                },
                "assigned": {
                    "user": {
                        "name": "JennyAnthony",
                        "firstName": "Jenny",
                        "lastName": "Anthony",
                        "id": 1002
                    },
                    "activityFolder": {
                        "name": {
                            "value": "activities_completed",
                            "displayValue": "Completed"
                        },
                        "id": 7
                    },
                    "isPinned": false,
                    "isLocked": false
                }
            },
            "lastModified": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-01T22:00:44.000Z"
            },
            "subject": "hi",
            "customer": {
                "link": {
                    "rel": "customer",
                    "href": "/system/ws/v12/interaction/customer/1003"
                },
                "customerName": "amy  ",
                "contactPersons": {
                    "contactPerson": [
                        {
                            "isSystemCreated": false,
                            "firstName": "amy",
                            "contactPoints": {
                                "contactPoint": [
                                    {
                                        "type": {
                                            "value": "email",
                                            "displayValue": "Email",
                                            "email": {
                                                "emailAddress": "amy@example.com"
                                            }
                                        },
                                        "id": 1008
                                    }
                                ]
                            },
                            "id": 1003
                        }
                    ]
                },
                "id": 1003
            },
            "queue": {
                "name": "Chat queue",
                "id": 1000
            },
            "attachments": {
                "count": 0,
                "purgedCount": 0,
                "link": {
                    "rel": "attachment",
                    "href": "/system/ws/v12/interaction/activity/1018/attachment"
                }
            },
            "notes": {
                "count": 0,
                "Link": {
                   "rel": "note",
                   "href": "/system/ws/v12/interaction/activity/1018/note"
                }
            },
	  "isContentPurged": false,
            "id": 1018
        }
    ],
    "paginationInfo": {
        "count": 3,
        "pagenum": 1,
        "pagesize": 25
    }
}

     


Example 8 - Search for activities by status, assigned user name and last modified date

This example demonstrates the following:

  • Search for open activities that were last modified within a date range and are assigned to a particular user.
  • Default sorting (on activity ID in ascending order).

XML

Request

Method URL
GET /ws/v12/interaction/activity?status=open&assignedUserName=JennyAnthony&lastModifiedDate=[2016-04-01T22:00:00.000Z,2016-04-01T22:30:00.000Z]

Request headers

Name Value
X-egain-session Valid session ID
Accept application/xml
Accept-Language en-US

Response
HTTP/1.1 200 OK

Response headers

Name Value
X-egain-session current session ID
Content-Type application/xml

Response body

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<activities xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity"
xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/interaction/case"
xmlns:ns3="http://bindings.egain.com/ws/model/v12/gen/platform"
xmlns:ns4="http://bindings.egain.com/ws/model/v12/gen/common"
xmlns:ns5="http://bindings.egain.com/ws/model/v12/gen/interaction/folder"
xmlns:ns6="http://bindings.egain.com/ws/model/v12/gen/interaction/customer"
xmlns:ns7="http://bindings.egain.com/ws/model/v12/gen/interaction/contactperson"
xmlns:ns8="http://bindings.egain.com/ws/model/v12/gen/interaction/contactpoint"
xmlns:ns9="http://bindings.egain.com/ws/model/v12/gen/kb"
xmlns:ns10="http://bindings.egain.com/ws/model/v15/gen/kb/edition"
xmlns:ns11="http://bindings.egain.com/ws/model/v15/gen/kb/profile"
xmlns:ns12="http://bindings.egain.com/ws/model/v12/gen/interaction/attachment"
xmlns:ns13="http://bindings.egain.com/ws/model/v12/gen/mail/alias"
xmlns:ns14="http://bindings.egain.com/ws/model/v12/gen/live/entrypoint">
    <activity id="1020">
        <link rel="self" href="/system/ws/v12/interaction/activity/1020"/>
        <case id="1006">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1006"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>none</ns4:value>
            <ns4:displayValue>None</ns4:displayValue>
        </mode>
        <type>
            <value>task</value>
            <displayValue>Task</displayValue>
            <subtype>
                <ns4:value>general</ns4:value>
                <ns4:displayValue>General</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>assigned</value>
            <displayValue>Assigned</displayValue>
            <substatus>
                <ns4:value>in_progress</ns4:value>
                <ns4:displayValue>In Progress</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1002">
                    <ns3:name>JennyAnthony</ns3:name>
                    <ns3:firstName>Jenny</ns3:firstName>
                    <ns3:lastName>Anthony</ns3:lastName>
                </user>
                <activityFolder id="6">
                    <ns5:name>
                        <ns4:value>activities_current</ns4:value>
                        <ns4:displayValue>Current</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <priority>3</priority>
        <lastModified date="2016-04-01T22:03:13.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </lastModified>
        <dueDate>2016-04-14T07:00:00.000Z</dueDate>
        <subject>Answer Oliver's question [#1006]</subject>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1020/attachment"/>
        </attachments>
        <notes>
            <count>1</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1020/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
    </activity>
    <activity id="1021">
        <link rel="self" href="/system/ws/v12/interaction/activity/1021"/>
        <case id="1007">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1007"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>outbound</ns4:value>
            <ns4:displayValue>Outbound</ns4:displayValue>
        </mode>
        <type>
            <value>social</value>
            <displayValue>Social</displayValue>
            <subtype>
                <ns4:value>twittercompose</ns4:value>
                <ns4:displayValue>TwitterCompose</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>assigned</value>
            <displayValue>Assigned</displayValue>
            <substatus>
                <ns4:value>in_progress</ns4:value>
                <ns4:displayValue>In Progress</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1002">
                    <ns3:name>JennyAnthony</ns3:name>
                    <ns3:firstName>Jenny</ns3:firstName>
                    <ns3:lastName>Anthony</ns3:lastName>
                </user>
                <activityFolder id="6">
                    <ns5:name>
                        <ns4:value>activities_current</ns4:value>
                        <ns4:displayValue>Current</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <priority>4</priority>
        <lastModified date="2016-04-01T22:05:33.000Z">
            <ns4:user id="1002">
                <ns3:name>JennyAnthony</ns3:name>
                <ns3:firstName>Jenny</ns3:firstName>
                <ns3:lastName>Anthony</ns3:lastName>
            </ns4:user>
        </lastModified>
        <dueDate>2016-04-29T11:30:00.000Z</dueDate>
        <subject>No Subject</subject>
        <customer id="1002">
            <ns6:link rel="customer" href="/system/ws/v12/interaction/customer/1002"/>
            <ns6:customerName>John Davis</ns6:customerName>
            <ns6:contactPersons>
                <ns7:contactPerson id="1002">
                    <ns7:isSystemCreated>false</ns7:isSystemCreated>
                    <ns7:firstName>John</ns7:firstName>
                    <ns7:lastName>Davis</ns7:lastName>
                    <ns7:contactPoints>
                        <ns8:contactPoint id="1004">
                            <ns8:type>
                                <ns8:value>email</ns8:value>
                                <ns8:displayValue>Email</ns8:displayValue>
                                <ns8:email>
                                    <ns8:emailAddress>johndavis@example.com</ns8:emailAddress>
                                </ns8:email>
                            </ns8:type>
                        </ns8:contactPoint>
                    </ns7:contactPoints>
                </ns7:contactPerson>
            </ns6:contactPersons>
        </customer>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1021/attachment"/>
        </attachments>
        <notes>
            <count>0</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1021/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
    </activity>
    <paginationInfo>
        <ns4:count>2</ns4:count>
        <ns4:pagenum>1</ns4:pagenum>
        <ns4:pagesize>25</ns4:pagesize>
    </paginationInfo>
</activities>

     

JSON

Request

Method URL
GET /ws/v12/interaction/activity?status=open&assignedUserName=JennyAnthony&lastModifiedDate=[2016-04-01T22:00:00.000Z,2016-04-01T22:30:00.000Z]

Request headers

Name Value
X-egain-session Valid session ID
Accept application/json
Accept-Language en-US

Response
HTTP/1.1 200 OK

Response headers

Name Value
X-egain-session current session ID
Content-Type application/json

Response body

{
  "activity": [
    {
      "link": {
        "rel": "self",
        "href": "/system/ws/v12/interaction/activity/1000"
      },
      "case": {
        "link": {
          "rel": "case",
          "href": "/system/ws/v12/interaction/case/1000"
        },
        "id": 1000
      },
      "department": {
        "name": "Service",
        "id": 999
      },
      "mode": {
        "value": "inbound",
        "displayValue": "Inbound"
      },
      "type": {
        "value": "chat",
        "displayValue": "Chat",
        "subtype": {
          "value": "general",
          "displayValue": "General"
        }
      },
      "isSecure": false,
      "sentOnBehalf": false,
      "status": {
        "value": "completed",
        "displayValue": "Completed",
        "substatus": {
          "value": "abandoned_chat",
          "displayValue": "Abandoned Chat"
        },
        "assigned": {
          "user": {
            "name": "Jhon Summers",
            "firstName": "Summers",
            "lastName": "Json",
            "id": 1013
          },
          "activityFolder": {
            "name": {
              "value": "activities_completed",
              "displayValue": "Completed"
            },
            "id": 7
          },
          "isPinned": false,
          "isLocked": false
        }
      },
      "lastModified": {
        "date": "2019-01-03T16:15:13.000Z"
      },
      "subject": "Cashback not received",
      "customer": {
        "link": {
          "rel": "customer",
          "href": "/system/ws/v12/interaction/customer/1003"
        },
        "customerName": "William ",
        "contactPersons": {
          "contactPerson": [
            {
              "isSystemCreated": false,
              "firstName": "William",
              "contactPoints": {
                "contactPoint": [
                  {
                    "type": {
                      "value": "email",
                      "displayValue": "Email",
                      "email": {
                        "emailAddress": "williams@gmail.com"
                      }
                    },
                    "id": 1003
                  }
                ]
              },
              "id": 1003
            }
          ]
        },
        "id": 1003
      },
      "queue": {
        "name": "Chat queue",
        "id": 1000
      },
      "attachments": {
        "count": 0,
        "purgedCount": 0,
        "link": {
          "rel": "attachment",
          "href": "/system/ws/v12/interaction/activity/1000/attachment"
        }
      },
      "notes": {
        "count": 0,
        "Link": {
          "rel": "note",
          "href": "/system/ws/v12/interaction/activity/1000/note"
        }
      },
	  "isContentPurged": false,
      "id": 1000
    },
    {
      "link": {
        "rel": "self",
        "href": "/system/ws/v12/interaction/activity/1002"
      },
      "case": {
        "link": {
          "rel": "case",
          "href": "/system/ws/v12/interaction/case/1002"
        },
        "id": 1002
      },
      "department": {
        "name": "Service",
        "id": 999
      },
      "mode": {
        "value": "inbound",
        "displayValue": "Inbound"
      },
      "type": {
        "value": "chat",
        "displayValue": "Chat",
        "subtype": {
          "value": "general",
          "displayValue": "General"
        }
      },
      "isSecure": false,
      "sentOnBehalf": false,
      "status": {
        "value": "completed",
        "displayValue": "Completed",
        "substatus": {
          "value": "done",
          "displayValue": "Done"
        },
        "assigned": {
          "user": {
            "name": "Jhon Summers",
            "firstName": "Summers",
            "lastName": "Jhon",
            "id": 1013
          },
          "activityFolder": {
            "name": {
              "value": "activities_completed",
              "displayValue": "Completed"
            },
            "id": 7
          },
          "isPinned": false,
          "isLocked": false
        }
      },
      "lastModified": {
        "date": "2019-01-03T16:29:15.000Z"
      },
      "subject": "Network Failure",
      "customer": {
        "link": {
          "rel": "customer",
          "href": "/system/ws/v12/interaction/customer/1006"
        },
        "customerName": "James",
        "contactPersons": {
          "contactPerson": [
            {
              "isSystemCreated": false,
              "firstName": "James",
              "contactPoints": {
                "contactPoint": [
                  {
                    "type": {
                      "value": "email",
                      "displayValue": "Email",
                      "email": {
                        "emailAddress": "wjames@yahoo.com"
                      }
                    },
                    "id": 1006
                  }
                ]
              },
              "id": 1006
            }
          ]
        },
        "id": 1006
      },
      "queue": {
        "name": "Chat queue",
        "id": 1000
      },
      "attachments": {
        "count": 0,
        "purgedCount": 0,
        "link": {
          "rel": "attachment",
          "href": "/system/ws/v12/interaction/activity/1002/attachment"
        }
      },
      "notes": {
        "count": 2,
        "Link": {
          "rel": "note",
          "href": "/system/ws/v12/interaction/activity/1002/note"
        }
      },
	  "isContentPurged": false,
      "id": 1002
    }
  ],
  "paginationInfo": {
    "count": 2,
    "pagenum": 1,
    "pagesize": 25
  }
}

     


Example 9 - Search for activities by queue and type

This example demonstrates the following:

  • Search for activities that are in a particular queue and are of type 'chat'.

XML

Request

Method URL
GET /ws/v12/interaction/activity?queue=1000&type=chat

Request headers

Name Value
X-egain-session Valid session ID
Accept application/xml
Accept-Language en-US

Response
HTTP/1.1 200 OK

Response headers

Name Value
X-egain-session current session ID
Content-Type application/xml

Response body

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<activities
    xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity"
    xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/interaction/case"
    xmlns:ns3="http://bindings.egain.com/ws/model/v12/gen/platform"
    xmlns:ns4="http://bindings.egain.com/ws/model/v12/gen/common"
    xmlns:ns5="http://bindings.egain.com/ws/model/v12/gen/interaction/folder"
    xmlns:ns6="http://bindings.egain.com/ws/model/v12/gen/interaction/customer"
    xmlns:ns7="http://bindings.egain.com/ws/model/v12/gen/interaction/contactperson"
    xmlns:ns8="http://bindings.egain.com/ws/model/v12/gen/interaction/contactpoint"
    xmlns:ns9="http://bindings.egain.com/ws/model/v12/gen/kb"
    xmlns:ns10="http://bindings.egain.com/ws/model/v15/gen/kb/edition"
    xmlns:ns11="http://bindings.egain.com/ws/model/v15/gen/kb/profile"
    xmlns:ns12="http://bindings.egain.com/ws/model/v12/gen/interaction/attachment"
    xmlns:ns13="http://bindings.egain.com/ws/model/v12/gen/mail/alias"
    xmlns:ns14="http://bindings.egain.com/ws/model/v12/gen/live/entrypoint">
    <activity id="1000">
        <link rel="self" href="/system/ws/v12/interaction/activity/1000"/>
        <case id="1000">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1000"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>inbound</ns4:value>
            <ns4:displayValue>Inbound</ns4:displayValue>
        </mode>
        <type>
            <value>chat</value>
            <displayValue>Chat</displayValue>
            <subtype>
                <ns4:value>general</ns4:value>
                <ns4:displayValue>General</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>completed</value>
            <displayValue>Completed</displayValue>
            <substatus>
                <ns4:value>abandoned_chat</ns4:value>
                <ns4:displayValue>Abandoned Chat</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1013">
                    <ns3:name>John Summers</ns3:name>
                    <ns3:firstName>John</ns3:firstName>
                    <ns3:lastName>Summers</ns3:lastName>
                </user>
                <activityFolder id="7">
                    <ns5:name>
                        <ns4:value>activities_completed</ns4:value>
                        <ns4:displayValue>Completed</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <lastModified date="2019-01-03T16:15:13.000Z"/>
        <subject>Cashback not received</subject>
        <customer id="1003">
            <ns6:link rel="customer" href="/system/ws/v12/interaction/customer/1003"/>
            <ns6:customerName>William</ns6:customerName>
            <ns6:contactPersons>
                <ns7:contactPerson id="1003">
                    <ns7:isSystemCreated>false</ns7:isSystemCreated>
                    <ns7:firstName>William</ns7:firstName>
                    <ns7:contactPoints>
                        <ns8:contactPoint id="1003">
                            <ns8:type>
                                <ns8:value>email</ns8:value>
                                <ns8:displayValue>Email</ns8:displayValue>
                                <ns8:email>
                                    <ns8:emailAddress>williams@gmail.com</ns8:emailAddress>
                                </ns8:email>
                            </ns8:type>
                        </ns8:contactPoint>
                    </ns7:contactPoints>
                </ns7:contactPerson>
            </ns6:contactPersons>
        </customer>
        <queue id="1000">
            <ns3:name>Chat queue</ns3:name>
        </queue>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1000/attachment"/>
        </attachments>
        <notes>
            <count>0</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1000/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
    </activity>
    <activity id="1002">
        <link rel="self" href="/system/ws/v12/interaction/activity/1002"/>
        <case id="1002">
            <ns2:link rel="case" href="/system/ws/v12/interaction/case/1002"/>
        </case>
        <department id="999">
            <ns3:name>Service</ns3:name>
        </department>
        <mode>
            <ns4:value>inbound</ns4:value>
            <ns4:displayValue>Inbound</ns4:displayValue>
        </mode>
        <type>
            <value>chat</value>
            <displayValue>Chat</displayValue>
            <subtype>
                <ns4:value>general</ns4:value>
                <ns4:displayValue>General</ns4:displayValue>
            </subtype>
        </type>
        <isSecure>false</isSecure>
        <sentOnBehalf>false</sentOnBehalf>
        <status>
            <value>completed</value>
            <displayValue>Completed</displayValue>
            <substatus>
                <ns4:value>done</ns4:value>
                <ns4:displayValue>Done</ns4:displayValue>
            </substatus>
            <assigned>
                <user id="1013">
                    <ns3:name>John Summers</ns3:name>
                    <ns3:firstName>John</ns3:firstName>
                    <ns3:lastName>Summers</ns3:lastName>
                </user>
                <activityFolder id="7">
                    <ns5:name>
                        <ns4:value>activities_completed</ns4:value>
                        <ns4:displayValue>Completed</ns4:displayValue>
                    </ns5:name>
                </activityFolder>
                <isPinned>false</isPinned>
                <isLocked>false</isLocked>
            </assigned>
        </status>
        <lastModified date="2019-01-03T16:29:15.000Z"/>
        <subject>Network Failure</subject>
        <customer id="1006">
            <ns6:link rel="customer" href="/system/ws/v12/interaction/customer/1006"/>
            <ns6:customerName>James</ns6:customerName>
            <ns6:contactPersons>
                <ns7:contactPerson id="1006">
                    <ns7:isSystemCreated>false</ns7:isSystemCreated>
                    <ns7:firstName>James</ns7:firstName>
                    <ns7:contactPoints>
                        <ns8:contactPoint id="1006">
                            <ns8:type>
                                <ns8:value>email</ns8:value>
                                <ns8:displayValue>Email</ns8:displayValue>
                                <ns8:email>
                                    <ns8:emailAddress>wjames@yahoo.com</ns8:emailAddress>
                                </ns8:email>
                            </ns8:type>
                        </ns8:contactPoint>
                    </ns7:contactPoints>
                </ns7:contactPerson>
            </ns6:contactPersons>
        </customer>
        <queue id="1000">
            <ns3:name>Chat queue</ns3:name>
        </queue>
        <attachments>
            <ns12:count>0</ns12:count>
            <ns12:purgedCount>0</ns12:purgedCount>
            <ns12:link rel="attachment" href="/system/ws/v12/interaction/activity/1002/attachment"/>
        </attachments>
        <notes>
            <count>2</count>
            <Link rel="note" href="/system/ws/v12/interaction/activity/1002/note"/>
        </notes>
		<isContentPurged>false</isContentPurged>
    </activity>
    <paginationInfo>
        <ns4:count>2</ns4:count>
        <ns4:pagenum>1</ns4:pagenum>
        <ns4:pagesize>25</ns4:pagesize>
    </paginationInfo>
</activities>

     

JSON

Request

Method URL
GET /ws/v12/interaction/activity?queue=1000&type=chat

Request headers

Name Value
X-egain-session Valid session ID
Accept application/json
Accept-Language en-US

Response
HTTP/1.1 200 OK

Response headers

Name Value
X-egain-session current session ID
Content-Type application/json

Response body

{
    "activity": [
        {
            "link": {
                "rel": "self",
                "href": "/system/ws/v12/interaction/activity/1020"
            },
            "case": {
                "link": {
                    "rel": "case",
                    "href": "/system/ws/v12/interaction/case/1006"
                },
                "id": 1006
            },
            "department": {
                "name": "Service",
                "id": 999
            },
            "mode": {
                "value": "none",
                "displayValue": "None"
            },
            "type": {
                "value": "task",
                "displayValue": "Task",
                "subtype": {
                    "value": "general",
                    "displayValue": "General"
                }
            },
            "isSecure": false,
            "sentOnBehalf": false,
            "status": {
                "value": "assigned",
                "displayValue": "Assigned",
                "substatus": {
                    "value": "in_progress",
                    "displayValue": "In Progress"
                },
                "assigned": {
                    "user": {
                        "name": "JennyAnthony",
                        "firstName": "Jenny",
                        "lastName": "Anthony",
                        "id": 1002
                    },
                    "activityFolder": {
                        "name": {
                            "value": "activities_current",
                            "displayValue": "Current"
                        },
                        "id": 6
                    },
                    "isPinned": false,
                    "isLocked": false
                }
            },
            "priority": "3",
            "lastModified": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-01T22:03:13.000Z"
            },
            "dueDate": "2016-04-14T07:00:00.000Z",
            "subject": "Answer Oliver's question [#1006]",
            "attachments": {
                "count": 0,
                "purgedCount": 0,
                "link": {
                    "rel": "attachment",
                    "href": "/system/ws/v12/interaction/activity/1020/attachment"
                }
            },
            "notes": {
                "count": 1,
                "Link": {
                   "rel": "note",
                   "href": "/system/ws/v12/interaction/activity/1020/note"
                }
            },
	  "isContentPurged": false,
            "id": 1020
        },
        {
            "link": {
                "rel": "self",
                "href": "/system/ws/v12/interaction/activity/1021"
            },
            "case": {
                "link": {
                    "rel": "case",
                    "href": "/system/ws/v12/interaction/case/1007"
                },
                "id": 1007
            },
            "department": {
                "name": "Service",
                "id": 999
            },
            "mode": {
                "value": "outbound",
                "displayValue": "Outbound"
            },
            "type": {
                "value": "social",
                "displayValue": "Social",
                "subtype": {
                    "value": "twittercompose",
                    "displayValue": "TwitterCompose"
                }
            },
            "isSecure": false,
            "sentOnBehalf": false,
            "status": {
                "value": "assigned",
                "displayValue": "Assigned",
                "substatus": {
                    "value": "in_progress",
                    "displayValue": "In Progress"
                },
                "assigned": {
                    "user": {
                        "name": "JennyAnthony",
                        "firstName": "Jenny",
                        "lastName": "Anthony",
                        "id": 1002
                    },
                    "activityFolder": {
                        "name": {
                            "value": "activities_current",
                            "displayValue": "Current"
                        },
                        "id": 6
                    },
                    "isPinned": false,
                    "isLocked": false
                }
            },
            "priority": "4",
            "lastModified": {
                "user": {
                    "name": "JennyAnthony",
                    "firstName": "Jenny",
                    "lastName": "Anthony",
                    "id": 1002
                },
                "date": "2016-04-01T22:05:33.000Z"
            },
            "dueDate": "2016-04-29T11:30:00.000Z",
            "subject": "No Subject",
            "customer": {
                "link": {
                    "rel": "customer",
                    "href": "/system/ws/v12/interaction/customer/1002"
                },
                "customerName": "John Davis",
                "contactPersons": {
                    "contactPerson": [
                        {
                            "isSystemCreated": false,
                            "firstName": "John",
                            "lastName": "Davis",
                            "contactPoints": {
                                "contactPoint": [
                                    {
                                        "type": {
                                            "value": "email",
                                            "displayValue": "Email",
                                            "email": {
                                                "emailAddress": "johndavis@example.com"
                                            }
                                        },
                                        "id": 1004
                                    }
                                ]
                            },
                            "id": 1002
                        }
                    ]
                },
                "id": 1002
            },
            "attachments": {
                "count": 0,
                "purgedCount": 0,
                "link": {
                    "rel": "attachment",
                    "href": "/system/ws/v12/interaction/activity/1021/attachment"
                }
            },
            "notes": {
                "count": 0,
                "Link": {
                   "rel": "note",
                   "href": "/system/ws/v12/interaction/activity/1021/note"
                }
            },
	  "isContentPurged": false,
            "id": 1021
        }
    ],
    "paginationInfo": {
        "count": 2,
        "pagenum": 1,
        "pagesize": 25
    }
}