            let cxidOrResult = CloudExperienceHost.AppResult.success;
                            let clearAndPopulateZTPCachePromise = EnterpriseDeviceManagement.Service.AutoPilot.AutoPilotUtilStatics.clearDdsCacheAsync().then(() => {
                                CloudExperienceHost.Telemetry.logEvent("AutoPilot policy cache cleared");
                            }).then(() => {
                                return EnterpriseDeviceManagement.Service.AutoPilot.AutoPilotUtilStatics.retrieveSettingsAsync();
                            }).then(() => {
                                let details = { timeElapsed: performance.now() - startTime };
                                CloudExperienceHost.Telemetry.logEvent("AutoPilot prefetch ZTP policy cache returned", JSON.stringify(details));
                            }, (error) => {
                                CloudExperienceHost.Telemetry.logEvent("AutoPilot prefetch ZTP policy cache failed");
                            }).then(() => {
                                return EnterpriseDeviceManagement.Service.AutoPilot.AutoPilotUtilStatics.getCXIDPostRebootAsync();
                            }).then((cxidToJumpTo) => {
                                const UpdateRebootCXIDKey = "UpdateRebootCXID";
                                if ((cxidToJumpTo !== null) && (cxidToJumpTo !== "")) {
                                    let lastResetWasFromAutopilotUpdate = CloudExperienceHost.Storage.SharableData.getValue("resetFromAutopilotUpdate");
                                    if (lastResetWasFromAutopilotUpdate) {
                                        cxidOrResult = cxidToJumpTo;
                                        CloudExperienceHost.Storage.SharableData.addValue("resetFromAutopilotUpdate", false);
                                        // Reset the UpdateRebootCXID node after it is used.
                                        return autoPilot.storeSettingAsync(UpdateRebootCXIDKey, "");
                                    }
           