`; $.ajax({ type: "POST", contentType: "application/xml", url: "https://api.webex.com/gla/GLAService", data: data, dataType: "xml", success: function (xml) { var bodyContent = xml.getElementsByTagName("serv:bodyContent")[0] bodyContent.childNodes.forEach(function (cluster) { if (cluster.getElementsByTagName("user:cluster")[0].textContent === 'Production Env') { if (cluster.getElementsByTagName("user:result")[0].textContent === "SUCCESS") { // Meetings site found. Send to global signin. window.location.; } else { // Check if user exists in CI. function checkUserExistCall() { var createUserReq = { requestType: "userExistCheck", emailId: email }; $.ajax({ method: "POST", type: "text", async: false, url: "/bin/createBuyAcc", data: createUserReq, success: function (result) { var response = JSON.parse(result); var status = response.status; if (response.userExist && response.orgId === "consumer") { // User found. Send to web client. window.location.; } else { // User not in meetings or CI. Send to sign-up. window.location.; } }, error: function (jqXHR, textStatus, errorThrown) { alert("Error in check user exist service" + errorThrown); } }); } checkUserExistCall() } } }) } }); }