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)
Import/update data to a customer package (campaign)
| 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 |
| callbackFuc | String | callback function |
importCJI(orgidentity,usertype,user,pwdtype,password,modeltype,model_id,source,context,source_user,source_pwd,exetime,delrow,‘’,‘’,‘’,emptyagent, resetstatus,dupway,dupdiallist,changepackage,callbackFuc)
{code:code,message:message}
| 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}
|