Once you’ve installed FuseDesk’s free WordPress plugin, you can enable your logged in users/members to view their cases using the [fusedesk_mycases] shortcode on a page.

This will display a table of cases.

[fusedesk_mycases] works perfectly by itself, but also supports the following optional parameters:

  • columns: A comma delimited list of which columns to show. Choose from casenum, date_updated, date_opened, date_closed, status, summary, details. Defaults to “casenum,date_updated,status,summary
  • status: Filter for which case statuses to show. Options are newactiveopen, and closed. If blank, defaults to All Cases.
  • userstatuses: Filter for which case statuses you allow a user to set with the casestatus query paramater. Expects a CSV with none to any of newactiveopen, and closed. If not set, defaults to any valid status. Setting this restriction allows you to prevent users from viewing certain cases statuses like closed cases, for example.
  • limit: How many cases (max) to display. Defaults to 50
  • orderby: How to sort your cases. Expects a CSV of date and order pairs, i.e. date_lastresponse desc, or date_opened asc Defaults to date_lastresponse asc, date_updated asc
  • dateformat: How to format your dates. Accepts PHP’s date formatting. Defaults to M j, Y g:ia
  • errornotloggedin: What message to show to customers who aren’t logged in (since we won’t be able to show cases to anyone who’s not logged in. Defaults to “Please login to view your cases.” It is highly recommended that you add only put this code on pages visible to logged in users only.
  • errornocases: What message to show to customers where they don’t have any cases. Defaults to “Looks like you don't have any support cases!
  • {columnName}_name: What to title a given column (see columns above). For example, to change the column name for casenum to Request #, use casenum_name="Request #".

For example, to use many of the above options, try:

[fusedesk_mycases columns="casenum, status, date_opened" status="active" limit="10" orderby="date_lastresponse desc, date_opened asc" dateformat="M d" errornocases="Hooray, you don't have any active requests!" casenum_name="Request #" date_opened_name="Start Date" /]

Filtering with Query Params

You can allow members to filter cases using a query param of casestatus. For example, link to your My Cases page with casestatus=new in the query string to filter just for new cases. The case status must be one of the allowed statuses from userstatuses above.

You can allow members to filter cases by dates, too. We’ll check for any of the following in the query string and expect a valid parsable PHP date, which includes relative dates like “-30 days”: date_opened_beforedate_opened_afterdate_closed_beforedate_closed_afterdate_updated_beforedate_updated_after.

For example, to search for cases opened in the last 30 days, put date_opened_after=-30 days in your query string.