"; let errors = []; $(".error-message").remove(); // Validate Email if (isStringValidated(Email)) { if (validateBusinessEmailID(Email) && validateEmailid(Email)) { console.log("email validated"); } else { console.log("email not validated"); document.querySelector(".btn-text").style.display = "inline"; document.querySelector(".dots-loader").style.display = "none"; showError( "#HR-Demo-email", "Invalid email format. Please enter a valid business email." ); errors.push( "Please enter a valid email address (e.g. user@example.com)." ); } } else { document.querySelector(".btn-text").style.display = "inline"; document.querySelector(".dots-loader").style.display = "none"; console.log("email not validated"); showError( "#HR-Demo-email", "Please enter an email address (e.g. user@example.com)" ); errors.push("Please enter an email address (e.g. user@example.com)."); } // Validate Number of Users if (!isStringValidated(NoOfUsers)) { errors.push("Please select the number of Microsoft 365 users."); showError( "#HR-NoOfUsers", "Please select the number of Microsoft 365 users." ); document.querySelector(".btn-text").style.display = "inline"; document.querySelector(".dots-loader").style.display = "none"; } if (!isStringValidated(PhoneNumber)) { document.querySelector(".btn-text").style.display = "inline"; document.querySelector(".dots-loader").style.display = "none"; errors.push("Please select the number of Microsoft 365 users."); showError("#HR-PhoneNumber", "Please provide your phone number"); } if (!isStringValidated(IAmInterested)) { document.querySelector(".btn-text").style.display = "inline"; document.querySelector(".dots-loader").style.display = "none"; errors.push("Please select applications."); showError("#HR-IAmInterested", "Please select application"); } if (token == "Demo") { // Validate Remarks if (!isStringValidated(anyRemarks)) { document.querySelector(".btn-text").style.display = "inline"; document.querySelector(".dots-loader").style.display = "none"; errors.push("Please provide any specific details for the meeting."); showError( "#HR-anyRemarks", "Please provide any specific details for the meeting." ); } } // Display Errors or Submit Form console.log(data); if (errors.length > 0) { console.log("not filled", data); document.querySelector(".btn-text").style.display = "inline"; document.querySelector(".dots-loader").style.display = "none"; } else { let IPDATA = await awaitFunction(); lpstate = IPDATA?.regionName || ""; lpCity = IPDATA?.cityName || ""; lpCountry = IPDATA?.countryName || ""; lpIPAddress = IPDATA?.ipAddress || ""; lpTimeZone = IPDATA?.timeZone || ""; data = { Name: isStringValidated(Name) ? Name : "", EmailID: isStringValidated(Email) ? Email?.toLowerCase() : "", PhoneNumber: isStringValidated(PhoneNumber) ? PhoneNumber : "", PageUrl: PageURL || "", AppName: isStringValidated(IAmInterested) ? IAmInterested : getAppName(), DateTime: formattedDate + " " + currentTime, Company: "", EmailBody: isStringValidated(EmailBody2) ? EmailBody2 : EmailBodyFormat, IPAddress: lpIPAddress || "", Country: lpCountry || "", City: lpCity || "", Region: lpstate || "", Timezone: lpTimeZone || "", RequestType: token, Intrest: isStringValidated(IAmInterested) ? IAmInterested : "", Webiste: isStringValidated(CompanyWebsite) ? CompanyWebsite : "", EmployeeSize: isStringValidated(NoOfUsers) ? NoOfUsers : "", Remarks: isStringValidated(anyRemarks) ? anyRemarks : "", }; console.log(data); // sendDataToAPI(data, token); successTEstMessage(data, token); } } function successTEstMessage(data, token) { let Emailval = $("#HR-Demo-email").val(); document.querySelector(".btn-text").style.display = "inline"; document.querySelector(".dots-loader").style.display = "none"; window.dataLayer = window.dataLayer || []; window.dataLayer.push({ event: `conversion-${getAppName()}`, email: Emailval, appName: getAppName(), }); resetProductForm(token); showMessage("success", "Thankyou! ✔ We’ve received your form submission."); showMessage( "success", "Based on organization's spam settings, confirmation email may land in your spam, junk or quarantine, please check or suggest your admin to release the mail and whitelist the cubiclogics.com." ); if (type == "Demo") { setTimeout(() => { window.open(BookaDemoURl, "_self"); }, 2000); } } function isStringValidated(value) { if (value === null || value === undefined || value === "") { return false; } else { return true; } } function getAppName() { const PageURL = window.location.href?.toLowerCase(); if (PageURL.includes("directory")) { return "Employee Directory 365"; } else if (PageURL.includes("helpdesk")) { return "Helpdesk 365"; } else if (PageURL.includes("asset-management")) { return "Asset Management 365"; } else if (PageURL.includes("time-off")) { return "Time Off Manager 365"; } else if (PageURL.includes("employee-onboarding")) { return "Employee Onboarding 365"; } else if (PageURL.includes("performance-management")) { return "Performance Management 365"; } else if (PageURL.includes("contract")) { return "CLM 365 - Contract Management"; } else if (PageURL.includes("timesheet")) { return "Timesheet 365"; } else { return window.location.href; } } // Function to Validate Email function validateEmailid(email) { const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; return emailRegex.test(email); } function validateBusinessEmailID(email) { const freeEmailDomains = [ "@gmail.com", "@yahoo.com", "@outlook.com", "@hotmail.com", "icloud.com", ]; // Convert to lowercase and check if it includes any of the restricted domains return !freeEmailDomains.some((domain) => email.toLowerCase().includes(domain) ); } function showError(inputId, message) { $(inputId).after(`

${message}

`); } // Function to Get Public IP async function getPublicIP() { try { let response = await fetch("https://api64.ipify.org?format=json"); let data = await response.json(); return data.ip; } catch (error) { console.error("Error fetching IP:", error); return "Unknown"; } } function asyncOperation() { return new Promise((resolve, reject) => { setTimeout(() => { const ipAddress = ""; // Replace with the IP address you want to query const access_token = "843b85132fe7ea"; // Replace with your actual IPinfo access token const success = true; // Simulating success if (success) { resolve( // fetch(`https://ipinfo.io/${ipAddress}?token=${access_token}`) fetch(`https://freeipapi.com/api/json/`) .then((response) => response.json()) .then((data) => { return data; }) ); } else { reject(console.error("Error fetching IPInfo:")); } }, 2000); // Simulate async operation (e.g., network request) }); } async function awaitFunction() { try { console.log("Starting async operation..."); // Await the promise returned by asyncOperation const result = await asyncOperation(); console.log(result); // Logs "Operation successful!" after 2 seconds return result; } catch (error) { console.error("Error:", error); // Handles any errors that occur } } let BookaDemoURl = "https://outlook.office365.com/owa/calendar/HR365AndBizApps365@cubiclogics.com/bookings/s/fsSfagBEDUyqAxMPzD8UWg2"; // Function to Send Data to API function sendDataToAPI(data, type) { const url = "https://apps.m365online.us/api/Home/TrialRequest"; const url2 = "https://prod-03.centralindia.logic.azure.com:443/workflows/d91375fc5ae349b4ac907ab1eee46d1a/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=shtJjLt_PDc1aC2oWNSxGZWTgnWFLYKPaHyLaSLx4P0"; data.RequestType = type; $.ajax({ url: url, type: "POST", contentType: "application/json", data: JSON.stringify(data), success: function (response) { let Emailval = $("#HR-Demo-email").val(); document.querySelector(".btn-text").style.display = "inline"; document.querySelector(".dots-loader").style.display = "none"; window.dataLayer = window.dataLayer || []; window.dataLayer.push({ event: `conversion-${getAppName()}`, email: Emailval, appName: getAppName(), }); showMessage( "success", "Thankyou! ✔ We’ve received your form submission." ); showMessage( "success", "Based on organization's spam settings, confirmation email may land in your spam, junk or quarantine, please check or suggest your admin to release the mail and whitelist the cubiclogics.com." ); if (type == "Demo") { setTimeout(() => { window.open(BookaDemoURl, "_self"); }, 2000); } }, error: function (error) { console.error("Error:", error); alert("There was a problem with the submission."); }, }); $.ajax({ url: url2, type: "POST", contentType: "application/json", data: JSON.stringify(data), success: function (response) { document.querySelector(".btn-text").style.display = "inline"; document.querySelector(".dots-loader").style.display = "none"; }, error: function (error) { console.error("Error:", error); alert("There was a problem with the submission."); }, }); }

HR365

Sticky Header

Schedule a free personalized 1:1 demo

By proceeding, you accept Cubic Logics’s terms and conditions and privacy policy

"Outstanding product that combines ease of use, robust security, and excellent value for money."
Try It Free, No Obligation

By proceeding, you accept Cubic Logics’s terms and conditions and privacy policy

"Exceptional tool that delivers seamless integration, powerful features, and unmatched reliability."

Don't leave yet,
get up to 30% Easter offer!

Enter your business email ID and we will send a personalized coupon code straight to your inbox.

Offer is expiring soon!
Fill in your details below to receive your personalized coupon code.

Start Your Free Experience

By proceeding, you accept Cubic Logics’s terms and conditions and privacy policy

"Exceptional tool that delivers seamless integration, powerful features, and unmatched reliability."