The capabilities described on this page are included in Appian's advanced and premium capability tiers. Usage limits may apply. |
This page provides brief descriptions of different ways to use data in both data fields and record fields in your case management apps, as well as guidance and resources on when and how to use the different methods.
The page also provides a more detailed overview of the steps to relate record types to your case management apps and provide an example of how you might use that data in your case management forms, workflows, and automation rules.
Methods for adding data to case management appsCopy link to clipboard
When designing and improving your case management apps, you may want to expand your data model by including additional data, record fields, and related record data. There are multiple ways to do this depending on the data you need and the way you want to bring it in.
The table below provides different methods you can use to expand your data model, information on when to use them, and links to guidance on how to use them.
Method | When to use | How to use |
---|---|---|
Add data fields in Studio | Use when you want to add simple, new data fields to your cases, case types, and case categories. | You can easily add data fields directly from Studio. Learn more about adding data fields to cases, case categories, and case types in Studio and adding additional data fields to forms in Studio |
Add related data | Use when you want to bring in data from existing record types or create new record types to capture data related to your case management workflows and processes. | Keep reading this page to learn more about adding and using related record data in your case management app. |
Add data to base CMGT record types |
Use when you want to add custom fields, additional record fields, or record type functionality not supported in Studio. | You can create additional or custom fields in the out-of-the-box case management record types, such as CMGT_Case and CMGT_Task record types, just like any other record types in Designer. Learn more about adding fields to record types and creating custom record fields. |
How to relate an existing record type to the Case record typeCopy link to clipboard
A common way to expand the data model for your case management app is to either bring in data from existing record types or create new record types. Being able to use and relate existing data in your record types with case management apps allows you to capture data related to your workflows, be more flexible, and address more complex use cases.
For example, in a customer care app, you might need to create a workflow to allow a case worker to submit a request to update information in one or more customer accounts, which would need to be approved by the case manager or customer(s). The case record type would be related to an existing Customer Account record type that exists outside of case management.
To update the Customer Account data within a case, you would need to design the case intake form in a way that allows for the user to edit the data in the Customer Account record type, as well as data for the case. To do this, we'll need to reference the relevant data fields from the Customer Account record type in the intake form for the case type and be able to write the updated data to the Customer Account record type.
To relate the existing Customer Account record type to a case management workflow, you will:
- Relate the Customer Account record type to the Case record type using record type relationships.
- Add the relevant data fields from the Customer Account record type to the interface for the intake form for case type using the new record type relationship.
If you want to create a new record type instead of using an existing record type, the steps to set up a relationship are the same.
Relating a record type and Case record typeCopy link to clipboard
First, you need to set up a relationship between the Customer Account record type and the Case record type.
To set up the relationship:
- In Designer, find and open the
CMGT_Case
record type in theCMGT Case Management Studio Base
app. Note, this is not the record type for the case type. - In the RELATIONSHIPS section of the Data Model page, click ADD RELATIONSHIP.
- Enter the name of the record type you want to set up a relationship to. In this example, it’s the Customer Account record type.
- Click NEXT.
- Select the relationship type that best fits your use case. For this example, select the Many to One (M:1) relationship type.
- Select the fields to use as common fields in your relationship. This is usually a primary key ID field. In this example, use the
customerId
field. - In the Write and Delete Related Records field, you can determine whether or not you want to write the data automatically when modifying cases.
- Selecting Write or delete… automatically updates record writes and queries for you.
Below is an example of the data structure and relationship between the Customer Account and Case record types:
Add related data fields to the intake formCopy link to clipboard
After you have your record type relationships set up, you need to add the relevant data fields from the Customer Account record type to the intake form for your case type.
To add data fields to the interface for an intake form:
- In Studio, open the case type you want to configure and click Intake Form.
- Click Create Intake Form and add data fields from your case type. You’ll add data fields from the related record type in the interface for this form in the next step.
- In Designer, find and open the interface for the intake form. All interfaces generated by Studio are in the CMGT Studio Generated Object application by default. The name for intake form interfaces may be long or resemble something like:
CMGT_Category_Customer_Account_Support_Type_Update_Customer_IntakeForm
. - Customize the interface for the intake form to reference the fields from the related record type through the relationship to the Case record type. For this example, add components for the following fields from the Customer Account record type:
- Customer contact
- Contact phone number
- Contact email
- Customer address
- Customer region
- Make sure the fields you add have references to the relevant related record fields.
- Click SAVE CHANGES.
Below is an image of what an intake form for this example might look like, with annotations to highlight which fields are from the case type and which are from the related record type.
Use related data in automation rules and task assignmentCopy link to clipboard
Another helpful way to use data from related record types is in automation rules for case assignment and in the advanced configurations for conditional task assignments. Both automation rules and the rules within task assignments have triggers and conditions that allow you to perform an action based on the results of a data field from Studio or a record field from a related record type.
In our customer care app example, an automation rule based on a related record field might look like re-assigning the case to a new group if the customer changes to a new region. For instance, if the customer region changes from North East to South East, you would want to change the group assigned to handle the case to the correct region; the South East region. As you know from the example above, the customer region is a record field in the Customer Account related record type.
Note: In this example, the customer region record field is a choice list field with choices for each different customer region.
There are different steps to set up the app so that the related record fields can be used in automation rules and task assignment configurations depending on the type of relationship you have set up between your record types.
For many-to-one record type relationships, the related record fields automatically appear in Studio and are ready to use in your automation rules and task assignments with no extra steps required. In the example on this page, we set up a many-to-one record type relationship, so if you are following along with the example, you can skip down to the instructions on configuring an automation rule.
For one-to-one and one-to-many record type relationships, you need to create an expression rule to specify which related record fields you want to appear in Studio before you can configure an automation rule or task assignment.
Create expression rules to specify related record fieldsCopy link to clipboard
Before you can create the expression rules that do the heavy lifting of getting your related record fields into automation rules and case assignments, you need to double check your record type configurations. Make sure that your foreign key fields and relationships are set up correctly using the instructions outlined above.
When you're sure everything is set up correctly, you're going to create an expression rule to specify which related record fields you want to be able to use when configuring case assignment automation rules and task assignments. There are two sets of instructions for these expression rules, one for one-to-one relationships and one for one-to-many relationships.
Create an expression rule for a one-to-one relationshipCopy link to clipboard
To create an expression rule to pull in your related record fields into automation rules and task assignment for a one-to-one record type relationship:
- In Designer, open the
CMGT Base App
and find theCMGT_AUTO_EVAL_AvailableFieldCustomizations_Role
expression rule. - Duplicate the expression rule.
- In the newly duplicated expression rule, add the following fields and values to the map in the expression:
Field | Description of the value to add |
---|---|
recordTypeUuid | The UUID of the related record type. |
recordType | The reference to the related record type. Formatted using recordType! |
relationship | The reference to the relationship name for the relationship from the CMGT_Case record type. Formatted using recordType!CMGT Case.relationships.<Relationship Name> . |
recordCaseField | The record type field reference to the caseId field on the related record type. |
fieldUuidsToReject | A list of the UUIDs for the related record fields that you don't want to make available in the automation rules and task assignments. |
customFieldsToAdd | This field only needs a value for a one-to-many relationship, but be sure not to remove this key as it may cause errors in the rules dependents. Set the value to a blank array {} . |
Create an expression rule for a one-to-many relationshipCopy link to clipboard
To create an expression rule to pull in your related record fields into automation rules and task assignment for a one-to-many record type relationship:
- In Designer, open the
CMGT Base App
and find theCMGT_AUTO_EVAL_AvailableFieldCustomizations_Role
expression rule. - Duplicate the expression rule.
Field | Description of the value to add |
---|---|
recordTypeUuid | The UUID of the related record type. |
recordType | The reference to the related record type. Formatted using recordType! |
relationship | The reference to the relationship name for the relationship from the CMGT_Case record type. Formatted using recordType!CMGT Case.relationships.<Relationship Name> . |
recordCaseField | The record type field reference to the caseId field on the related record type. |
fieldUuidsToReject | A list of the UUIDs for the related record fields that you don't want to make available in the automation rules and task assignments. |
customFieldsToAdd | A map that specifies each of the fields you want to return. See the table below for a full list of the map values. |
Custom fields map
Field | Description of the value to add |
---|---|
fieldUuid | The UUID of the record field you want to return. |
customFieldCode | A unique code used to determine the record field you want to evaluate when the CMGT_EVAL_EvaluateConditionDynamic expression rule is evaluated. See note below for more information. |
displayName | The name for the record field that you want to show in the Field dropdowns for automation rules and task assignment configurations. |
relationshipType | ONE_TO_MANY |
type | The Appian data type of the record field. If the field references another record, then it should be formatted as a record type field reference. |
relationshipUuids | The UUID for the relationship between the record type and the GMGT Case record type. |
relationship | The reference to the relationship name for the relationship from the CMGT Case record type. Formatted using recordType!CMGT Case.relationships.<Relationship Name> . |
extraConfigurations | (Optional) A map to set up additional filtering on the record fields that you're returning. The map contains the values below. |
Extra configurations map fields and values
Field | Description of the value to add |
---|---|
evaluation | A map that contains filters that are applied during the evaluation of the conditions. |
configurations | A map that includes any additional configurations for a record field. These additional configurations are shown when configuring a condition that includes that record field in an automation rule or task assignment. |
Note on custom field codesCopy link to clipboard
The customFieldCode
field should only be used if you are using and referencing the same record field multiple times in the same use case, but to refer to different things. For example, say you wanted to use the same record field to show a field labeled Case Watchers in one place and Case Assignees in another place. If you were referencing that record field multiple times in one expression rule, you would need to show a unique identifier to distinguish between the two uses. This is when you would create and use a customFieldCode
, the value of which might be something like the display name for each use of the record field in all caps with an additional symbol, like an underscore.
Create an automation rule using related dataCopy link to clipboard
Now, you can start configuring your automation rules or task assignments with the related record fields you want in Studio. For those following the customer care app example, use the instructions below to create an automation rule for case re-assignment based on the customer region field.
To use a related record field in an automation rule:
- In Studio, open the case type you want to configure and click Automation Rules.
- Click + Create Rule.
- Configure the trigger for your automation rule. For this example,
- In the When does this rule evaluate? field, select Case field is updated.
- For Field, select the Customer Region field.
- Click NEXT.
- Optionally configure Conditions for your automation rule. For this example,
- For Field, select the Customer Region field.
- For Operator, select Equal to.
- For Value, select South East.
- Click NEXT.
- Under Action, select an Action. For this example, select Reassign Case.
- Select an Assignee Type. For this example, select Group.
- Select a Group to re-assign the task to. For this example, select Case Managers - South East.
- Select a Routing Type. For this example, select any routing type you want.
- Click NEXT.
- Click CREATE.
To cover all the customer regions in this example, you'd create an automation rule like the one above for each region.
The steps for setting up advanced configurations for task assignment are similar those for configuring automation rules. You can use the steps above as a reference or learn more about configuring tasks and task assignments.