Display case details within content
Sometimes it may be useful to pull in data from a CXM case to display in page or form instructions, or on the complete page of the form.
It is possible to do this using two advanced features of XFP, Logic and Variables.
Example: Showing the current case status in page instructions
We have created a form in XFP for renewing a subscription. The subscription in question is managed by a CXM case. At the beginning of the XFP form, we ask the customer for their case reference.
On page 2, we would like to tell the customer the current status of their case. We can use a combination of variables and logic achieve this.
Step 1: Create a logic formula
In your form, click Advanced > Logic in the top navigation bar (under the the form title).
Click Add Logic.
You will be taken to the logic designer, where you can build your logic.
Give your logic a name, 'Current Case Status'.
Choose Predefined as the type.
Choose CXM - Status of a specific case from the appearing list.
Set the inputs to the formula. CXM Case Reference will be our case reference form question. Leave Run as signed in user set to 'Yes'.
Click Save to create the logic.
Step 2: Use the variable in the instructions
In your form, click Pages in the top navigation bar (under the the form title).
In the form structure, click on the title of Page 2.
The page details interface will open.
Add the text 'Your subscription is currently: ', and then use the variable picker to insert the value of Logic - Current Case Status.
Test the form - you will see the status of your case displayed in the instructions of page 2.