/// <summary> /// Funtion to handle ebs webservice response /// </summary> /// <param name="respJson">response in jSON string</param> public void ExtractResponse(string jsonResp) { int _internalIncidentID = 0; string[] internalIncident = RightNowConnectService.GetService().GetAllInternalIncident(_incidentRecord.ID); if (internalIncident != null) { _internalIncidentID = Convert.ToInt32(internalIncident[0]); } //Extract response Dictionary <string, object> data = (Dictionary <string, object>)WebServiceRequest.JsonDeSerialize(jsonResp); Dictionary <String, object> outputParameters = (Dictionary <String, object>)data["OutputParameters"]; Dictionary <String, object> output = (Dictionary <String, object>)outputParameters["CIN_SUPPLIER_WARRANTY_PKG-24ISP"]; if (output["ISCOVERED"].ToString() == "1") { //autogenerate sClaim //_rnConnectService.CreatesClaim(_incidentRecord.ID); RightNowConnectService.GetService().UpdateInternalIncidentForSupplier(_internalIncidentID, true, output["DESCRIPTION"].ToString()); //Create a child object to store Supplier recoverable limit _rnConnectService.CreateSupplierInfo(_incidentRecord.ID, output["DESCRIPTION"].ToString(), output["TEMPLATE_NAME"].ToString(), output["PARTS_REIMB_PERC"].ToString(), output["PARTS_MAX_AMOUNT"].ToString(), output["LABOUR_REIMB_PERC"].ToString(), output["LABOUR_MAX_AMOUNT"].ToString(), output["OTHER_REIMB_PERC"].ToString(), output["OTHER_MAX_AMOUNT"].ToString() ); } else { RightNowConnectService.GetService().UpdateInternalIncidentForSupplier(_internalIncidentID, false, output["DESCRIPTION"].ToString()); } }