Using XML/JSON as the content-type, this example demonstrates the following:
Request
Method | URL |
---|---|
POST | /ws/v12/interaction/activity |
Request headers
Name | Value |
---|---|
X-egain-session | Valid session ID |
Accept | application/xml |
Content-Type | application/xml |
Accept-Language | en-US |
Request body:
<?xml version="1.0" encoding="UTF-8"?> <activity xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity" xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/platform" xmlns:ns3="http://bindings.egain.com/ws/model/v12/gen/common" xmlns:ns4="http://bindings.egain.com/ws/model/v12/gen/interaction/attachment" > <department> <ns2:name>service</ns2:name> </department> <type> <value>email</value> <subtype> <ns3:value>general</ns3:value> </subtype> </type> <case id = '1060'/> <isSecure>true</isSecure> <subject>Issue with mobile phone</subject> <payload> <email> <date date='2015-12-26T19:00:00.000Z'/> <contents> <content> <ns3:type>text</ns3:type> <ns3:value>This is the issue</ns3:value> </content> <content> <ns3:type>html</ns3:type> <ns3:value><![CDATA[<HTML><HEAD><TITLE></TITLE></HEAD><BODY><P>This is the issue <BR> </P></BODY></HTML>]]></ns3:value> </content> </contents> <emailAddresses> <from>jhenry@customer.com</from> <receiver>support@business.com</receiver> </emailAddresses> </email> </payload> </activity>
Response:
HTTP/1.1 201 Created
Response headers
Name | Value |
---|---|
X-egain-session | current session ID |
Content-Type | application/xml |
Location | /system/ws/v12/interaction/activity/2795 |
Request
Method | URL |
---|---|
POST | /ws/v12/interaction/activity |
Request headers :
Name | Value |
---|---|
X-egain-session | Valid session ID |
Content-Type | application/json |
Accept | application/json |
Accept-Language | en-US |
Request body:
{ "department": { "name": "service" }, "type": { "value": "email", "subtype": { "value": "general" } }, "case" : { "id" : "1060" }, "isSecure": "true", "subject": "Issue with mobile phone", "payload": { "email": { "date": { "date": "2015-12-26T19:00:00.000Z" }, "contents": { "content": [ { "type": "text", "value": "This is the issue" }, { "type": "html", "value": "<HTML><HEAD><TITLE></TITLE></HEAD><BODY><P>This is the issue <BR> </P></BODY></HTML>" } ] }, "emailAddresses": { "from": "jhenry@customer.com", "receiver": "support@business.com" } } } }
Response:
HTTP/1.1 201 Created
Response headers
Name | Value |
---|---|
X-egain-session | current session ID |
Content-Type | application/json |
Location | /system/ws/v12/interaction/activity/2795 |
Using multipart/form-data as the content type, this example demonstrates the following:
This uses multipart/form-data representation for the request data.
Note that the value of "isSecure" attribute is sent as "false" in the request. The API would work the same if this attribute was left out as well, since the default value for "isSecure" is "false".
Request
Method | URL |
---|---|
POST | /ws/v12/interaction/activity |
Request headers :
Name | Value |
---|---|
X-egain-session | Valid session ID |
Content-Type | multipart/form-data; boundary=----WebKitFormBoundaryLyRAYGiE5mFu3Ucv |
Accept | application/xml |
Accept-Language | en-US |
Request body:
------WebKitFormBoundaryLyRAYGiE5mFu3Ucv Content-Disposition: form-data; name="data" <?xml version="1.0" encoding="UTF-8"?> <activity xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity" xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/platform" xmlns:ns3="http://bindings.egain.com/ws/model/v12/gen/common" xmlns:ns4="http://bindings.egain.com/ws/model/v12/gen/interaction/attachment" > <department> <ns2:name>service</ns2:name> </department> <type> <value>email</value> <subtype> <ns3:value>general</ns3:value> </subtype> </type> <isSecure>false</isSecure> <subject>Issue with mobile phone</subject> <payload> <email> <date date='2015-12-26T19:00:00.000Z'/> <contents> <content> <ns3:type>html</ns3:type> <ns3:value><![CDATA[<HTML><HEAD><TITLE></TITLE></HEAD><BODY><P> This is the issue <BR> </P></BODY></HTML>]]></ns3:value> </content> </contents> <emailAddresses> <from>jhenry@customer.com</from> <receiver>support@business.com</receiver> </emailAddresses> </email> </payload> </activity> ------WebKitFormBoundaryLyRAYGiE5mFu3Ucv Content-Disposition: form-data; name="data-type" application/xml ------WebKitFormBoundaryLyRAYGiE5mFu3Ucv--
Response:
HTTP/1.1 201 Created
Response headers
Name | Value |
---|---|
X-egain-session | Current session ID |
Content-Type | application/xml |
Location | /system/ws/v12/interaction/activity/2800 |
Request
Method | URL |
---|---|
POST | /ws/v12/interaction/activity |
Request headers :
Name | Value |
---|---|
X-egain-session | Valid session ID |
Content-Type | multipart/form-data; boundary=----WebKitFormBoundaryLyRAYGiE5mFu3Ucv |
Accept | application/json |
Accept-Language | en-US |
Request body:
------WebKitFormBoundaryLyRAYGiE5mFu3Ucv Content-Disposition: form-data; name="data" { "department": { "name": "service" }, "type": { "value": "email", "subtype": { "value": "general" } }, "isSecure": "false", "subject": "Issue with mobile phone", "payload": { "email": { "date": { "date": "2015-12-26T19:00:00.000Z" }, "contents": { "content": [ { "type": "html", "value": "<HTML><HEAD><TITLE></TITLE></HEAD><BODY><P>This is the issue <BR> </P></BODY></HTML>" } ] }, "emailAddresses": { "from": "jhenry@customer.com", "receiver": "support@business.com" } } } } ------WebKitFormBoundaryLyRAYGiE5mFu3Ucv Content-Disposition: form-data; name="data-type" application/json ------WebKitFormBoundaryLyRAYGiE5mFu3Ucv--
Response:
HTTP/1.1 201 Created
Response headers
Name | Value |
---|---|
X-egain-session | Current session ID |
Content-Type | multipart/form-data; boundary=----WebKitFormBoundaryLyRAYGiE5mFu3Ucv |
Location | /system/ws/v12/interaction/activity/2800 |
Using XML/JSON as content-type, this example demonstrates the following:
Note:
1. isInline element is not present for the attachment with fileName laptop_issue.gif. Hence, this attachment will be treated as a non-inline attachment.
2. isInline element is set to true for the attachment with contentId 14A6D. This attachment is being referred by the image <IMG src="cid:14A6D171E20D4FD8A20D0D17B6C984CF@example.com"> in the email content using the 171E 20D4F D8A2 0D0D1 7B6C 984CF @exa mple. comcid URL scheme. Hence, this attachment will be treated as an inline attachment for this email.
Request
Method | URL |
---|---|
POST | /ws/v12/interaction/activity |
Request headers
Name | Value |
---|---|
X-egain-session | Valid session ID |
Accept | application/xml |
Content-Type | application/xml |
Accept-Language | en-US |
Request body:
<?xml version="1.0" encoding="UTF-8"?> <activity xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity" xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/platform" xmlns:ns3="http://bindings.egain.com/ws/model/v12/gen/common" xmlns:ns4="http://bindings.egain.com/ws/model/v12/gen/interaction/attachment" > <department> <ns2:name>service</ns2:name> </department> <type> <value>email</value> <subtype> <ns3:value>general</ns3:value> </subtype> </type> <subject>laptop issue</subject> <attachments> <ns4:attachment> <ns4:fileName>laptop_issue.gif</ns4:fileName> <ns4:contentType>image/gif</ns4:contentType> <ns4:content><![CDATA[ R0lGODlhEAAQAIMAAAAAAP///7Tt/wCfz3fg/5vo/7Tu/1JSUv///wAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFM i4wAwEBAAAh+QQBAAAIACwAAAAAEAAQAAAIZgARCBxIEMGBAwUTCjwQIABChQQZOlx4sCJDixglNmyoceNBhxs5cpT4EaTHkw 41qgw5MiTJjCVRBhgwICLLkANmDtRIsyfNhjUNVhxgQICBo0gNBB3os2eBAkshIhhAIKpUmgQDAgA7 ]]></ns4:content> </ns4:attachment> <ns4:attachment> <ns4:isInline>true</ns4:isInline> <ns4:contentId><![CDATA[<14A6D171E20D4FD8A20D0D17B6C984CF@example.com>]]></ns4:contentId> <ns4:fileName>company_logo.gif</ns4:fileName> <ns4:contentType>image/gif</ns4:contentType> <ns4:content><![CDATA[ R0lGODlhEAAQAPcAAP//////zP//mf//Zv//M///AP/M///MzP/Mmf/MZv/MM//MAP+Z//+ZzP+Zmf+ZZv+ZM/+ZAP9m//9mz P9mmf9mZv9mM/9mAP8z//8zzP8zmf8zZv8zM/8zAP8A//8AzP8Amf8AZv8AM/8AAMz//8z/zMz/mcz/Zsz/M8z/AMzM/8zMzM zMmczMZszMM8zMAMyZ/8yZzMyZmcyZZsyZM8yZAMxm/8xmzMxmmcxmZsxmM8xmAMwz/8wzzMwzmcwzZswzM8wzAMwA/8wAzMw AmcwAZswAM8wAAJn//5n/zJn/mZn/Zpn/M5n/AJnM/5nMzJnMmZnMZpnMM5nMAJmZ/5mZzJmZmZmZZpmZM5mZAJlm/5lmzJlm mZlmZplmM5lmAJkz/5kzzJkzmZkzZpkzM5kzAJkA/5kAzJkAmZkAZpkAM5kAAGb//2b/zGb/mWb/Zmb/M2b/AGbM/2bMzGbMm WbMZmbMM2bMAGaZ/2aZzGaZmWaZZmaZM2aZAGZm/2ZmzGZmmWZmZmZmM2ZmAGYz/2YzzGYzmWYzZmYzM2YzAGYA/2YAzGYAmW YAZmYAM2YAADP//zP/zDP/mTP/ZjP/MzP/ADPM/zPMzDPMmTPMZjPMMzPMADOZ/zOZzDOZmTOZZjOZMzOZADNm/zNmzDNmmTN mZjNmMzNmADMz/zMzzDMzmTMzZjMzMzMzADMA/zMAzDMAmTMAZjMAMzMAAAD//wD/zAD/mQD/ZgD/MwD/AADM/wDMzADMmQDM ZgDMMwDMAACZ/wCZzACZmQCZZgCZMwCZAABm/wBmzABmmQBmZgBmMwBmAAAz/wAzzAAzmQAzZgAzMwAzAAAA/wAAzAAAmQAAZ gAAMwAAAACfz1JSUv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAANoALAAAAAAQABAAAAh UALUJHEiwoEFt2RJmOyhQYTYAABwWfBjRIcWFAylC3LgRY0OOICMS1BhSZEaI2FKqhOgRYcmOI1GqTMky5kuTHwHMpInT5c2W JEO2RGhRIsOj2gICADs= ]]></ns4:content> </ns4:attachment> </attachments> <payload> <email> <date date='2015-12-26T19:00:00.000Z'/> <contents> <content> <ns3:type>text</ns3:type> <ns3:value>Attached is the laptop image for reference.</ns3:value> </content> <content> <ns3:type>html</ns3:type> <ns3:value><![CDATA[<HTML><HEAD></HEAD><BODY><P>Attached is the laptop image for reference.</P> <DIV><IMG src="cid:14A6D171E20D4FD8A20D0D17B6C984CF@example.com"></DIV></BODY></HTML>]]></ns3:value> </content> </contents> <emailAddresses> <from>jhenry@customer.com</from> <receiver>support@business.com</receiver> </emailAddresses> </email> </payload> </activity>
Response:
HTTP/1.1 201 Created
Response headers
Name | Value |
---|---|
X-egain-session | current session ID |
Content-Type | application/xml |
Location | /system/ws/v12/interaction/activity/2795 |
Request
Method | URL |
---|---|
POST | /ws/v12/interaction/activity |
Request headers :
Name | Value |
---|---|
X-egain-session | Valid session ID |
Content-Type | application/json |
Accept | application/json |
Accept-Language | en-US |
Request body:
{ "department": { "name": "service" }, "type": { "value": "email", "subtype": { "value": "general" } }, "subject": "laptop issue", "attachments": { "attachment": [ { "fileName": "laptop_issue.gif", "contentType": "image/gif", "content": "R0lGODlhEAAQAIMAAAAAAP///7Tt/wCfz3fg/5vo/7Tu/1JSUv///wAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFM i4wAwEBAAAh+QQBAAAIACwAAAAAEAAQAAAIZgARCBxIEMGBAwUTCjwQIABChQQZOlx4sCJDixglNmyoceNBhxs5cpT4EaTHkw 41qgw5MiTJjCVRBhgwICLLkANmDtRIsyfNhjUNVhxgQICBo0gNBB3os2eBAkshIhhAIKpUmgQDAgA7" }, { "isInline" : "true", "contentId": "<14A6D171E20D4FD8A20D0D17B6C984CF@example.com>", "fileName": "company_logo.gif", "contentType": "image/gif", "content": "R0lGODlhEAAQAPcAAP//////zP//mf//Zv//M///AP/M///MzP/Mmf/MZv/MM//MAP+Z//+ZzP+Zmf+ZZv+ZM/+ZAP9m//9mz P9mmf9mZv9mM/9mAP8z//8zzP8zmf8zZv8zM/8zAP8A//8AzP8Amf8AZv8AM/8AAMz//8z/zMz/mcz/Zsz/M8z/AMzM/8zMzM zMmczMZszMM8zMAMyZ/8yZzMyZmcyZZsyZM8yZAMxm/8xmzMxmmcxmZsxmM8xmAMwz/8wzzMwzmcwzZswzM8wzAMwA/8wAzMw AmcwAZswAM8wAAJn//5n/zJn/mZn/Zpn/M5n/AJnM/5nMzJnMmZnMZpnMM5nMAJmZ/5mZzJmZmZmZZpmZM5mZAJlm/5lmzJlm mZlmZplmM5lmAJkz/5kzzJkzmZkzZpkzM5kzAJkA/5kAzJkAmZkAZpkAM5kAAGb//2b/zGb/mWb/Zmb/M2b/AGbM/2bMzGbMm WbMZmbMM2bMAGaZ/2aZzGaZmWaZZmaZM2aZAGZm/2ZmzGZmmWZmZmZmM2ZmAGYz/2YzzGYzmWYzZmYzM2YzAGYA/2YAzGYAmW YAZmYAM2YAADP//zP/zDP/mTP/ZjP/MzP/ADPM/zPMzDPMmTPMZjPMMzPMADOZ/zOZzDOZmTOZZjOZMzOZADNm/zNmzDNmmTN mZjNmMzNmADMz/zMzzDMzmTMzZjMzMzMzADMA/zMAzDMAmTMAZjMAMzMAAAD//wD/zAD/mQD/ZgD/MwD/AADM/wDMzADMmQDM ZgDMMwDMAACZ/wCZzACZmQCZZgCZMwCZAABm/wBmzABmmQBmZgBmMwBmAAAz/wAzzAAzmQAzZgAzMwAzAAAA/wAAzAAAmQAAZ gAAMwAAAACfz1JSUv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAANoALAAAAAAQABAAAAh UALUJHEiwoEFt2RJmOyhQYTYAABwWfBjRIcWFAylC3LgRY0OOICMS1BhSZEaI2FKqhOgRYcmOI1GqTMky5kuTHwHMpInT5c2W JEO2RGhRIsOj2gICADs=" } ] }, "payload": { "email": { "date": { "date": "2015-12-26T19:00:00.000Z" }, "contents": { "content": [ { "type": "text", "value": "Attached is the laptop image for reference." }, { "type": "html", "value": "<HTML><HEAD><TITLE></TITLE></HEAD><BODY><P>Attached is the laptop image for reference.</P><DIV><IMG src=\"cid:14A6D171E20D4FD8A20D0D17B6C984CF@example.com\"></DIV></BODY></HTML>" } ] }, "emailAddresses": { "from": "jhenry@customer.com", "receiver": "support@business.com" } } } }
Response:
HTTP/1.1 201 Created
Response headers
Name | Value |
---|---|
X-egain-session | current session ID |
Content-Type | application/json |
Location | /system/ws/v12/interaction/activity/2795 |
Using Multipart/form-data, this example the following:
Note:
1. The 3rd body part has the Content-ID header with value 06FE0. This body part is being referred by the image <IMG src="cid:06FE0B5C60B94D0FA57450C77A18AB33@example.com"> in the "data" part using the B5C6 0B94D 0FA5 7450C 77A1 8AB33 @exa mple. comcid URL scheme. Hence, the 3rd body part will be treated as an inline attachment for this email.
2. Content-ID header is not present in the 4th body part. Hence, this part will be treated as a non-inline attachment.
Request
Method | URL |
---|---|
POST | /ws/v12/interaction/activity |
Request headers :
Name | Value |
---|---|
X-egain-session | Valid session ID |
Content-Type | multipart/form-data; boundary=----WebKitFormBoundaryLyRAYGiE5mFu3Ucv |
Accept | application/xml |
Accept-Language | en-US |
Request body:
------WebKitFormBoundaryLyRAYGiE5mFu3Ucv Content-Disposition: form-data; name="data" <?xml version="1.0" encoding="UTF-8"?> <activity xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity" xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/platform" xmlns:ns3="http://bindings.egain.com/ws/model/v12/gen/common" xmlns:ns4="http://bindings.egain.com/ws/model/v12/gen/interaction/attachment" > <department> <ns2:name>service</ns2:name> </department> <type> <value>email</value> <subtype> <ns3:value>general</ns3:value> </subtype> </type> <subject>laptop issue</subject> <payload> <email> <date date='2015-12-26T19:00:00.000Z'/> <contents> <content> <ns3:type>html</ns3:type> <ns3:value><![CDATA[<HTML><HEAD></HEAD><BODY><P>Attached laptop details for reference.</P> <DIV><IMG src="cid:06FE0B5C60B94D0FA57450C77A18AB33@example.com"></DIV></BODY></HTML>]]></ns3:value> </content> </contents> <emailAddresses> <from>jhenry@customer.com</from> <receiver>support@business.com</receiver> </emailAddresses> </email> </payload> </activity> ------WebKitFormBoundaryLyRAYGiE5mFu3Ucv Content-Disposition: form-data; name="data-type" application/xml ------WebKitFormBoundaryLyRAYGiE5mFu3Ucv Content-ID: <06FE0B5C60B94D0FA57450C77A18AB33@example.com> Content-Type: image/png; name="company_logo.png" Content-Transfer-Encoding: base64 R0lGODlhEAAQAIMAAAAAAP///7Tt/wCfz3fg/5vo/7Tu/1JSUv///wAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFM i4wAwEBAAAh+QQBAAAIACwAAAAAEAAQAAAIZgARCBxIEMGBAwUTCjwQIABChQQZOlx4sCJDixglNmyoceNBhxs5cpT4EaTHkw 41qgw5MiTJjCVRBhgwICLLkANmDtRIsyfNhjUNVhxgQICBo0gNBB3os2eBAkshIhhAIKpUmgQDAgA7 ------WebKitFormBoundaryLyRAYGiE5mFu3Ucv Content-Disposition: form-data; name="laptop_details"; filename="laptop_details.txt" Content-Type: text/plain System Dell Latitude E5400 Laptop Mobile Intel GS45 Express chipset Processor Type: Intel Core 2 Duo P8600 ------WebKitFormBoundaryLyRAYGiE5mFu3Ucv--
Response:
HTTP/1.1 201 Created
Response headers
Name | Value |
---|---|
X-egain-session | Current session ID |
Content-Type | application/xml |
Location | /system/ws/v12/interaction/activity/2800 |
Request
Method | URL |
---|---|
POST | /ws/v12/interaction/activity |
Request headers :
Name | Value |
---|---|
X-egain-session | Valid session ID |
Content-Type | multipart/form-data; boundary=----WebKitFormBoundaryLyRAYGiE5mFu3Ucv |
Accept | application/json |
Accept-Language | en-US |
Request body:
------WebKitFormBoundaryLyRAYGiE5mFu3Ucv Content-Disposition: form-data; name="data" { "department": { "name": "service" }, "type": { "value": "email", "subtype": { "value": "general" } }, "subject": "laptop issue", "payload": { "email": { "date": { "date": "2015-12-26T19:00:00.000Z" }, "contents": { "content": [ { "type": "html", "value": "<HTML><HEAD></HEAD><BODY><P>Attached laptop details for reference.</P><DIV><IMG src=\"cid:06FE0B5C60B94D0FA57450C77A18AB33@example.com\"></DIV></BODY></HTML>" } ] }, "emailAddresses": { "from": "jhenry@customer.com", "receiver": "support@business.com" } } } } ------WebKitFormBoundaryLyRAYGiE5mFu3Ucv Content-Disposition: form-data; name="data-type" application/json ------WebKitFormBoundaryLyRAYGiE5mFu3Ucv Content-Type: image/png; name="company_logo.png" Content-Transfer-Encoding: base64 Content-ID: <06FE0B5C60B94D0FA57450C77A18AB33@example.com> R0lGODlhEAAQAIMAAAAAAP///7Tt/wCfz3fg/5vo/7Tu/1JSUv///wAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFM i4wAwEBAAAh+QQBAAAIACwAAAAAEAAQAAAIZgARCBxIEMGBAwUTCjwQIABChQQZOlx4sCJDixglNmyoceNBhxs5cpT4EaTHkw 41qgw5MiTJjCVRBhgwICLLkANmDtRIsyfNhjUNVhxgQICBo0gNBB3os2eBAkshIhhAIKpUmgQDAgA7 ------WebKitFormBoundaryLyRAYGiE5mFu3Ucv Content-Disposition: form-data; name="laptop_details"; filename="laptop_details.txt" Content-Type: text/plain System Dell Latitude E5400 Laptop Mobile Intel GS45 Express chipset Processor Type: Intel Core 2 Duo P8600 ------WebKitFormBoundaryLyRAYGiE5mFu3Ucv--
Response:
HTTP/1.1 201 Created
Response headers
Name | Value |
---|---|
X-egain-session | Current session ID |
Content-Type | application/json |
Location | /system/ws/v12/interaction/activity/2800 |
Using XML/JSON as content-type, this example demonstrates the following:
Request
Method | URL |
---|---|
POST | /ws/v12/interaction/activity |
Request headers
Name | Value |
---|---|
X-egain-session | Valid session ID |
Accept | application/xml |
Content-Type | application/xml |
Accept-Language | en-US |
Request body:
<?xml version="1.0" encoding="UTF-8"?> <activity xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity" xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/platform" xmlns:ns3="http://bindings.egain.com/ws/model/v12/gen/common" xmlns:ns4="http://bindings.egain.com/ws/model/v12/gen/interaction/attachment" xmlns:ns5="http://bindings.egain.com/ws/model/v12/gen/interaction/customer" xmlns:ns6="http://bindings.egain.com/ws/model/v12/gen/interaction/contactperson" xmlns:ns7="http://bindings.egain.com/ws/model/v12/gen/interaction/contactpoint"> <department> <ns2:name>service</ns2:name> </department> <type> <value>email</value> <subtype> <ns3:value>general</ns3:value> </subtype> </type> <case id = '1060'/> <isSecure>true</isSecure> <subject>laptop issue</subject> <payload> <email> <date date='2015-12-26T19:00:00.000Z'/> <contents> <content> <ns3:type>html</ns3:type> <ns3:value> <![CDATA[<HTML><HEAD></HEAD><BODY><DIV>hi my new laptop is having display issues.</DIV></BODY></HTML>]]> </ns3:value> </content> </contents> <emailAddresses> <from>jhenry@customer.com</from> <to> <address>support@business.com</address> </to> <cc> <address>support_staff@business.com</address> </cc> <receiver>support@business.com</receiver> </emailAddresses> </email> </payload> <customer> <ns5:type> <ns5:value>group</ns5:value> <ns5:group> <ns5:type> <ns3:value>Association</ns3:value> </ns5:type> <ns5:region>Europe</ns5:region> <ns5:numberOfMembers>12</ns5:numberOfMembers> <ns5:income>$90,000</ns5:income> <ns5:currency>USD</ns5:currency> <ns5:registrationNumber>K56743</ns5:registrationNumber> <ns5:affiliation>FCMA</ns5:affiliation> </ns5:group> </ns5:type> <ns5:customerName>Unichem Laboratories Limited</ns5:customerName> <ns5:pin>25345</ns5:pin> <ns5:level> <ns3:value>Premium</ns3:value> </ns5:level> <ns5:role> <ns3:value>Partner</ns3:value> </ns5:role> <ns5:pin>0121</ns5:pin> <ns5:howReferred> <ns3:value>Customer</ns3:value> </ns5:howReferred> <ns5:industry> <ns3:value>Health care</ns3:value> </ns5:industry> <ns5:marketSegment>Medical Products</ns5:marketSegment> <ns5:entitlements>Free service</ns5:entitlements> <ns5:contactPersons> <ns6:contactPerson> <ns6:salutation>Mr.</ns6:salutation> <ns6:firstName>Kriag</ns6:firstName> <ns6:middleName>Goldman</ns6:middleName> <ns6:lastName>Francis</ns6:lastName> <ns6:loginId>kriag</ns6:loginId> <ns6:gender> <ns3:value>Male</ns3:value> </ns6:gender> <ns6:identification> <ns6:type>SSN</ns6:type> <ns6:value>111-22-8765</ns6:value> </ns6:identification> <ns6:suffix> <ns3:value>I</ns3:value> </ns6:suffix> <ns6:initials>A.</ns6:initials> <ns6:secretQuestion>Place of Birth</ns6:secretQuestion> <ns6:secretAnswer>Sunnyvale</ns6:secretAnswer> <ns6:hasDirectMailingConsent>true</ns6:hasDirectMailingConsent> <ns6:hasDirectCallingConsent>true</ns6:hasDirectCallingConsent> <ns6:hasHoldingDataConsent>true</ns6:hasHoldingDataConsent> <ns6:jobTitle>Assistant</ns6:jobTitle> <ns6:employmentStatus> <ns3:value>Intern</ns3:value> </ns6:employmentStatus> <ns6:priority>High</ns6:priority> <ns6:dateOfBirth>1965-12-09T00:00:00.000Z</ns6:dateOfBirth> <ns6:maritalStatus> <ns3:value>Married</ns3:value> </ns6:maritalStatus> <ns6:type> <ns3:value>Legal</ns3:value> </ns6:type> <ns6:firstNameFurigana>Kriag</ns6:firstNameFurigana> <ns6:middleNameFurigana>Goldman</ns6:middleNameFurigana> <ns6:lastNameFurigana>Francis</ns6:lastNameFurigana> <ns6:startGreeting>Hey, Welcome</ns6:startGreeting> <ns6:endGreeting>Have a Nice Day!</ns6:endGreeting> <ns6:spouseName>Kethel</ns6:spouseName> <ns6:emergencyContact>0987654321</ns6:emergencyContact> <ns6:occupation>Medical Assistance</ns6:occupation> <ns6:incomeLevel>40000-50000</ns6:incomeLevel> <ns6:educationLevel> <ns3:value>Graduate</ns3:value> </ns6:educationLevel> <ns6:race>African</ns6:race> <ns6:dependents>4</ns6:dependents> <ns6:isSmoker>true</ns6:isSmoker> <ns6:hobbies>Farming</ns6:hobbies> <ns6:interests>Painting</ns6:interests> <ns6:contactOrder>1985</ns6:contactOrder> <ns6:contactPoints> <ns7:contactPoint> <ns7:type> <ns7:value>postal</ns7:value> <ns7:postal> <ns7:type> <ns3:value>Office address</ns3:value> </ns7:type> <ns7:address_1>345</ns7:address_1> <ns7:address_2>E Midfield Rd</ns7:address_2> <ns7:city>Mountain View</ns7:city> <ns7:state>Ca</ns7:state> <ns7:zip>98704</ns7:zip> <ns7:country>USA</ns7:country> <ns7:region>United States</ns7:region> </ns7:postal> </ns7:type> <ns7:priority> <ns3:value>Low</ns3:value> </ns7:priority> </ns7:contactPoint> </ns6:contactPoints> </ns6:contactPerson> </ns5:contactPersons> </customer> <customAttributes> <ns3:customAttribute> <ns3:attribName>laptop_identification_no</ns3:attribName> <ns3:attribValues> <ns3:attribValue> <ns3:value>CE1222212GKAHDHFUJUUUEMMJDJ27SDJD</ns3:value> </ns3:attribValue> </ns3:attribValues> </ns3:customAttribute> <ns3:customAttribute> <ns3:attribName>previousattempts</ns3:attribName> <ns3:attribValues> <ns3:attribValue> <ns3:value>2</ns3:value> </ns3:attribValue> </ns3:attribValues> </ns3:customAttribute> <ns3:customAttribute> <ns3:attribName>domain</ns3:attribName> <ns3:attribValues> <ns3:attribValue> <ns3:value>laptop</ns3:value> </ns3:attribValue> <ns3:attribValue> <ns3:value>display</ns3:value> </ns3:attribValue> </ns3:attribValues> </ns3:customAttribute> </customAttributes> </activity>
Response:
HTTP/1.1 201 Created
Response headers
Name | Value |
---|---|
X-egain-session | current session ID |
Content-Type | application/xml |
Location | /system/ws/v12/interaction/activity/2795 |
Request
Method | URL |
---|---|
POST | /ws/v12/interaction/activity |
Request headers :
Name | Value |
---|---|
X-egain-session | Valid session ID |
Content-Type | application/json |
Accept | application/json |
Accept-Language | en-US |
Request body:
{ "department": { "name": "service" }, "type": { "value": "email", "subtype": { "value": "general" } }, "case": { "id": "1060" }, "isSecure": "true", "subject": "Laptop Issue", "payload": { "email": { "date": { "date": "2015-12-26T19:00:00.000Z" }, "contents": { "content": [ { "type": "html", "value": "<HTML><HEAD></HEAD><BODY><DIV>hi my new laptop is having display issues.</DIV></BODY></HTML>" } ] }, "emailAddresses": { "from": "jhenry@customer.com", "to": { "address": [ "support@business.com" ] }, "cc": { "address": [ "support_staff@business.com" ] }, "receiver": "support@business.com" } } }, "customer": { "type": { "value": "group", "group": { "type": { "value": "Association" }, "region": "Europe", "numberOfMembers": "12", "income": "1000000", "currency": "USD", "registrationNumber": "324", "affiliation": "FCMA" } }, "customerName": "Unichem Laboratories Limited", "level": { "value": "Platinum" }, "role": { "value": "Partner" }, "pin": "0121", "howReferred": { "value": "Customer" }, "industry": { "value": "Health care" }, "marketSegment": "Medical Products", "entitlements": "Free service", "contactPersons": { "contactPerson": [ { "salutation": "Mr.", "firstName": "Kriag", "middleName": "Goldman", "lastName": "Francis", "loginId": "kfrancis", "gender": { "value": "Male" }, "identification": { "type": "SSN", "value": "111-22-8765" }, "suffix": { "value": "Jr." }, "initials": "A.", "secretQuestion": "Place of Birth", "secretAnswer": "Sunnyvale", "hasDirectMailingConsent": "true", "hasDirectCallingConsent": "true", "hasHoldingDataConsent": "true", "jobTitle": "Manager", "employmentStatus": { "value": "Intern" }, "priority": "High", "dateOfBirth": "1965-12-09T00:00:00.000Z", "maritalStatus": { "value": "Married" }, "type": { "value": "Billing" }, "firstNameFurigana": "Kriag", "middleNameFurigana": "Goldman", "lastNameFurigana": "Francis", "startGreeting": "Hello", "endGreeting": "Byee", "spouseName": "Sara", "emergencyContact": "998-765-4321", "occupation": "Branch Manager", "incomeLevel": "40000-50000", "educationLevel": { "value": "Graduate" }, "race": "African", "dependents": "4", "isSmoker": "true", "hobbies": "Farming", "interests": "Painting", "contactOrder": "1984", "contactPoints": { "contactPoint": [ { "type": { "value": "postal", "postal": { "type": { "value": "Office address" }, "address_1": "345", "address_2": "E Midfield Rd", "city": "Mountain View", "state": "Ca", "zip": "98704", "country": "USA", "region": "United States" } }, "priority": { "value": "Low" } } ] } } ] } }, "customAttributes": { "customAttribute": [ { "attribName": "laptop_identification_no", "attribValues": { "attribValue": [ { "value": "CE1222212GKAHDHFUJUUUEMMJDJ27SDJD" } ] } }, { "attribName": "previousattempts", "attribValues": { "attribValue": [ { "value": "2" } ] } }, { "attribName": "domain", "attribValues": { "attribValue": [ { "value": "laptop" }, { "value": "display" } ] } } ] } }
Response:
HTTP/1.1 201 Created
Response headers
Name | Value |
---|---|
X-egain-session | current session ID |
Content-Type | application/json |
Location | /system/ws/v12/interaction/activity/2795 |
Using multipart/form-data as content-type, this example demonstrates the following:
Request
Method | URL |
---|---|
POST | /ws/v12/interaction/activity |
Request headers :
Name | Value |
---|---|
X-egain-session | Valid session ID |
Content-Type | multipart/form-data; boundary=----WebKitFormBoundaryAXn851qjukQsnRxT |
Accept | application/xml |
Accept-Language | en-US |
Request body:
------WebKitFormBoundaryAXn851qjukQsnRxT Content-Disposition: form-data; name="data" <?xml version="1.0" encoding="UTF-8"?> <activity xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity" xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/platform" xmlns:ns3="http://bindings.egain.com/ws/model/v12/gen/common" xmlns:ns4="http://bindings.egain.com/ws/model/v12/gen/interaction/attachment" xmlns:ns5="http://bindings.egain.com/ws/model/v12/gen/interaction/customer" xmlns:ns6="http://bindings.egain.com/ws/model/v12/gen/interaction/contactperson" xmlns:ns7="http://bindings.egain.com/ws/model/v12/gen/interaction/contactpoint"> <department> <ns2:name>service</ns2:name> </department> <type> <value>email</value> <subtype> <ns3:value>general</ns3:value> </subtype> </type> <subject>laptop issue</subject> <payload> <email> <date date='2015-12-26T19:00:00.000Z'/> <contents> <content> <ns3:type>text</ns3:type> <ns3:value>hi my new laptop is having display issues.</ns3:value> </content> <content> <ns3:type>html</ns3:type> <ns3:value><![CDATA[<HTML><HEAD></HEAD><BODY><P>hi my new laptop is having display issues. <BR></P> </BODY></HTML>]]></ns3:value> </content> </contents> <emailAddresses> <from>jhenry@customer.com</from> <to> <address>support@business.com</address> </to> <cc> <address>support_staff@business.com</address> </cc> <receiver>support@business.com</receiver> </emailAddresses> </email> </payload> <customer> <ns5:type> <ns5:value>group</ns5:value> <ns5:group> <ns5:type> <ns3:value>Association</ns3:value> </ns5:type> <ns5:region>Europe</ns5:region> <ns5:numberOfMembers>12</ns5:numberOfMembers> <ns5:income>$90,000</ns5:income> <ns5:currency>USD</ns5:currency> <ns5:registrationNumber>K56743</ns5:registrationNumber> <ns5:affiliation>FCMA</ns5:affiliation> </ns5:group> </ns5:type> <ns5:customerName>Unichem Laboratories Limited</ns5:customerName> <ns5:pin>25345</ns5:pin> <ns5:level> <ns3:value>Premium</ns3:value> </ns5:level> <ns5:role> <ns3:value>Partner</ns3:value> </ns5:role> <ns5:pin>0121</ns5:pin> <ns5:howReferred> <ns3:value>Customer</ns3:value> </ns5:howReferred> <ns5:industry> <ns3:value>Health care</ns3:value> </ns5:industry> <ns5:marketSegment>Medical Products</ns5:marketSegment> <ns5:entitlements>Free service</ns5:entitlements> <ns5:contactPersons> <ns6:contactPerson> <ns6:salutation>Mr.</ns6:salutation> <ns6:firstName>Kriag</ns6:firstName> <ns6:middleName>Goldman</ns6:middleName> <ns6:lastName>Francis</ns6:lastName> <ns6:loginId>kriag</ns6:loginId> <ns6:gender> <ns3:value>Male</ns3:value> </ns6:gender> <ns6:identification> <ns6:type>SSN</ns6:type> <ns6:value>111-22-8765</ns6:value> </ns6:identification> <ns6:suffix> <ns3:value>I</ns3:value> </ns6:suffix> <ns6:initials>A.</ns6:initials> <ns6:secretQuestion>Place of Birth</ns6:secretQuestion> <ns6:secretAnswer>Sunnyvale</ns6:secretAnswer> <ns6:hasDirectMailingConsent>true</ns6:hasDirectMailingConsent> <ns6:hasDirectCallingConsent>true</ns6:hasDirectCallingConsent> <ns6:hasHoldingDataConsent>true</ns6:hasHoldingDataConsent> <ns6:jobTitle>Assistant</ns6:jobTitle> <ns6:employmentStatus> <ns3:value>Intern</ns3:value> </ns6:employmentStatus> <ns6:priority>High</ns6:priority> <ns6:dateOfBirth>1965-12-09T00:00:00.000Z</ns6:dateOfBirth> <ns6:maritalStatus> <ns3:value>Married</ns3:value> </ns6:maritalStatus> <ns6:type> <ns3:value>Legal</ns3:value> </ns6:type> <ns6:firstNameFurigana>Kriag</ns6:firstNameFurigana> <ns6:middleNameFurigana>Goldman</ns6:middleNameFurigana> <ns6:lastNameFurigana>Francis</ns6:lastNameFurigana> <ns6:startGreeting>Hey, Welcome</ns6:startGreeting> <ns6:endGreeting>Have a Nice Day!</ns6:endGreeting> <ns6:spouseName>Kethel</ns6:spouseName> <ns6:emergencyContact>0987654321</ns6:emergencyContact> <ns6:occupation>Medical Assistance</ns6:occupation> <ns6:incomeLevel>40000-50000</ns6:incomeLevel> <ns6:educationLevel> <ns3:value>Graduate</ns3:value> </ns6:educationLevel> <ns6:race>African</ns6:race> <ns6:dependents>4</ns6:dependents> <ns6:isSmoker>true</ns6:isSmoker> <ns6:hobbies>Farming</ns6:hobbies> <ns6:interests>Painting</ns6:interests> <ns6:contactOrder>1985</ns6:contactOrder> <ns6:contactPoints> <ns7:contactPoint> <ns7:type> <ns7:value>postal</ns7:value> <ns7:postal> <ns7:type> <ns3:value>Office address</ns3:value> </ns7:type> <ns7:address_1>345</ns7:address_1> <ns7:address_2>E Midfield Rd</ns7:address_2> <ns7:city>Mountain View</ns7:city> <ns7:state>Ca</ns7:state> <ns7:zip>98704</ns7:zip> <ns7:country>USA</ns7:country> <ns7:region>United States</ns7:region> </ns7:postal> </ns7:type> <ns7:priority> <ns3:value>Low</ns3:value> </ns7:priority> </ns7:contactPoint> </ns6:contactPoints> </ns6:contactPerson> </ns5:contactPersons> </customer> <customAttributes> <ns3:customAttribute> <ns3:attribName>laptop_identification_no</ns3:attribName> <ns3:attribValues> <ns3:attribValue> <ns3:value>CE1222212GKAHDHFUJUUUEMMJDJ27SDJD</ns3:value> </ns3:attribValue> </ns3:attribValues> </ns3:customAttribute> <ns3:customAttribute> <ns3:attribName>previousattempts</ns3:attribName> <ns3:attribValues> <ns3:attribValue> <ns3:value>2</ns3:value> </ns3:attribValue> </ns3:attribValues> </ns3:customAttribute> <ns3:customAttribute> <ns3:attribName>domain</ns3:attribName> <ns3:attribValues> <ns3:attribValue> <ns3:value>laptop</ns3:value> </ns3:attribValue> <ns3:attribValue> <ns3:value>display</ns3:value> </ns3:attribValue> </ns3:attribValues> </ns3:customAttribute> </customAttributes> </activity> ------WebKitFormBoundaryAXn851qjukQsnRxT Content-Disposition: form-data; name="data-type" application/xml ------WebKitFormBoundaryAXn851qjukQsnRxT--
Response:
HTTP/1.1 201 Created
Response headers
Name | Value |
---|---|
X-egain-session | Current session ID |
Content-Type | application/xml |
Location | /system/ws/v12/interaction/activity/2800 |
Request
Method | URL |
---|---|
POST | /ws/v12/interaction/activity |
Request headers :
Name | Value |
---|---|
X-egain-session | Valid session ID |
Content-Type | multipart/form-data; boundary=----WebKitFormBoundaryAXn851qjukQsnRxT |
Accept | application/json |
Accept-Language | en-US |
Request body:
------WebKitFormBoundaryAXn851qjukQsnRxT Content-Disposition: form-data; name="data" { "department": { "name": "service" }, "type": { "value": "email", "subtype": { "value": "general" } }, "subject": "laptop issue", "payload": { "email": { "date": { "date": "2015-12-26T19:00:00.000Z" }, "contents": { "content": [ { "type": "text", "value": "hi my new laptop is having display issues." }, { "type": "html", "value": "<HTML><HEAD></HEAD><BODY><P>hi my new laptop is having display issues.<BR></P></BODY></HTML>" } ] }, "emailAddresses": { "from": "jhenry@customer.com", "to": { "address": [ "support@business.com" ] }, "cc": { "address": [ "support_staff@business.com" ] }, "receiver": "support@business.com" } } }, "customer": { "type": { "value": "group", "group": { "type": { "value": "Association" }, "region": "Europe", "numberOfMembers": "12", "income": "1000000", "currency": "USD", "registrationNumber": "324", "affiliation": "FCMA" } }, "customerName": "Unichem Laboratories Limited", "level": { "value": "Platinum" }, "role": { "value": "Partner" }, "pin": "0121", "howReferred": { "value": "Customer" }, "industry": { "value": "Health care" }, "marketSegment": "Medical Products", "entitlements": "Free service", "contactPersons": { "contactPerson": [ { "salutation": "Mr.", "firstName": "Kriag", "middleName": "Goldman", "lastName": "Francis", "loginId": "kfrancis", "gender": { "value": "Male" }, "identification": { "type": "SSN", "value": "111-22-8765" }, "suffix": { "value": "Jr." }, "initials": "A.", "secretQuestion": "Place of Birth", "secretAnswer": "Sunnyvale", "hasDirectMailingConsent": "true", "hasDirectCallingConsent": "true", "hasHoldingDataConsent": "true", "jobTitle": "Manager", "employmentStatus": { "value": "Intern" }, "priority": "High", "dateOfBirth": "1965-12-09T00:00:00.000Z", "maritalStatus": { "value": "Married" }, "type": { "value": "Billing" }, "firstNameFurigana": "Kriag", "middleNameFurigana": "Goldman", "lastNameFurigana": "Francis", "startGreeting": "Hello", "endGreeting": "Byee", "spouseName": "Sara", "emergencyContact": "998-765-4321", "occupation": "Branch Manager", "incomeLevel": "40000-50000", "educationLevel": { "value": "Graduate" }, "race": "African", "dependents": "4", "isSmoker": "true", "hobbies": "Farming", "interests": "Painting", "contactOrder": "1984", "contactPoints": { "contactPoint": [ { "type": { "value": "postal", "postal": { "type": { "value": "Office address" }, "address_1": "345", "address_2": "E Midfield Rd", "city": "Mountain View", "state": "Ca", "zip": "98704", "country": "USA", "region": "United States" } }, "priority": { "value": "Low" } } ] } } ] } }, "customAttributes": { "customAttribute": [ { "attribName": "laptop_identification_no", "attribValues": { "attribValue": [ { "value": "CE1222212GKAHDHFUJUUUEMMJDJ27SDJD" } ] } }, { "attribName": "previousattempts", "attribValues": { "attribValue": [ { "value": "2" } ] } }, { "attribName": "domain", "attribValues": { "attribValue": [ { "value": "laptop" }, { "value": "display" } ] } } ] } } ------WebKitFormBoundaryAXn851qjukQsnRxT Content-Disposition: form-data; name="data-type" application/json ------WebKitFormBoundaryAXn851qjukQsnRxT--
Response:
HTTP/1.1 201 Created
Response headers
Name | Value |
---|---|
X-egain-session | Current session ID |
Content-Type | application/json |
Location | /system/ws/v12/interaction/activity/2800 |