Import

EVENT=Import&orgidentity=orgidentity&usertype=usertype&user=user&pwdtype=pwdtype&password=password&modeltype=modeltype&model_id=model_id&source=source&context=context&source_user=source_user&source_pwd=source_pwd&exetime=exetime&delrow=delrow&phone_field=phone_field&priority_field=priority_field&dialtime_field=dialtime_field&emptyagent=emptyagent&resetstatus=resetstatus&dupway=dupway&dupdiallist=dupdiallist&changepackage=changepackage

Import/update data to a customer package (campaign)

Parameters Type Description
EVENTStringImport
orgidentityStringteam identity string
usertypeStringagent / account
userStringagent No. / username
pwdtypeStringpassword type: plaintext/md5
passwordStringpassword
modeltypeStringCampaign
model_idStringcampaign Id
sourceString
Data source:
data,one data each time, format:
field1=value1||field2=value2||…..||fieldN=valueN
ex:
name=Joe||phone1=138xxxx88x8
http, import from URL, csv only
ftp, import from ftp, csv only
contextString
Refer to param source
when source=data, put data, ex:
name=Joe||phone1=138xxxx88x8   || as seperator
name is display name,phone1 is filed name, you can use either
when source=http, put URL, ex:
http://192.168.1.88/xxx.csv
when source=ftp, put ftp address, ex:
ftp://192.168.1.88/xxx.csv
source_user String put http/ftp username or else put source_user=“”
source_pwd String put http/ftp password or else put source_pwd=““
exetimeStringwhen source is http or ftp, you could schedule the import job, when it's empty string or 0000-00-00 00:00:00, means immediately
delrowStringwhen source is http or ftp and you want to remove few lines(usually the first line is title), put the number here
phone_fieldStringput field name or display name if you want to import it to dial list
priority_fieldStringpriority field name
dialtime_fieldStringdialtime field name
emptyagentStringWhen duplicated record found, if you want to reset assigned agent: yes/no
resetstatusStringwhen duplicated record found, if you want to reset customer status: yes/no
dupwayStringwhen duplicated record found, if you want to update: update/skip
dupdiallistString
when duplicated record found, if you want to insert it into dial list:
ignoreDuplicate: don't insert
all: always insert
ignoreSuccess: insert as long as customer status is not success
changepackageString
If duplicated record found and campaign is using main table:
skip: ignore the data
unassignToCurrent: if customer doesn't belong to any package, move the customer to current package
reassignToCurrent: always move customer to current package

You must set all parameters, if you have no data, use a empty string. ex: when you don't have field phone_field,priority_field,dialtime_field, it looks like

EVENT=Import&orgidentity=orgidentity&usertype=usertype&user=user&pwdtype=pwdtype&password=password&modeltype=modeltype& model_id=model_id&source=source&context=context&source_user=source_user&source_pwd=source_pwd&exetime=exetime& delrow=delrow&phone_field=&priority_field=&dialtime_field=&emptyagent=emptyagent&resetstatus=resetstatus& dupway=dupway&dupdiallist=dupdiallist&changepackage=changepackage

|Retuen|code|Retuen|message

Value Description
|Retuen|1|Retuen|message
|Retuen|succeed|Retuen|message:when import from http or ftp, it gives import job id, or else it return a message
|Retuen|2|Retuen|message
|Retuen|failed|Retuen|message