All Classes Pages
CreateCallTrackActivityExamples Class Reference

More...

Detailed Description

Examples for Create CallTrack Activity

Example 1 - Create activity for a new case

This example demonstrates the following:

  • Creating a calltrack activity for a new case.
  • Using Email address as contactPointData in addition to the required elements.
  • Assigning the created activity to the logged in user.

XML

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

<activity xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity" 
		xmlns:ns1="http://bindings.egain.com/ws/model/v12/gen/platform" 
		xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/common">	 
	<department>
		<ns1:name>Service</ns1:name>
	</department>     
	<type>
		<value>call_track</value>
		<subtype>
			<ns2:value>General</ns2:value>
		</subtype>
	</type>
  	<mode>
		<ns2:value>Inbound</ns2:value>
	</mode>
  	<contactPointData>paul.dermick@customer.com</contactPointData>
	<subject>Summary of Phone call</subject>
</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/1022

     


JSON

Request

Method URL
POST /ws/v12/interaction/activity

Request headers

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

Request body

{
    "department": {
        "name": "Service"
    },
    "type": {
        "value": "call_track",
        "subtype": {
            "value": "General"
        }
    },
    "mode": {
        "value": "Inbound"
    },
    "contactPointData": "paul.dermick@customer.com",
    "subject": "Summary of Phone call"
}

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/1023

     



Example 2 - Create activity for an existing case

This example demonstrates the following: with the following:

  • Creating a calltrack activity for an existing case.
  • Using phone number as contactPointData in addition to the required elements.
  • Assigning the created activity to a different user. The created activity will be assigned to the user with value of login ID specified through 'status.assigned.user.name'.

XML

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

<activity xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity" 
		xmlns:ns1="http://bindings.egain.com/ws/model/v12/gen/platform" 
		xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/common" 
        xmlns:ns3="http://bindings.egain.com/ws/model/v12/gen/interaction/attachment">	 
	<department>
		<ns1:name>Service</ns1:name>
	</department> 
  	<type>
		<value>call_track</value>
		<subtype>
			<ns2:value>General</ns2:value>
		</subtype>
	</type>
	<mode>
		<ns2:value>Inbound</ns2:value>
	</mode>    
  	<contactPointData>987654321</contactPointData>
	<case id ="1026"/>
	<subject>Summary of Phone call</subject>
	<status>
         <assigned>
           <user>
             <ns1:name>agent1</ns1:name> 
           </user>
         </assigned>
      </status>
</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/1024

     


JSON

Request

Method URL
POST /ws/v12/interaction/activity

Request headers

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

Request body

{
    "department": {
        "name": "Service"
    },
    "type": {
        "value": "call_track",
        "subtype": {
            "value": "General"
        }
    },
    "mode": {
        "value": "Inbound"
    },
    "contactPointData": "987654321",
    "case": {
        "id": "1026"
    },
    "subject": "Summary of Phone call",
    "status": {
        "assigned": {
            "user": {
                "name": "agent1"
            }
        }
    }
}

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/1025

     



Example 3 - Create activity with contact person as customer identifier

This example demonstrates the following:

  • Creating a calltrack activity for a new case.
  • Using required elements, custom attributes, subject, and content for activity creation.
  • Using contact person ID as customer identifier.
  • Using a custom attribute as assigned user identifier. In this example, the custom attribute used is 'acd_extension'.

Request

Method URL
POST /ws/v12/interaction/activity

XML

Request headers

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

Request body

<activity xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity" 
		xmlns:ns1="http://bindings.egain.com/ws/model/v12/gen/platform" 
		xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/common"
		xmlns:ns3="http://bindings.egain.com/ws/model/v12/gen/interaction/customer" 
		xmlns:ns4="http://bindings.egain.com/ws/model/v12/gen/interaction/contactperson">	 
	<department>
		<ns1:name>Service</ns1:name>
	</department> 
	<mode>
		<ns2:value>Inbound</ns2:value>
	</mode>    
	<type>
		<value>call_track</value>
		<subtype>
			<ns2:value>General</ns2:value>
		</subtype>
	</type>
	<customer>
		<ns3:contactPersons>
			<ns4:contactPerson id="1008">
			</ns4:contactPerson>
		</ns3:contactPersons>
	</customer>
	<subject>Issue in delivered product</subject>
	<status>
		<assigned>
			<user>
				<ns1:customAttributes>
					<ns2:customAttribute>
					<ns2:attribName>acd_extension</ns2:attribName>
					<ns2:attribValues>
						<ns2:attribValue>
							<ns2:value>3476</ns2:value>
						</ns2:attribValue>
					</ns2:attribValues>
				</ns2:customAttribute>
             </ns1:customAttributes>  
           </user>
		</assigned>
     </status>
	  <customAttributes>
		<ns2:customAttribute>
			<ns2:attribName>preferredlang</ns2:attribName>
			<ns2:attribValues>
				<ns2:attribValue>
					<ns2:value>French</ns2:value>
				</ns2:attribValue>
			</ns2:attribValues>
		</ns2:customAttribute>
	</customAttributes>
	<payload>
		<calltrack>
			<contents>
				<content>
					<ns2:type>html</ns2:type>
					<ns2:value><![CDATA[<HTML><HEAD><TITLE></TITLE></HEAD><body><P>Hello...terminator. <BR> <BR> <BR>  Shared information on redeeming points of a rewards card</P></body></HTML>]]></ns2:value>
				</content>
			</contents>
		</calltrack>
	</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/1026

     


JSON

Request headers

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

Request body

{
    "department": {
        "name": "Service"
    },
    "type": {
        "value": "call_track",
        "subtype": {
            "value": "General"
        }
    },
    "mode": {
        "value": "Inbound"
    },
    "customer": {
        "contactPersons": {
            "contactPerson": [
                {
                    "id": "1008"
                }
            ]
        }
    },
    "subject": "Issue in delivered product",
   "status": {
        "assigned": {
            "user": {
                "customAttributes": {
                    "customAttribute": [
                        {
                            "attribName": "acd_extension",
                            "attribValues": {
                                "attribValue": [
                                    {
                                        "value": "3476"
                                    }
                                ]
                            }
                        }
                    ]
                }
            }
        }
    },
    "customAttributes": {
        "customAttribute": [
            {
                "attribName": "preferredlang",
                "attribValues": {
                    "attribValue": [
                        {
                            "value": "French"
                        }
                    ]
                }
            }
        ]
    },
    "payload": {
        "calltrack": {
            "contents": {
                "content": [
                    {
                        "type": "html",
                        "value": "<HTML><HEAD><TITLE></TITLE></HEAD><body> <P>Hello...terminator. <BR> <BR> <BR>  Shared information on redeeming points of a rewards card</P></body></HTML>"
                    }
                ]
            }
        }
    }
}

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/1027

     



Example 4 - Create activity with contact point as customer identifier

This example demonstrates the following:

  • Creating an outbound calltrack activity for an existing case.
  • Using only required elements for activity creation.
  • Using contact point ID as customer identifier.
  • Assigning the created activity to the logged in user.

XML

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

<activity xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity" 
		xmlns:ns1="http://bindings.egain.com/ws/model/v12/gen/platform" 
		xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/common"
		xmlns:ns3="http://bindings.egain.com/ws/model/v12/gen/interaction/customer" 
		xmlns:ns4="http://bindings.egain.com/ws/model/v12/gen/interaction/contactperson"
		xmlns:ns5="http://bindings.egain.com/ws/model/v12/gen/interaction/contactpoint"
		xmlns:ns6="http://bindings.egain.com/ws/model/v12/gen/interaction/attachment">	 
	<department>
		<ns1:name>Service</ns1:name>
	</department> 
	<type>
		<value>call_track</value>
		<subtype>
			<ns2:value>General</ns2:value>
		</subtype>
	</type>
	<mode>
		<ns2:value>Outbound</ns2:value>
	</mode>    
	<customer>
		<ns3:contactPersons>
			<ns4:contactPerson>
				<ns4:contactPoints>
					<ns5:contactPoint id="1030">
					</ns5:contactPoint>
				</ns4:contactPoints>
			</ns4:contactPerson>
		</ns3:contactPersons>
	</customer>
	<case id="1016"/>
	<subject>Summary of Phone call</subject>
</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/1028

     


JSON

Request

Method URL
POST /ws/v12/interaction/activity

Request headers

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

Request body

{
    "department": {
        "name": "Service"
    },
    "type": {
        "value": "call_track",
        "subtype": {
            "value": "General"
        }
    },
    "mode": {
        "value": "Outbound"
    },
    "customer": {
        "contactPersons": {
            "contactPerson": [
                {
                  "contactPoints": {
                    "contactPoint":[
                      {
                        "id":"1030"
                      }
                    ]
                  }
                }
            ]
        }
    },
    "case": {
        "id": "1016"
    },
    "subject": "Summary of Phone call"
}

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/1029

     



Example 5 - Create activity for another user with anonymous customer

This example demonstrates the following:

  • Creating a calltrack activity for a new case.
  • Using only required elements for activity creation
  • Creating the activity for an anonymous customer.
  • Assigning the created activity to a different user. The created activity will be assigned to the user with value of login ID specified through 'status.assigned.user.name'.

XML

Request

Method URL
POST /ws/v12/interaction/activity?anonymousCustomer=yes

Request headers

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

Request body

<activity
    xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity"
    xmlns:ns1="http://bindings.egain.com/ws/model/v12/gen/platform"
    xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/common" >
    <department>
        <ns1:name>Service</ns1:name>
    </department>
    <mode>
        <ns2:value>Inbound</ns2:value>
    </mode>
    <type>
        <value>call_track</value>
        <subtype>
            <ns2:value>General</ns2:value>
        </subtype>
    </type>
    <subject>Summary of Phone call</subject>
    <status>
        <assigned>
            <user>
                <ns1:name>agent1</ns1:name>
            </user>
        </assigned>
    </status>
</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/1030

     


JSON

Request

Method URL
POST /ws/v12/interaction/activity?anonymousCustomer=yes

Request headers

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

Request body

{
    "department": {
        "name": "Service"
    },
    "type": {
        "value": "call_track",
        "subtype": {
            "value": "General"
        }
    },
    "mode": {
        "value": "Inbound"
    },
    "subject": "Summary of Phone call",
    "status": {
        "assigned": {
            "user": {
                "name": "agent1"
            }
        }
    }
}

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/1031

     



Example 6 - Create activity with anonymous customer

This example demonstrates the following:

  • Creating a calltrack activity for a new case.
  • Using only required elements for activity creation.
  • Creating the activity for an anonymous customer
  • Capturing the customer email address of the customer through 'contactPointData'.
  • Assigning the created activity to the logged in user.

XML

Request

Method URL
POST /ws/v12/interaction/activity?anonymousCustomer=yes

Request headers

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

Request body

<activity xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity" 
		xmlns:ns1="http://bindings.egain.com/ws/model/v12/gen/platform" 
		xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/common"
        xmlns:ns4="http://bindings.egain.com/ws/model/v12/gen/interaction/attachment">	 
	<department>
		<ns1:name>Service</ns1:name>
	</department> 
	<mode>
		<ns2:value>Inbound</ns2:value>
	</mode>    
	<type>
		<value>call_track</value>
		<subtype>
			<ns2:value>General</ns2:value>
		</subtype>
	</type>
	<subject>Summary of Phone call</subject>
    <contactPointData>paul.dermick@customer.com</contactPointData>
</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/1032

     


JSON

Request

Method URL
POST /ws/v12/interaction/activity?anonymousCustomer=yes

Request headers

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

Request body

{
    "department": {
        "name": "Service"
    },
    "type": {
        "value": "call_track",
        "subtype": {
            "value": "General"
        }
    },
    "mode": {
        "value": "Inbound"
    },
  "contactPointData": "paul.dermick@customer.com",
    "subject": "Summary of Phone call"
}

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/1033

     



Example 7 - Create a calltrack activity with all attributes including attachment, using XML/JSON as content-type

This example demonstrates the following: creating an inbound calltrack activity with the following:

  • Creating an inbound calltrack activity for an existing case.
  • Creating the activity with all required and optional elements, including attachments.
  • Using Customer ID as the customer identifier.
  • Assigning the created activity to a different user. The created activity will be assigned to the user with ID specified through 'status.assigned.user.id'.

XML

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

<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>call_track</value>
		<subtype>
			<ns3:value>General</ns3:value>
		</subtype>
	</type>
	<mode>
		<ns3:value>Inbound</ns3:value>
	</mode>  
	<customer id="1008"></customer>
	<case id="1016"/>
	<priority>4</priority>
	<dueDate>2015-12-26T19:00:00.000Z</dueDate>
	<subject>Summary of Phone call</subject>
	<status>
		<assigned>
			<user id="1002"/>
		</assigned>
	</status>
	<attachments>
		<ns4:attachment>
			<ns4:fileName>phone.gif</ns4:fileName>
			<ns4:contentType>gif</ns4:contentType>
			<ns4:content><![CDATA[iVBORw0KGgoAAAANSUhEUgAAABgAAAA0CAYAAACQGfi1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAOrSURBVFhH7ZdLKP1BFMeP6/3MeyMbNhJJugshr608skFISsKKsLGzwsqKBRspOwtZSZRSNh7JQiELxYLkUR55nf+c8zt3fg8Xxc9d/POp6Xfme36/mTszZ+bMBXSJ+/t7BAAu/f39oiJ6lOAKDw8PYgFcX1+LBeBaB0FBQWKpRj1ms651kJCQIBZAeHi4WAqZqh+Tlpam14DK9vY265CRkWFzuFkyMzORJo4qv4atg5SUFHh9fZXa9wgODoaLiwupGfBwOjs7ec7coLu7W0+TjqKrqyuxfo61Ld2BNY7dxLV98BF/HXzJXwdf8tfBl/xHHURHR4v1c2JiYsSyJBxK2h0dHaDuN1T9NpGRkTA9Pa2P7MCmTBpFaGgo3TT4eXZ2xnp9fT3k5+fD8/Mz10NCQuDk5ASmpqa4npWVxRpBKXN3d5dtH5zaUlNTjXxnYXR0lH0vLy+i2ElOTsbc3FypmbS3t/N3VPQi+0v2t7e3/PSXTmk0j4+PPFonfq+ONCVOfNFAw3ZCGhXbLU7wG0XEyMgIvL298a+iaJicnITDw0M4OjoCdYmStwxoBGFhYZzL1VTC3d0d26RR/ebmht/79Sh6t5MbGxtB3e/5lzjp6emBtrY2qdlpaWmB6upqqdnRK+6ksrKSdRWiopioWyD78vLyRDFRU6Xb/PQsonUgIiIi+GnFpyUmJvLTinX079agt7eXPxofH4fLy0tRAeLi4thH/2TGxsZENaA7bV9fH/uGh4dFNQjsIpeUlMD6+jrs7e3xL7LS1dUFm5ub7K+pqRHVoLW1lfXl5WUoKysT1YQXIz4+XpbIZGhoiH1NTU2imBQXF7NPRY8oJunp6eyTog1cWFiQVxDVdke1I1mPiorC4+Nj8SCurKzob9RORnWkiAdxa2tL+6gEfqPROeI8FnxQtPgLS4Iyor9zidDD2dnZkYEaZGdnsx4bG4tPT0+iIp6fn6PaB+xTecB2nJ+enur2pJgVJwMDA6xXVVWJYlJYWPihLycnR7epitlBUlISTkxM4NzcHDY3N1tfwtLSUpydncWZmRn0er02H3WyuLiI8/PzWFRUZPMFdpELCgpAhSDn1MHBQVEN6LTc2NiAtbU1qKurE9WgoaEBVldXYWlpCcrLy0U14aF4PB6ZQROVgNinGhTFpKKign21tbWimNDp62tXFW3wHPqgyFAhybo6VfHg4EA8iOrI0N/Q0axytngQ9/f3tY/9Yvwan+YDN/CokBPTfbxeL/wDUeva+z75IWIAAAAASUVORK5CYII=]]></ns4:content>
		</ns4:attachment>
	</attachments>
	<payload>
		<calltrack>
			<contents>
				<content>
					<ns3:type>text</ns3:type>
					<ns3:value>Shared information on redeeming points of a rewards card.</ns3:value>
				</content>
				<content>
					<ns3:type>html</ns3:type>
					<ns3:value><![CDATA[<HTML><BODY><H3>Shared information on redeeming points of a rewards card.</H3></BODY></HTML>]]></ns3:value>
				</content>
			</contents>
		</calltrack>
	</payload>
	<customAttributes>
		<ns3:customAttribute>
			<ns3:attribName>preferredlang</ns3:attribName>
			<ns3:attribValues>
				<ns3:attribValue>
					<ns3:value>French</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/1020

     


JSON

Request

Method URL
POST /ws/v12/interaction/activity

Request headers

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

Request body

{
    "department": {
        "name": "Service"
    },
    "type": {
        "value": "call_track",
        "subtype": {
            "value": "General"
        }
    },
    "mode": {
        "value": "Inbound"
    },
    "customer": {
        "id": "1008"
    },
    "case": {
        "id": "1016"
    },
    "priority": "4",
    "dueDate": "2015-12-26T19:00:00.000Z",
    "subject": "Summary of Phone call",
    "status": {
        "assigned": {
            "user": {
                "id": "1002"
            }
        }
    },
	"attachments": {
		"attachment": [{
			"fileName": "phone.gif",
			"contentType": "gif",
			"content": "iVBORw0KGgoAAAANSUhEUgAAABgAAAA0CAYAAACQGfi1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAOrSURBVFhH7ZdLKP1BFMeP6/3MeyMbNhJJugshr608skFISsKKsLGzwsqKBRspOwtZSZRSNh7JQiELxYLkUR55nf+c8zt3fg8Xxc9d/POp6Xfme36/mTszZ+bMBXSJ+/t7BAAu/f39oiJ6lOAKDw8PYgFcX1+LBeBaB0FBQWKpRj1ms651kJCQIBZAeHi4WAqZqh+Tlpam14DK9vY265CRkWFzuFkyMzORJo4qv4atg5SUFHh9fZXa9wgODoaLiwupGfBwOjs7ec7coLu7W0+TjqKrqyuxfo61Ld2BNY7dxLV98BF/HXzJXwdf8tfBl/xHHURHR4v1c2JiYsSyJBxK2h0dHaDuN1T9NpGRkTA9Pa2P7MCmTBpFaGgo3TT4eXZ2xnp9fT3k5+fD8/Mz10NCQuDk5ASmpqa4npWVxRpBKXN3d5dtH5zaUlNTjXxnYXR0lH0vLy+i2ElOTsbc3FypmbS3t/N3VPQi+0v2t7e3/PSXTmk0j4+PPFonfq+ONCVOfNFAw3ZCGhXbLU7wG0XEyMgIvL298a+iaJicnITDw0M4OjoCdYmStwxoBGFhYZzL1VTC3d0d26RR/ebmht/79Sh6t5MbGxtB3e/5lzjp6emBtrY2qdlpaWmB6upqqdnRK+6ksrKSdRWiopioWyD78vLyRDFRU6Xb/PQsonUgIiIi+GnFpyUmJvLTinX079agt7eXPxofH4fLy0tRAeLi4thH/2TGxsZENaA7bV9fH/uGh4dFNQjsIpeUlMD6+jrs7e3xL7LS1dUFm5ub7K+pqRHVoLW1lfXl5WUoKysT1YQXIz4+XpbIZGhoiH1NTU2imBQXF7NPRY8oJunp6eyTog1cWFiQVxDVdke1I1mPiorC4+Nj8SCurKzob9RORnWkiAdxa2tL+6gEfqPROeI8FnxQtPgLS4Iyor9zidDD2dnZkYEaZGdnsx4bG4tPT0+iIp6fn6PaB+xTecB2nJ+enur2pJgVJwMDA6xXVVWJYlJYWPihLycnR7epitlBUlISTkxM4NzcHDY3N1tfwtLSUpydncWZmRn0er02H3WyuLiI8/PzWFRUZPMFdpELCgpAhSDn1MHBQVEN6LTc2NiAtbU1qKurE9WgoaEBVldXYWlpCcrLy0U14aF4PB6ZQROVgNinGhTFpKKign21tbWimNDp62tXFW3wHPqgyFAhybo6VfHg4EA8iOrI0N/Q0axytngQ9/f3tY/9Yvwan+YDN/CokBPTfbxeL/wDUeva+z75IWIAAAAASUVORK5CYII="
		}]
	},
	"payload": {
		"calltrack": {
			"contents": {
				"content": [
					{	"type": "text",
						"value":"Shared information on redeeming points of a rewards card."
					},
					{	"type": "html",
						"value":"<HTML><BODY><H3>Shared information on redeeming points of a rewards card.</H3></BODY></HTML>"
					}
				]
			}
		}
	},
	"customAttributes": {
        "customAttribute": [
            {
                "attribName": "preferredlang",
                "attribValues": {
                    "attribValue": [
                        {
                            "value": "French"
                        }
                    ]
                }
            }
        ]
    }
}

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/1021

     



Example 8 - Create a calltrack activity with attachment, using Multipart/form-data as content-type

Using Multipart/form-data as content-type, this example demonstrates the following:

  • Creating a calltrack activity for a new case.
  • Creating the activity using required elements and attachment.
  • Using email address in contactPointData as the customer identifier.
  • Assigning the created activity to the logged in user.

XML

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-Language en-US

Request body

------WebKitFormBoundaryLyRAYGiE5mFu3Ucv
Content-Disposition: form-data; name="data"

<activity
    xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/activity"
    xmlns:ns1="http://bindings.egain.com/ws/model/v12/gen/platform"
    xmlns:ns2="http://bindings.egain.com/ws/model/v12/gen/common">
    <department>
        <ns1:name>Service</ns1:name>
    </department>
    <mode>
        <ns2:value>Inbound</ns2:value>
    </mode>
    <type>
        <value>call_track</value>
        <subtype>
            <ns2:value>General</ns2:value>
        </subtype>
    </type>
    <subject>Summary of Phone call</subject>
    <contactPointData>paul.dermick@customer.com</contactPointData>
</activity>
------WebKitFormBoundaryLyRAYGiE5mFu3Ucv
Content-Disposition: form-data; name="data-type"

application/xml
------WebKitFormBoundaryLyRAYGiE5mFu3Ucv
Content-Disposition: form-data; name="phone"; filename="phone.gif"
Content-Type: image/gif
9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAIBAQIBAQICAgICAgICAwUDAwMDAwYEBAMFBwYHBwcGBwcICQsJCAgKCAcHCg0KCgsMDAwMBwkODw0MDgsMDAz/2wBDAQICAgMDAwYDAwYMCAcIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAz/wAARCAMABVYDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRCh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bqUH/AL7Nca/3D9K9U8Q/D+41Xxrq1xZ6l4VltJ72aSF28R6em9GkYqcNMCMjHUZoAzDpu74X6rPx8mqWSf8AfUN4f/ZaK6LxHoX/AAi3wY1O3ur/AEOa7vNasJIYrLV7W9kZEgvQ7FYZHKgGSMZOBlhRQB//2Q==

------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/1034

     


JSON

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-Language en-US

Request body

------WebKitFormBoundaryLyRAYGiE5mFu3Ucv
Content-Disposition: form-data; name="data"

{
    "department": {
        "name": "Service"
    },
    "type": {
        "value": "call_track",
        "subtype": {
            "value": "General"
        }
    },
    "mode": {
        "value": "Inbound"
    },
  "contactPointData": "paul.dermick@customer.com",
    "subject": "Summary of Phone call"
}
------WebKitFormBoundaryLyRAYGiE5mFu3Ucv
Content-Disposition: form-data; name="data-type"

application/json
------WebKitFormBoundaryLyRAYGiE5mFu3Ucv
Content-Disposition: form-data; name="phone"; filename="phone.gif"
Content-Type: image/gif
9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAIBAQIBAQICAgICAgICAwUDAwMDAwYEBAMFBwYHBwcGBwcICQsJCAgKCAcHCg0KCgsMDAwMBwkODw0MDgsMDAz/2wBDAQICAgMDAwYDAwYMCAcIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAz/wAARCAMABVYDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBka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OHf7OX7VPg7wp8PvBljc/DL4waXpGja9b20txrUttdSamTavczSybUjWKKEJCIlYRAyK8mWqX/gqT/wT8f9jv8A4Ju/Cyxb4Y32ja/4X8WXmleJfF02gSW8muTTadY3JJumiVpLVLmW5t4CWKOLR2Qklq+Trf8A4KDfFO0+DHiTwDJqXha/8O+MbmS91xtR8GaLfalq907zP9qnv5rR7yS4Vp5ikzTGSPzDsZa841P41+J9U+DGl/D241PzPB+jatc65ZWH2eIeTeXEUUU0vmBfMbckEQ2sxUbcgAkkgHMRXBRGHqDXW66pPibUlPVbqUH/AL7Nca/3D9K9U8Q/D+41Xxrq1xZ6l4VltJ72aSF28R6em9GkYqcNMCMjHUZoAzDpu74X6rPx8mqWSf8AfUN4f/ZaK6LxHoX/AAi3wY1O3ur/AEOa7vNasJIYrLV7W9kZEgvQ7FYZHKgGSMZOBlhRQB//2Q==

------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/1035