Introduction
This article gives an overview on how to use the Nixxis “ContextData” interface to do a web “Call me back”.
Definition
There are 2 types of call me
back. The first is the “Call me back now” and the second is the “Call me back
at”. The main difference between the 2 is that the second have a callback
date/time.
For both types it is needed to
have a campaign with an outbound activity.
To create a new record the
Nixxis API “ContextData” will be used.
The action “CreateContextData”
allow to create a new record in the “Data” table of the campaign (see
documentation about “ContactData” for more details). This will also trigger the
creation of a record in the “SystemData” table.
There are 2 different type of
record that can be created:
- A record for the campaign (see “Campaign Record”).
- A record that is directly associated with an activity (see
“Record associated to an activity”)
The first way is to create a
record that can be handled by any activity of the campaign.
For this a POST of xml data is
need to the Nixxis ContextData service, this uri looks like this:
Using the following
parameters:
- “appserver.Nixxis.com:8088”: the name or ip and port of
appserver that is used for the “Call me back”
- {campaignId}: the guid of the campaign that will be used
for the “Call me back”. Example: 38e8f8dfgg4fd5g1dfg8df4g618g
Here is how the XML structure
should look like:
contextdata> <campaigndata> <Name>My Customer Name</Name> <PhoneNumber>0123456789</PhoneNumber> </campaigndata> <systemdata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <CurrentActivity xsi:nil="true" />
<State>15</State> <SortInfo>-2</SortInfo> <DialStartDate>yyyy-MM-dd hh:mm:ss.000</DialStartDate> <DialEndDate>yyyy-MM-dd hh:mm:ss.000</DialEndDate> <CreationTime>yyyy-MM-dd hh:mm:ss.000</CreationTime> <ImportTag>ImportTag</ImportTag> </systemdata></contextdata>
- The tags under
‘<campaigndata>’ (‘<Name>’ and ‘<PhoneNumber>’ in this
sample) are directly linked to the fields defined in the campaign database
structure. And can be different for each campaign.
- Respect the casing of the fields.
- CurrentActivity = Empty
(type: char(32)
- State = 15 (state
description: Callback | type: int)
- DialStartDate = Callback
date (type: datetime)
- DialEndDate = Callback end
validity date (type: datetime)
- CreationTime = Optional
(type: datetime)
- ImportTag = Optional
(type: nvarchar(250))
Record associated to an activity
The seconded way is a record that is associated with an activity.
For this a POST of xml data is need to the Nixxis ContextData service, this uri looks like this:
Using the following
parameters:
- “appserver.Nixxis.com:8088”: the name or ip and port of
appserver that is used for the “Call me back.”
- The phone number is always required and need to be put in
1 of the fields where the field meaning is set to a phone number.
Here is how the XML structure should look like:
<contextdata>
<campaigndata>
<Name>My Customer Name</Name>
<PhoneNumber>0123456789</PhoneNumber>
</campaigndata>
<systemdata>
<CurrentActivity>47b8f8ead10d45c7ac2331c5b47a48b8</CurrentActivity>
<State>15</State>
<SortInfo>-2</SortInfo>
<DialStartDate>yyyy-MM-dd hh:mm:ss.000</DialStartDate>
<DialEndDate>yyyy-MM-dd hh:mm:ss.000</DialEndDate>
<CreationTime>yyyy-MM-dd hh:mm:ss.000</CreationTime>
<ImportTag>ImportTag</ImportTag>
</systemdata>
</contextdata>
- The tags under
‘<campaigndata>’ (‘<Name>’ and ‘<PhoneNumber>’ in this
sample) are directly linked to the fields defined in the campaign database
structure. And can be different for each campaign.
- Respect the casing of the fields.
- CurrentActivity =
47b8f8ead10d45c7ac2331c5b47a48b8 (to be replaced with destination activity | type:
char(32)
- State = 15 (state
description: Callback | type: int)
- DialStartDate = Callback
date (type: datetime)
- DialEndDate = Callback end
validity date (type: datetime)
- CreationTime = Optional
(type: datetime)
- ImportTag = Optional
(type: nvarchar(250))
Example Postman :