This is an old revision of the document!


Import

  • Function:

importCJI(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, callbackFuc)

  • 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
delrowString填写数字,代表文件中前N行数据不导入进系统。一般去除第1行,文件首行为标题行,不是数据。当source=http或ftp时,此参数有效。
phone_fieldString如需将数据同时导入预拨号列表,请指定号码列的字段名称。例如phone1或电话号码一
priority_fieldString预拨号优先级所对应的字段名称。
dialtime_fieldString预拨号时间所对应的字段名称。
emptyagentString当待导入数据已经存在于客户包时,是(yes)否(no)清空归属坐席,向预拨号导入数据时,参考此参数进行数据归属重置。
resetstatusString当待导入数据已经存在于客户包时,是(yes)否(no)重置客户处理状态。
dupwayString当待导入数据已经存在于客户包时,是(update)否(skip)使用文件中的数据更新已存在的数据。
dupdiallistString
当待导入数据已经存在于客户包时,应该使用下列哪种方式将客户放入预拨号列表。
忽略重复(ignoreDuplicate),如果发现客户数据已存在,此数据无需放入预拨号列表。
全部(all),无视数据是否重复,无视客户处理状态,一律放入预拨号列表。
忽略成功提交(ignoreSuccess),无视数据是否重复,只要客户处理状态不是成功提交,就放入预拨号列表。
changepackageString
如果目标客户包使用的是总表客户,并且待导入数据已存在于数据表。
跳过(skip),不处理此类数据。
仅改变主表客户(unassignToCurrent),如果此客户未分配至其它客户包,那么将此客户分配至当前客户包。
转移到当前客户包(reassignToCurrent),如果客户已分配至其它客户包,系统会将此用户转移至当前客户包。
callbackFucStringcallback function

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:

{code:code,message:message}

  • Type of the Return Value:JSON
  • Return Values:
Value Description
{code:1,message:message}
{code:succeed,message:when import from http or ftp, it gives import job id, or else it return a message
{code:2,message:message}
{code:failed,message:message}
en/custom_development_guide/apis/javascript/import.1473256615.txt.gz · Last modified: (external edit)
Recent changes RSS feed Debian Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki