Skip to main content
Kinetic Community

Save for Later Example

Import Files
Service Item Save for Later Example
KURL Save for Later Example
Filter Save for Later Def
Attached is an example of Save for Later functionality. This is common when customers want to "save" a request without completing it. It isn't something that is available out of the box in Kinetic Request, but is fairly easy to implement. Many thanks to Linda for the template this example is based upon.

Description

There are a few steps that need to be done to implement Save for later.

  • Create a button that will be used to start the Save for Later process.
  • Create a hidden question that tracks whether the above button has been clicked.
  • On click of the Save for Later button, javascript (custom event) will set all required questions to optional, set the hidden question to a value indicating you are using the Save for Later process, and then submit the page.
  • Add a dummy or placeholder page that the process can go to if the Save for Later button is pressed. Use Page Branching (based on the hidden question described above) to decide if you go to the dummy page or continue processing the service item normally.
  • Add a redirect to the dummy page, so it automatically sends the customer to a pre-defined page like the catalog portal or static intranet page.

Lastly, you need a way for the customer to get back into the request they have saved for later.

The easiest way to acomplish this is to make the service item require autherntication and then the link will show up in the web portal as "In Progress".

To have the service item open to the correct page you have two choices, Remedy workflow or custom javascript/URL parameter.

Remedy Workflow - You need to create a filter in the guide called KS_SRV_CustSurveyResultsJoin_RunCustomLogic - this guide is called everytime a page is submitted in both Kinetic Survey and Kinetic Request. The Run If statement needs to identify the specific service item, and check the answer to the hidden field that identifies if this request has been "Saved for Later". The action is Set Fields and sets the PageInstanceId to NULL, and sets the LookupValueId field with the customer survey instance id (this is the instance Id field from the KS_SRV_CustomerSurvey_base record). By setting the PageInstanceId to NULL, the request will open to the first page of the request. Setting the LookupValueId automatically fills the questions with any answers that were completed.

Javascript/URL Parameter - If you don't set the PageINstanceId to NULL, the request will automatically open to the last page submitted - unfortunately this is the Dummy page that just has the redirect. To get around landing on this page, you can pass a URL parameter to the page that tells it not to redirect, but rather to go back to the last pag that was submitted. This is done by clicking the "back" button. The application is smart enough to know what the last page visited was, and send you there. Workflow behind the scenes will fill in any answers, just like pressing the back button when cmpleting the request normally.

The attached service item demonstrates the steps described above. Both the Remedy Workflow option and the Javascript/URL Parameter are both included. If you import the Remedy filter, and want to use the URL Parameter option, you must disable the filter (it is set to disabled as default).

 

Implementation details for the service item:

  • Save for Later button - Text Element - Park button
  • Hidden Question - Page 1 (Initial Page) wrk Save For Later Sw, Page 2 (Content) - wrk Save For Later Sw
  • Javascript to set Optional, set Hidden question, and submit - Advanced Tab, CustomHeaderContent field, functions setOptional and savForLaterPage
  • Dummy Page - Page 3 - Dummy Page, page branching is on page 1 and 2
  • Redirect - On the dummy page, set as a click event on a button so it is easier to see, should be moved to a load event
  • Remedy Workflow - +KS_SRV_CustSurvResultJoin_SaveForLaterExample, the survey template instance id is used in the Run If, so if you clone the service item for yourself, you need to do a save as on the filter and update the instance id
  • Javascript/URL Parameter - the parameter to add is &return=yes (this will likely be a customization of the launcher or web portal that you are using), the javascript is in the Advanced Tab, CustomHeaderContent field, functions getParameter and clickBackButton