===== 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 ^
|orgidentity|String|team identity string|
|usertype|String|agent / account|
|user|String|agent No. / username|
|pwdtype|String|password type: plaintext/md5|
|password|String|password|
|modeltype|String|Campaign|
|model_id|String|campaign Id|
|source|String|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|
|context|String|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=""|
|exetime|String|when 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|
|delrow|String|when source is http or ftp and you want to remove few lines(usually the first line is title), put the number here|
|phone_field|String|put field name or display name if you want to import it to dial list|
|priority_field|String|priority field name|
|dialtime_field|String|dialtime field name|
|emptyagent|String|When duplicated record found, if you want to reset assigned agent: yes/no|
|resetstatus|String|when duplicated record found, if you want to reset customer status: yes/no|
|dupway|String|when duplicated record found, if you want to update: update/skip|
|dupdiallist|String|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|
|changepackage|String|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|