Pull Data

Author: Salman Pathan 153 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

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.

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"
}
]
}