Pull Data

Author: Salman Pathan 374 views

Purpose:

This method is used to pull customer data from DB.

Use Case:

Sync customer data from Jodo Platform with external business applications.

Jodo users execute actions / transactions in the business applications and the external data will be synced periodically to reflect current status.

CRM / Business application to fetch data from Jodo using this method.

In this request either daterange (fromdate, todate), mobilenumber, customercode, crmuniquefield fields will be send as searchparam values can be used as input string to pull out data from Jodo DB.
At any time only one value should be passed else web service will pull data on all given criteria.

In example below, Searchparam has been considered as unique field to process data.

The getProcessData method accepts JSON string as input and returns response as JSON string .

Input Value:
M – mandatory parameter
O – Optional parameter

ParameterM/OData TypeExampleDescription
methodMTextgetProcessDataName of the web service method
reqdatetimeMText2016-01-19 12:00:00Date time for the webservice request
servicekeyMTextprocess1Unique Service Key for the process
apikeyMTextMsQgi5/gKVZusW5XziRf76nHbn9JxU4VDSWwongD5dU=Unique API key for an organisation
searchparamMTextcustomer_code(1001)Unique Process values on which customer wants to search data: valid search parameter mobile number customer code CRM unique field ID Date range
fromdateOText2016-01-17 12:00:00From date from which data has to pulled searchparam=”daterange”
todateOText2016-01-19 12:00:00 Valid Format : (yyyy-dd-mm HH:mm:ss)To date to which data wants to pull searchparam=”daterange”
mobilenumberOTextContact number(8765456789)Mobile number If single contact number data has to be pulled out searchparam=”mobilenumber”. (Mobile number range must be minimum 3 digit and max 16 digit) for international contact number country code is mandatory.
customercodeOText14001This is Jodo Customer unique code. It is received through Toolbar when call is connected on Jodo CRM. searchparam=”customercode”
crmuniquefieldOTextPOP100300This is CRM Unique Field value. e.g., Policy Number searchparam=”crmuniquefield”

Note:

  •  searchparam is case sensitive.
  •  If searchparam is mobile number then webservice fetch mobile number value from request and pull-out customer data from Jodo World DB on contact1 field
  •  If searchparam is daterange then webservice fetch fromdate and todate values from request and pull-out customer data from Jodo World DB on storedatetime field
  •  If searchparam is customercode then webservice fetch customercode value from request and pull-out customer data from Jodo World DB on customer_code field
  •  If searchparam is crmuniquefield then webservice fetch crmuniquefield value from request and pull-out customer data from Jodo World DB on process associated unique CRM field.

Output Value:

This function returns JSON String with unique ID generated by web service. This is used to track details of the requests sent to the web services.

Data as per Form Template definition. Refer Push Data API DATA FAQ point.

ParameterData typeExampleDescription
methodTextgetProcessDataName of the web service method
resdatetimeText2016-01-19 12:00:00Date time for the webservice response
statuscodeText001Response Code
statusdescTextsuccessResponse description.
dataTextCustomerdata in arrayCustomer data in array

JSON request Response

This method accepts StrRequest JSON string as input and returns response as JSON string .

Sample JSON Request With search param mobilenumber

				
					{
"method":"getProcessData",
"reqdatetime":"2016-01-19 12:00:00",
"servicekey":"Policy",
"apikey":"MsQgi5/gKVZusW5XziRf76nHbn9JxU4VDSWwongD5dU=",
"searchparam":"mobilenumber",
"mobilenumber":
["9000100200",  "9000100201","9000100203"]
}
				
			

Sample JSON Request With search param customercode

				
					{
"method":"getProcessData",
"reqdatetime":"2016-01-19 12:00:00",
"servicekey":"Policy",
"apikey":"MsQgi5/gKVZusW5XziRf76nHbn9JxU4VDSWwongD5dU=",
"searchparam":"customercode",
"customercode":"1"
}
				
			

Sample JSON Request With search param crmuniquefield

				
					{
"method":"getProcessData",
"reqdatetime":"2016-01-19 12:00:00",
"servicekey":"Policy",
"apikey":"MsQgi5/gKVZusW5XziRf76nHbn9JxU4VDSWwongD5dU=",
"searchparam":"crmuniquefield",
"crmuniquefield":"1"

}
				
			

Sample JSON Request With search param daterange

				
					{
"method":"getProcessData",
"reqdatetime":"2016-01-19 12:00:00",
"servicekey":"Policy",
"apikey":"MsQgi5/gKVZusW5XziRf76nHbn9JxU4VDSWwongD5dU=",
"searchparam":"daterange",
"fromdate":"2016-01-19 12:00:00",
"todate":"2016-01-22 12:00:00"
}
				
			

Sample JSON Response

				
					{
"method":"getProcessData",
"resdatetime":"2016-01-19 12:00:00",
"statuscode":"001",
"statusdesc":"success",
"data":
[
{
"leadnumber":"1",
"name":"Avhan Technologies",
"mobilenumber":"1234567890",
"emailid":"v@avhan.com",
"callDateTime":"2013-06-20 09:07:00",
"policyexpirydate":"2013-02-22",
"dateofleadcreation":"2012-02-22",
"timeofleadcreation":"12:00:00",
"extrafield1":"1",
"extrafield2":"2",
"extrafield3":"3"
},{
"leadnumber":"2",
"name":"Avhan Technologies 1",
"mobilenumber":"1234567891",
"emailid":"v1@avhan.com",
"callDateTime":"2013-06-20 09:07:00",
"policyexpirydate":"2013-02-22",
"dateofleadcreation":"2012-02-22",
"timeofleadcreation":"12:00:00",
"extrafield1":"11",
"extrafield2":"21",
"extrafield3":"31"
}
]
}