This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== Import ====== * Function: <code>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) </code> * 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|<code>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</code>| |context|String|<code>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</code>| | 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|<code>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</code>| |changepackage|String|<code>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</code>| |callbackFuc|String|callback function| <note important>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 importCJI(orgidentity,usertype,user,pwdtype,password,modeltype,model_id,source, context,source_user,source_pwd,exetime,delrow, '', '', '',emptyagent, resetstatus, dupway, dupdiallist, changepackage, callbackFuc) </note> * Return Format: <code> {code:code,message:message} </code> * Type of the Return Value:JSON * Return Values: ^ Value ^ Description ^ |<code>{code:1,message:message}</code>|<code>{code:succeed,message:when import from http or ftp, it gives import job id, or else it return a message</code>| |<code>{code:2,message:message}</code>|<code>{code:failed,message:message}</code>|

en/custom_development_guide/apis/javascript/import.1546395247.txt.gz · Last modified: 2019/01/02 02:14 by donnie
Recent changes RSS feed Debian Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki