public void GetBookingDetails(RequestActionEventArgs args, WebRioSsoConfig configuration) { if (configuration.RequestType != RequestType.Booking) { return; } var url = GetParamValue(args, UsdParameter.Url); var decodedUrl = WebUtility.UrlDecode(url); decodedUrl = decodedUrl.Replace("%25", ""); decodedUrl = decodedUrl.Replace("%3d", "="); var etc = decodedUrl.Substring(decodedUrl.IndexOf("etc=")); configuration.ObjectTypeCode = etc.Substring(4, etc.IndexOf('&') - 4); var id = decodedUrl.Substring(decodedUrl.IndexOf("id=")); id = id.Substring(3, id.IndexOf("7d") - 3); configuration.BookingSummaryId = id.Replace("7b", ""); CrmService.GetConsultationReferenceFromBookingSummary(_client.CrmInterface, configuration); }