| Next revision | Previous revision |
| en:custom_development_guide:apis:http:import [2016/09/12 07:30] – created liuxl | en:custom_development_guide:apis:http:import [2019/01/03 07:19] (current) – donnie |
|---|
| ===== Import ====== | ===== Import ====== |
| |
| * Function: | * Reques String: |
| <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>EVENT=Import&orgidentity=orgidentity&usertype=usertype&user=user&pwdtype=pwdtype&password=password&modeltype=modeltype&model_id=model_id&source=source&context=context&source_user=source_user&source_pwd=source_pwd&exetime=exetime&delrow=delrow&phone_field=phone_field&priority_field=priority_field&dialtime_field=dialtime_field&emptyagent=emptyagent&resetstatus=resetstatus&dupway=dupway&dupdiallist=dupdiallist&changepackage=changepackage</code> |
| </code> | |
| * Description: | * Description: |
| Import/update data to a customer package (campaign) | Import/update data to a customer package (campaign) |
| |
| ^ Parameters ^ Type ^ Description ^ | ^ Parameters ^ Type ^ Description ^ |
| | |EVENT|String|Import| |
| |orgidentity|String|team identity string| | |orgidentity|String|team identity string| |
| |usertype|String|agent / account| | |usertype|String|agent / account| |
| unassignToCurrent: if customer doesn't belong to any package, move the customer to current package | unassignToCurrent: if customer doesn't belong to any package, move the customer to current package |
| reassignToCurrent: always move customer to current package</code>| | 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. | <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 | 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) | EVENT=Import&orgidentity=orgidentity&usertype=usertype&user=user&pwdtype=pwdtype&password=password&modeltype=modeltype& |
| | model_id=model_id&source=source&context=context&source_user=source_user&source_pwd=source_pwd&exetime=exetime& |
| | delrow=delrow**&phone_field=&priority_field=&dialtime_field=**&emptyagent=emptyagent&resetstatus=resetstatus& |
| | dupway=dupway&dupdiallist=dupdiallist&changepackage=changepackage |
| </note> | </note> |
| |
| |
| <code> | <code> |
| {code:code,message:message} | |Retuen|code|Retuen|message |
| </code> | </code> |
| |
| * Type of the Return Value:JSON | * Type of the Return Value:String |
| * Return Values: | * Return Values: |
| |
| ^ Value ^ Description ^ | ^ 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>|Retuen|1|Retuen|message</code>|<code>|Retuen|succeed|Retuen|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>| | |<code>|Retuen|2|Retuen|message</code>|<code>|Retuen|failed|Retuen|message</code>| |