Import

  • Function:

importWS(orgidentity,usertype,user,pwdtype,password,modeltype,model_id,source, context,source_user,source_pwd,exetime,delrow,phone_field, priority_field,dialtime_field,emptyagent, resetstatus, dupway, dupdiallist, changepackage)

  • Description:

Import/update data to a customer package (campaign)

  • Parameters:
Parameters Type Description
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

importWS(orgidentity,usertype,user,pwdtype,password,modeltype,model_id,source, context,source_user,source_pwd,exetime,delrow, , , '',emptyagent, resetstatus, dupway, dupdiallist, changepackage)

  • Return Format:

|Retuen|code|Retuen|message

  • Type of the Return Value:String
  • Return Values:
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
en/custom_development_guide/apis/webservice/import.txt · Last modified: 2019/01/03 15:19 by donnie
Recent changes RSS feed Debian Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki