Jadu CXM: Connect your XFP form to your CXM Case (Task 4)

This is the fourth of nine tasks for setting up your XFP forms to work with CXM. Please go to the Self-Help Guide, under the Configure a CXM Workflow column, for more information.

In order for your subsequent form(s) to pull in data from the CXM case submission, the form needs to know which CXM case to connect to. This is accomplished through the use of an integrated component that reads the case number and access code from the emailed URL used to access the form.

It is important to verify that the access code is valid and that the case is not already in a final status before displaying CXM case data to the user and allowing the form to be submitted. Doing so prevents users from re-submitting a form is already completed or finalized.

Note: The following steps are completed in XFP in the subsequent form for your workflow process.

Step 1: Pulling CXM Case Information into an XFP Landing Page

The term landing page is used in this article and throughout the Self-Help Guide to describe the first page an end-user sees when they enter a form.

  1. Create a landing page template and add it to your form structure if you don't already have one. This landing page should be the first page in your form, and should not have any other fields on it.
    • Optional: You may wish to display instructions on your landing page when a user enters the form.
      • Note: The use of the form-level Show instructions page toggle in Jadu is not supported when integrating with CXM, but you may choose to add instructions within a page template
  2. Add the UMN - CXM - Existing Case integrated component to your landing page.
    • This integrated component pulls in basic case information used to verify access to the case and its current status.
      jadu xfp integrated component question with text fields complete. UMN - CXM Existing case highlighted under Type. The integrated component display view shown.


Step 2: Creating an Access Failure Page 

The access code created by your first form is encrypted and sent via email in the Next Form URL. Completing the following steps checks the access code used in the URL against the CXM case and prevents a user from proceeding if the access code is not valid or if the case is already in a final status. Create an Access Failure page template to display to users who receive an error. In this article, this template is referred to as the Access Failure page, but you may name your page differently if you wish.

  1. From the Pages tab, click Add page.
  2. Click the Edit link to go to the page template.
    jadu%20xfp%20access%20failure%20page%20template%20edit.pngx
    1. Turn on the Show instructions toggle.
    2. Edit the instructions that you want users to see if the access code validation fails.
      Access Failure page with sample instructions: Stop. You either do not have access to fill out this form or it has already been filled out...
    3. After placing your cursor at the end of your instructions on a new line, click the Snippet icon in the text editor.
      Sample page text with the snippet icon highlighted. In the body of text: place cursor after all instruction text before inserting the snippet
    4. Copy and paste the following code into the Snippet box and click OK.
      • Notes: 
        • Adding this code hides the Next button on the page so that the user cannot continue into the form.
        • Remove the *** after pasting.

          <***script type="text/javascript">

              function hideNextButton() 

              {

                  var button = document.querySelector('[type=submit]');

                  button.disabled = true;

                  button.style.display = "none";

                  return;

              }

            window.onload = hideNextButton;

          <***/script> 

    5. A placeholder box inserts into the instructions. Click Save.
      Instructions page holder highlighted with text "This represents the script you just inserted using the snippet icon. This will not be visible by end users"
  3. Add the new Access Failure page template to your form structure as a branch from the Landing page.
    • Note: If the page is already on the form structure, remove and re-add it. Javascript changes won't take effect until this is done.
  4. Set the Landing page to branch to the Access Failure page. Branching Rule:
    1. When Question Case Access Code is not equal to Yes
    2. Or Question Case Status Type is equal to final
    3. Then Branch to Access Failure
    4. Click Save.
      Page branching options with branch selections When, Or, and Then highlighted.

Next Task in Setting up your XFP Forms to Work with CXM

Task 5: Pull CXM Case Data into a Subsequent Form