{"id":184522,"date":"2026-08-20T14:38:59","date_gmt":"2026-08-20T05:38:59","guid":{"rendered":"https:\/\/support.questetra.com\/?p=184522"},"modified":"2026-12-03T15:18:55","modified_gmt":"2026-12-03T06:18:55","slug":"auto-suggest-alt-leave-dates","status":"publish","type":"post","link":"https:\/\/support.questetra.com\/en\/learning\/auto-suggest-alt-leave-dates\/","title":{"rendered":"Building a Leave Request Workflow with Scripts (Alternative Date Suggestion)"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"58\" data-attachment-id=\"113212\" data-permalink=\"https:\/\/support.questetra.com\/en\/learning\/message-start-event-http-browser\/attachment\/professional-banner-new-en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/12\/professional-banner-new-en.png?fit=1200%2C68&amp;ssl=1\" data-orig-size=\"1200,68\" data-comments-opened=\"0\" data-image-title=\"professional-banner-new-en\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/12\/professional-banner-new-en.png?fit=1024%2C58&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/12\/professional-banner-new-en-1024x58.png?resize=1024%2C58&#038;ssl=1\" alt=\"\" class=\"wp-image-113212\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/12\/professional-banner-new-en.png?resize=1024%2C58&amp;ssl=1 1024w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/12\/professional-banner-new-en.png?resize=600%2C34&amp;ssl=1 600w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/12\/professional-banner-new-en.png?resize=768%2C44&amp;ssl=1 768w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/12\/professional-banner-new-en.png?w=1200&amp;ssl=1 1200w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In <a href=\"https:\/\/support.questetra.com\/en\/developer-blog\/debugging-leave-request-flow\/\" data-type=\"link\" data-id=\"https:\/\/support.questetra.com\/en\/developer-blog\/debugging-leave-request-flow\/\">a previous article<\/a>, the enhancement of a leave request workflow through a Script Task to automatically verify calendar availability prior to managerial review was explored.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The core logic was defined as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If the requested dates were available \u2192 proceed to approval<\/li>\n\n\n\n<li>If not \u2192 return the request to the user<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full has-custom-border\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"472\" height=\"317\" data-attachment-id=\"184552\" data-permalink=\"https:\/\/support.questetra.com\/en\/learning\/auto-suggest-alt-leave-dates\/attachment\/alternative-leave-dates-en-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-en-1.png?fit=472%2C317&amp;ssl=1\" data-orig-size=\"472,317\" data-comments-opened=\"0\" data-image-title=\"alternative-leave-dates-en-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-en-1.png?fit=472%2C317&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-en-1.png?resize=472%2C317&#038;ssl=1\" alt=\"\" class=\"has-border-color has-ast-global-color-8-border-color wp-image-184552\" style=\"border-width:5px\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-en-1.png?w=472&amp;ssl=1 472w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-en-1.png?resize=469%2C315&amp;ssl=1 469w\" sizes=\"auto, (max-width: 472px) 100vw, 472px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">While effective, this approach presented a usability constraint.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If a leave request was rejected because the dates were too busy, the requester still had to manually search for alternatives and resubmit the request themselves.<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">Could the workflow suggest alternative leave dates automatically?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The answer is yes &#8211; and the process of building it highlighted some interesting workflow design considerations along the way.<br><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Transitioning from Validation to Recommendation<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The original Script Task focused on a simple YES\/NO result:<\/p>\n\n\n<div class=\"wp-block-code\">\n\t<div class=\"cm-editor\">\n\t\t<div class=\"cm-scroller\">\n\t\t\t\n<pre>\n<code><div class=\"cm-line\">Availability: YES<\/div><div class=\"cm-line\"><\/div><div class=\"cm-line\">Availability: NO<\/div><\/code><\/pre>\n\t\t<\/div>\n\t<\/div>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">To improve the process, the workflow required the capacity to identify specific available dates when the requested period was blocked.<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">When requested dates are unavailable, alternative available dates must be identified.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The function of the Script Task was reclassified from:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A simple validation step<\/li>\n\n\n\n<li>to a lightweight recommendation engine<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>The First Attempt<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The original version of the workflow simply checked whether the requested leave dates were available.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the number of calendar events exceeded the defined threshold, the request was rejected and returned to the requester.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This method resulted in user friction.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A rejected requester would then need to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Manually search for alternative dates<\/li>\n\n\n\n<li>Guess which periods might be available<\/li>\n\n\n\n<li>Repeatedly resubmit requests until something worked<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The workflow could identify a problem, but it could not help solve it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A necessary improvement was identified:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Alternative leave periods should be <strong>suggested automatically<\/strong> rather than issuing a simple rejection.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Initial experimentation focused on suggesting individual dates; however, this was found to be ineffective for multi-day requests.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n<div class=\"wp-block-code\">\n\t<div class=\"cm-editor\">\n\t\t<div class=\"cm-scroller\">\n\t\t\t\n<pre>\n<code><div class=\"cm-line\">Requested leave:<\/div><div class=\"cm-line\"><\/div><div class=\"cm-line\">2026-06-01 \u2192 2026-06-14<\/div><\/code><\/pre>\n\t\t<\/div>\n\t<\/div>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Suggesting isolated single dates was not particularly useful, because the requester still needed a continuous leave period of the same duration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The workflow was subsequently updated to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Preserve the original leave length<\/li>\n\n\n\n<li>Search nearby periods<\/li>\n\n\n\n<li>Suggest complete alternative leave ranges instead<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n<div class=\"wp-block-code\">\n\t<div class=\"cm-editor\">\n\t\t<div class=\"cm-scroller\">\n\t\t\t\n<pre>\n<code><div class=\"cm-line\">Suggested alternative:<\/div><div class=\"cm-line\"><\/div><div class=\"cm-line\">2026-06-03 \u2192 2026-06-16<\/div><\/code><\/pre>\n\t\t<\/div>\n\t<\/div>\n<\/div>\n\n\n<figure class=\"wp-block-image aligncenter size-full has-custom-border\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"492\" data-attachment-id=\"184565\" data-permalink=\"https:\/\/support.questetra.com\/en\/learning\/auto-suggest-alt-leave-dates\/attachment\/alternative-leave-dates-en-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-en-2.png?fit=926%2C492&amp;ssl=1\" data-orig-size=\"926,492\" data-comments-opened=\"0\" data-image-title=\"alternative-leave-dates-en-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-en-2.png?fit=926%2C492&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-en-2.png?resize=926%2C492&#038;ssl=1\" alt=\"\" class=\"has-border-color has-ast-global-color-8-border-color wp-image-184565\" style=\"border-width:5px\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-en-2.png?w=926&amp;ssl=1 926w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-en-2.png?resize=593%2C315&amp;ssl=1 593w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-en-2.png?resize=768%2C408&amp;ssl=1 768w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The efficiency and practicality of the workflow from a user perspective were enhanced by these modifications.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instead of simply rejecting requests, the workflow could now actively help users find workable alternatives automatically.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Rethinking the Logic<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The initial script logic relied on multiple Google Calendar API requests\u2014specifically, one request for every candidate date.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That approach had limitations:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Unnecessary API calls<\/li>\n\n\n\n<li>Scaling issues for longer leave periods<\/li>\n\n\n\n<li>Difficulty handling continuous multi-day blocks<\/li>\n<\/ul>\n\n\n\n<p class=\"has-very-light-gray-background-color has-background wp-block-paragraph\">\nNote: Script Tasks are limited to 10 HTTP requests per automatic execution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The maximum HTTP request limit was frequently reached when individual calendar dates were checked sequentially.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The optimized version performs the following:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Retrieves calendar events once for the entire search window<\/li>\n\n\n\n<li>Counts events locally per day<\/li>\n\n\n\n<li>Tests candidate leave periods against the availability threshold<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">These changes resulted in a workflow that is:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>More efficient<\/li>\n\n\n\n<li>Easier to scale<\/li>\n\n\n\n<li>Better suited to longer leave requests<\/li>\n\n\n\n<li>Still effective for single day leave requests<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Searching Before and After the Requested Dates<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The expansion of the search range constituted a further design improvement.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The current workflow avoids limiting the search to dates following the requested period and instead:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Searches both before and after the requested dates<\/li>\n\n\n\n<li>Avoids suggesting dates in the past<\/li>\n\n\n\n<li>Avoids suggesting leave starting today<\/li>\n\n\n\n<li>Preserves the original leave duration<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n<div class=\"wp-block-code\">\n\t<div class=\"cm-editor\">\n\t\t<div class=\"cm-scroller\">\n\t\t\t\n<pre>\n<code><div class=\"cm-line\">Requested leave:<\/div><div class=\"cm-line\"><\/div><div class=\"cm-line\">2026-06-10 \u2192 2026-06-14<\/div><div class=\"cm-line\"><\/div><div class=\"cm-line\"><\/div><div class=\"cm-line\"><\/div><div class=\"cm-line\"><\/div><div class=\"cm-line\"><\/div><div class=\"cm-line\"><\/div><\/code><\/pre>\n\t\t<\/div>\n\t<\/div>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">A more practical user experience was established through these parameters.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The resulting script is in the code block below. <\/p>\n\n\n\n<div class=\"wp-block-coblocks-accordion\">\n<div class=\"wp-block-coblocks-accordion-item\"><details><summary class=\"wp-block-coblocks-accordion-item__title\">Script (click to open)<\/summary><div class=\"wp-block-coblocks-accordion-item__content\">\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>\n\/*\n * Questetra Script Task\n * Suggest alternative available leave periods\n *\n * Handles both:\n * - single-day leave requests\n * - multi-day leave requests\n *\n * Input:\n *   q_start_date\n *   q_end_date\n *\n * Output:\n *   q_suggested_dates  String \/ Text data item\n *\/\nconst CALENDAR_ID = \"INSERT_YOUR_CALENDAR_ID\";\nconst AUTH_SETTING_NAME = \"INSERT_YOUR_AUTH_SETTING_NAME\";\nconst THRESHOLD = 3;          \/\/ fewer than 3 events per day = available\nconst DAYS_BEFORE = 14;        \/\/ search up to 14 days before requested start date\nconst DAYS_AFTER = 30;         \/\/ search up to 30 days after requested start date\nconst MAX_SUGGESTIONS = 5;    \/\/ return up to 5 suggested periods\n\/\/ 1) Read dates\nconst startDate = engine.findDataByVarName(\"q_start_date\");\nconst endDate   = engine.findDataByVarName(\"q_end_date\");\nif (startDate === null || endDate === null) {\n  throw new Error(\"q_start_date or q_end_date is empty.\");\n}\n\/\/ 2) Helper functions\nfunction toJsDate(qDate) {\n  return new Date(qDate.toString() + \"T00:00:00+09:00\");\n}\nfunction formatDate(date) {\n  const y = date.getFullYear();\n  const m = (\"0\" + (date.getMonth() + 1)).slice(-2);\n  const d = (\"0\" + date.getDate()).slice(-2);\n  return y + \"-\" + m + \"-\" + d;\n}\nfunction addDays(date, days) {\n  const newDate = new Date(date.getTime());\n  newDate.setDate(newDate.getDate() + days);\n  return newDate;\n}\nfunction daysBetweenInclusive(start, end) {\n  return Math.round((end - start) \/ (1000 * 60 * 60 * 24)) + 1;\n}\nfunction isWeekend(date) {\n  const day = date.getDay();\n  return day === 0 || day === 6;\n}\n\/\/ 3) Convert requested dates\nconst requestedStart = toJsDate(startDate);\nconst requestedEnd   = toJsDate(endDate);\nif (requestedEnd < requestedStart) {\n  throw new Error(\"q_end_date is earlier than q_start_date.\");\n}\nconst leaveLengthDays = daysBetweenInclusive(requestedStart, requestedEnd);\n\/\/ 4) Decide search window\nconst MIN_ADVANCE_FOR_BACKWARD_SEARCH = 5;\nconst today = new Date();\ntoday.setHours(0, 0, 0, 0);\nconst earliestAllowedSuggestion = addDays(today, 1);\n\/\/ Only search backwards if the requested leave starts\n\/\/ at least MIN_ADVANCE_FOR_BACKWARD_SEARCH days from today\nconst thresholdDate =\n  addDays(today, MIN_ADVANCE_FOR_BACKWARD_SEARCH);\nlet searchStart;\nif (requestedStart >= thresholdDate) {\n  searchStart = addDays(requestedStart, -DAYS_BEFORE);\n  \/\/ Never suggest dates in the past\n  if (searchStart < earliestAllowedSuggestion) {\n    searchStart = earliestAllowedSuggestion;\n  }\n} else {\n  searchStart = requestedStart;\n}\n\/\/ Need to extend search end enough to fit a full replacement leave period\nconst latestCandidateStart = addDays(requestedStart, DAYS_AFTER);\nconst searchEnd = addDays(latestCandidateStart, leaveLengthDays - 1);\nengine.log(\"Requested leave length: \" + leaveLengthDays + \" day(s)\");\nengine.log(\"Search start: \" + formatDate(searchStart));\nengine.log(\"Search end: \" + formatDate(searchEnd));\n\/\/ 5) Fetch all events once for the whole search window\nconst timeMin = formatDate(searchStart) + \"T00:00:00+09:00\";\nconst timeMax = formatDate(searchEnd)   + \"T23:59:59+09:00\";\nconst url =\n  \"https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/\" +\n  encodeURIComponent(CALENDAR_ID) +\n  \"\/events\";\nconst authSetting = httpClient.findAuthSetting(AUTH_SETTING_NAME, false);\nlet request = httpClient.begin();\nrequest = request.authSetting(authSetting);\nrequest = request.queryParam(\"timeMin\", timeMin);\nrequest = request.queryParam(\"timeMax\", timeMax);\nrequest = request.queryParam(\"singleEvents\", \"true\");\nrequest = request.queryParam(\"orderBy\", \"startTime\");\nconst response = request.get(url);\nconst status = response.getStatusCode() + \"\";\nconst body = response.getResponseAsString() + \"\";\nengine.log(\"Calendar API status: \" + status);\nif (status !== \"200\") {\n  throw new Error(\"Google Calendar API error: \" + status + \"\\n\" + body);\n}\nconst json = JSON.parse(body);\nconst events = json.items || [];\nengine.log(\"Total events found: \" + events.length);\n\/\/ 6) Count events per day\nconst countsByDate = {};\nfunction incrementDateCount(dateString) {\n  if (!countsByDate[dateString]) {\n    countsByDate[dateString] = 0;\n  }\n  countsByDate[dateString]++;\n}\nfor (let i = 0; i < events.length; i++) {\n  const event = events[i];\n  let eventDate;\n  if (event.start &#038;&#038; event.start.date) {\n    eventDate = event.start.date;\n  } else if (event.start &#038;&#038; event.start.dateTime) {\n    eventDate = event.start.dateTime.substring(0, 10);\n  } else {\n    continue;\n  }\n  incrementDateCount(eventDate);\n}\n\/\/ 7) Check whether a candidate period is available\nfunction isPeriodAvailable(candidateStart, candidateEnd) {\n  let cursor = new Date(candidateStart.getTime());\n  while (cursor <= candidateEnd) {\n    const dateString = formatDate(cursor);\n    \/\/ Optional: reject leave periods that include weekends\n    if (isWeekend(cursor)) {\n      return false;\n    }\n    const count = countsByDate[dateString] || 0;\n    if (count >= THRESHOLD) {\n      return false;\n    }\n    cursor = addDays(cursor, 1);\n  }\n  return true;\n}\n\/\/ 8) Search candidate leave periods\nconst suggestions = [];\nconst candidateStartEnd = latestCandidateStart;\nlet candidateStart = new Date(searchStart.getTime());\nwhile (candidateStart <= candidateStartEnd) {\n  const candidateEnd = addDays(candidateStart, leaveLengthDays - 1);\n  if (isPeriodAvailable(candidateStart, candidateEnd)) {\n    if (leaveLengthDays === 1) {\n      suggestions.push(formatDate(candidateStart));\n    } else {\n      suggestions.push(formatDate(candidateStart) + \" to \" + formatDate(candidateEnd));\n    }\n  }\n  if (suggestions.length >= MAX_SUGGESTIONS) {\n    break;\n  }\n  candidateStart = addDays(candidateStart, 1);\n}\n\/\/ 9) Save suggested dates\nlet outputText;\nif (suggestions.length === 0) {\n  outputText =\n    \"No available leave periods found between \" +\n    formatDate(searchStart) + \" and \" + formatDate(searchEnd) + \".\";\n} else {\n  outputText =\n    \"Suggested available leave periods:\\n- \" +\n    suggestions.join(\"\\n- \");\n}\nengine.setDataByVarName(\"q_suggested_dates\", outputText);\nengine.log(outputText);\n<\/code><\/pre><\/div>\n<\/div><\/details><\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The article is intended for both technical and non-technical audiences to demonstrate the utility of the provided script regardless of programming expertise. In instances where ECMA script is not understood, the code may be integrated into a workflow platform for evaluation. If execution failures occur, processing logs may be analyzed via artificial intelligence to identify underlying issues.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Workflow Design Perspective<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The workflow utility was increased while maintaining structural clarity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The structure utilizes two Script Tasks situated around a Gateway:<\/p>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><pre><code>Enter Leave Dates\n\n\u2193\n\nCheck Availability\n\n\u2193\n\nGateway\n\n\u251c\u2500 Available \u2192 Manager Approval  \n\u2514\u2500 Unavailable \u2192 Suggest Alternative Dates \u2192 Return to Requester\n<\/code><\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The first Script Task checks whether the requested leave period is available.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Gateway then controls the flow based on that result.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If dates are unavailable, the second Script Task identifies alternative periods and records the suggestions in the corresponding data item.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Two automated logic points are now present in the process:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>One for <strong>checking availability<\/strong><\/li>\n\n\n\n<li>One for <strong>suggesting alternatives<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This separation is beneficial for workflow design. Responsibilities are clearly defined for each Script Task, and the Gateway routes the process according to the availability outcome.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">System capability is increased while maintaining ease of comprehension due to the specialized purpose of each component.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>A Quick Note on Script Development and Troubleshooting<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The development of workflow automation involving AI-assisted scripting is frequently an iterative process.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The final script required multiple stages of refinement before achieving its current form.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following challenges were addressed:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Authentication issues<\/li>\n\n\n\n<li>API request problems<\/li>\n\n\n\n<li>Logic refinements<\/li>\n\n\n\n<li>Edge cases around date ranges<\/li>\n\n\n\n<li>Several rounds of testing and adjustment<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">In particular, moving from simple availability checking to suggesting complete alternative leave periods required several changes to the script structure and search logic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This iterative process provided significant value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">AI-generated code was treated as a tool for rapid prototyping and troubleshooting rather than a finished product.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Collaborative development<\/li>\n\n\n\n<li>Rapid prototyping<\/li>\n\n\n\n<li>Technical troubleshooting<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Workflow design and implementation were refined through each development cycle.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Troubleshooting experiences were detailed in a prior publication regarding calendar check scripts in Questetra BPM Suite.<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><em>From <a href=\"https:\/\/support.questetra.com\/en\/developer-blog\/debugging-leave-request-flow\/\">Building a Leave Request Workflow with Scripts (Calendar Verification)<\/a><\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That documentation may serve as a reference for the trial-and-error process involved in building similar integrations with Script Tasks and APIs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Technical debugging time may be reduced by reviewing the aforementioned documentation.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Summary<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A standard leave request workflow was transformed into a dynamic system featuring:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Automatic availability checking<\/li>\n\n\n\n<li>Calendar integration<\/li>\n\n\n\n<li>Alternative leave suggestions<\/li>\n\n\n\n<li>Adaptive process routing<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">But importantly:<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">The workflow maintains structural clarity<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Functional complexity is managed within the automation layer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A primary benefit of this design is that:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Processes remain clear for all users<\/li>\n\n\n\n<li>Complexity is handled autonomously by the background system<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This implementation results in a reduction of rejected leave requests and an overall improvement in operational efficiency.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Articles in This Series<\/strong><\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/support.questetra.com\/en\/developer-blog\/smart-leave-request-workflow\/\">Building a Leave Request Workflow with Scripts (Overview)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/support.questetra.com\/en\/developer-blog\/debugging-leave-request-flow\/\">Building a Leave Request Workflow with Scripts (Calendar Verification)<\/a><\/li>\n\n\n\n<li>Building a Leave Request Workflow with Scripts (Alternative Date Suggestion) (this article)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, the Leave Request Workflow is enhanced to give requesters alternative suggested dates in the event of a rejection. <\/p>\n","protected":false},"author":30,"featured_media":184536,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_uag_custom_page_level_css":"","advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","jetpack_seo_llms_txt_always_include":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"{title}\n\n{excerpt}\n\n{url}","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[5722],"tags":[],"faq_section":[],"class_list":["post-184522","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-learning"],"jetpack_publicize_connections":[],"uagb_featured_image_src":{"full":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?fit=1536%2C1024&ssl=1",1536,1024,false],"thumbnail":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?resize=440%2C440&ssl=1",440,440,true],"medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?fit=473%2C315&ssl=1",473,315,true],"medium_large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?fit=768%2C512&ssl=1",768,512,true],"large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?fit=945%2C630&ssl=1",945,630,true],"1536x1536":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?fit=1536%2C1024&ssl=1",1536,1024,true],"2048x2048":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?fit=1536%2C1024&ssl=1",1536,1024,true],"newspack-article-block-landscape-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?resize=1200%2C900&ssl=1",1200,900,true],"newspack-article-block-portrait-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?resize=900%2C1024&ssl=1",900,1024,true],"newspack-article-block-square-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?resize=1200%2C1024&ssl=1",1200,1024,true],"newspack-article-block-landscape-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?resize=800%2C600&ssl=1",800,600,true],"newspack-article-block-portrait-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?resize=600%2C800&ssl=1",600,800,true],"newspack-article-block-square-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?resize=800%2C800&ssl=1",800,800,true],"newspack-article-block-landscape-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?resize=600%2C450&ssl=1",600,450,true],"newspack-article-block-portrait-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?resize=450%2C600&ssl=1",450,600,true],"newspack-article-block-square-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?resize=600%2C600&ssl=1",600,600,true],"newspack-article-block-landscape-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?resize=400%2C300&ssl=1",400,300,true],"newspack-article-block-portrait-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?resize=300%2C400&ssl=1",300,400,true],"newspack-article-block-square-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?resize=400%2C400&ssl=1",400,400,true],"newspack-article-block-landscape-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?resize=200%2C150&ssl=1",200,150,true],"newspack-article-block-portrait-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?resize=150%2C200&ssl=1",150,200,true],"newspack-article-block-square-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?resize=200%2C200&ssl=1",200,200,true],"newspack-article-block-uncropped":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?fit=1200%2C800&ssl=1",1200,800,true]},"uagb_author_info":{"display_name":"Peter Glover","author_link":"https:\/\/support.questetra.com\/en\/author\/petergloverquestetra\/"},"uagb_comment_info":0,"uagb_excerpt":"In this article, the Leave Request Workflow is enhanced to give requesters alternative suggested dates in the event of a rejection.","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9DiIh-M0a","jetpack-related-posts":[{"id":183271,"url":"https:\/\/support.questetra.com\/en\/learning\/smart-leave-request-workflow\/","url_meta":{"origin":184522,"position":0},"title":"Building a Leave Request Workflow with Scripts (Overview)","author":"Peter Glover","date":"2026-08-13","format":false,"excerpt":"In this article, I\u2019ll walk through how to design a smart Leave Request Workflow, using standard BPMN icons and a small amount of coding, that leaves menial checks to auto steps so that users can focus on the most important decisions.","rel":"","context":"In &quot;Learning&quot;","block_context":{"text":"Learning","link":"https:\/\/support.questetra.com\/en\/category\/learning\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/04\/smart-leave-request-workflow-fi-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/04\/smart-leave-request-workflow-fi-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/04\/smart-leave-request-workflow-fi-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/04\/smart-leave-request-workflow-fi-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/04\/smart-leave-request-workflow-fi-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":183996,"url":"https:\/\/support.questetra.com\/en\/learning\/debugging-leave-request-flow\/","url_meta":{"origin":184522,"position":1},"title":"Building a Leave Request Workflow with Scripts (Calendar Verification)","author":"Peter Glover","date":"2026-08-13","format":false,"excerpt":"This article outlines the methodology for developing a functional solution, and identifies critical technical considerations when creating workflows using auto-steps and APIs.","rel":"","context":"In &quot;Learning&quot;","block_context":{"text":"Learning","link":"https:\/\/support.questetra.com\/en\/category\/learning\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/smart-leave-request-workflow2-fi-en.png?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/smart-leave-request-workflow2-fi-en.png?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/smart-leave-request-workflow2-fi-en.png?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/smart-leave-request-workflow2-fi-en.png?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/smart-leave-request-workflow2-fi-en.png?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":97133,"url":"https:\/\/support.questetra.com\/en\/learning\/outlook-powerautomate-questetra\/","url_meta":{"origin":184522,"position":2},"title":"How to Start Cloud BPM Workflow Questetra Operations from Outlook Scheduler (Microsoft Power Automate integration\/API integration)","author":"Tsuyoshi Kusaka","date":"2020-10-28","format":false,"excerpt":"Summarized the settings for linking the Outlook calendar and Questetra using PowerAutomate, and with API","rel":"","context":"In &quot;Learning&quot;","block_context":{"text":"Learning","link":"https:\/\/support.questetra.com\/en\/category\/learning\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/PowerAutomate-Questetra-eyecatch-1.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/PowerAutomate-Questetra-eyecatch-1.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/PowerAutomate-Questetra-eyecatch-1.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/PowerAutomate-Questetra-eyecatch-1.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/PowerAutomate-Questetra-eyecatch-1.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":159487,"url":"https:\/\/support.questetra.com\/en\/templates\/general-purpose-request-unified-input-guide-20211111\/","url_meta":{"origin":184522,"position":3},"title":"General Purpose Request Workflow","author":"furuzo","date":"2024-04-01","format":false,"excerpt":"This is a general purpose business application and approval workflow for nursing care leave notification, leave of absence notification, business card creation, etc. Templates of application contents are automatically set according to the application work. The administrative department can manage various types of applications together.","rel":"","context":"In &quot;Workflow Apps&quot;","block_context":{"text":"Workflow Apps","link":"https:\/\/support.questetra.com\/en\/category\/templates\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/04\/eyecatch-general-purpose-request-unified-input-guide-20211111-en.png?fit=960%2C540&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/04\/eyecatch-general-purpose-request-unified-input-guide-20211111-en.png?fit=960%2C540&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/04\/eyecatch-general-purpose-request-unified-input-guide-20211111-en.png?fit=960%2C540&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/04\/eyecatch-general-purpose-request-unified-input-guide-20211111-en.png?fit=960%2C540&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":97078,"url":"https:\/\/support.questetra.com\/en\/learning\/how-to-add-an-event-to-an-outlook-calendar-from-the-cloud-bpm-workflow-questetra-api-integration-setup-procedure\/","url_meta":{"origin":184522,"position":4},"title":"How to Add an Event to an Outlook Calendar from the Cloud BPM Workflow Questetra (API Integration Setup Procedure)","author":"Peter Glover","date":"2020-10-28","format":false,"excerpt":"Summary of settings for linking Questetra BPM Suite and Outlook calendar","rel":"","context":"In &quot;Learning&quot;","block_context":{"text":"Learning","link":"https:\/\/support.questetra.com\/en\/category\/learning\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/Outlook-Questetra-eyecatch.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/Outlook-Questetra-eyecatch.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/Outlook-Questetra-eyecatch.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/Outlook-Questetra-eyecatch.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/Outlook-Questetra-eyecatch.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":77675,"url":"https:\/\/support.questetra.com\/en\/templates\/translation-time-measurement-20160627\/","url_meta":{"origin":184522,"position":5},"title":"Translation-Time Measurement","author":"Hirotaka NISHI","date":"2021-02-22","format":false,"excerpt":"Translates the text of the manuscript. The sentences entered in [1 Translation request] will be delivered to the translator. On the Operating screen of [2 Translation work], scripts that are for measuring the working time by the stopwatch button and for counting the number of input characters have been set,\u2026","rel":"","context":"In &quot;\u30ef\u30fc\u30af\u30d5\u30ed\u30fc \u30a2\u30d7\u30ea&quot;","block_context":{"text":"\u30ef\u30fc\u30af\u30d5\u30ed\u30fc \u30a2\u30d7\u30ea","link":"https:\/\/support.questetra.com\/ja\/category\/templates\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/07\/eye-catch-translation-time-measurement-20160627-220-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/07\/eye-catch-translation-time-measurement-20160627-220-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/07\/eye-catch-translation-time-measurement-20160627-220-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/07\/eye-catch-translation-time-measurement-20160627-220-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/07\/eye-catch-translation-time-measurement-20160627-220-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2026\/05\/alternative-leave-dates-fi-en.png?fit=1536%2C1024&ssl=1","_links":{"self":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/184522","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/users\/30"}],"replies":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/comments?post=184522"}],"version-history":[{"count":55,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/184522\/revisions"}],"predecessor-version":[{"id":201673,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/184522\/revisions\/201673"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media\/184536"}],"wp:attachment":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media?parent=184522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/categories?post=184522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/tags?post=184522"},{"taxonomy":"faq_section","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/faq_section?post=184522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}