Working with Data in Appian

Overview

Appian makes it easy to access, combine, and take action on your enterprise data so you can build powerful applications quickly and efficiently. Using one or more of our data objects, you can seamlessly unify your enterprise data—regardless of where it lives.

The most common way to work with data in Appian is using record types. The record type object allows you to easily connect to business data–whether it’s in a database, process model, Salesforce, or another web service–and leverage powerful no-code data modeling capabilities to relate, transform, and extend your data into the insights you need. Then you can seamlessly reference your enterprise data throughout your applications using records-powered components, queries, and more.

However, there are scenarios when you need to use other objects in addition to or instead of a record type. For example, when extracting data from a document, you’ll need a custom data type (CDT) to map data extracted from a document. Or, if your data lives in a third-party system, you’ll need an integration to access that system before you can work with that data in Appian.

This page explains the different data objects available in Appian and when to use one or more of them to achieve your business goals.

Types of data objects

The Appian Data Fabric consists of numerous design objects that allow you to connect to your enterprise data and unify it in a single, powerful data model. In many cases, you’ll use a combination of these objects in your applications to work with the entirety of your enterprise data.

Record Types Custom Data Types Data Stores Connected Systems Integrations Web APIs

The table below provides a quick overview of when you’d use which object to work with your enterprise data:

Object What does it do? When do I use it?
Record Type Allows you to easily connect to data in a database, process model, Salesforce, or other web service.

Extend your enterprise data using powerful data modeling capabilities like record type relationships and custom record fields to relate and transform your data. Then, secure it using record-level security.

Seamlessly reference this powerful version of your enterprise data using unified record type references, records-powered components, and more.
  • To view, display, and report on data from a database, process model, Salesforce, or other web service.

  • To add, update, or delete data from a database table.

  • To accelerate application development:
    • Relate enterprise data, regardless of where the data lives.
    • Transform existing data into the insights you need.
    • Generate record views and record actions.
    • Apply record-level security to secure enterprise data.
Custom Data Type (CDT) Allows you to define a data structure that represents a logical grouping of data.
Data Store Allows Appian to connect to external relational databases to store and retrieve application data.
This object is always used in conjunction with a CDT.
Connected System Stores authentication and connection information so you can connect to external integrations and data sources.
  • To store authentication and connection information to a data source.

  • To manage authentication details for a third-party system.
Integration Allows Appian to interact with other systems.
Connect to external systems using integration objects and connected systems, then call your integrations in expression rules, interfaces, record types, or process models.
Web API Allows other systems to contact Appian.
Expose Appian data and services to outside systems using a web API object.

The sections below provide a few examples of the best way to work with your enterprise data depending on your data source and what you’re trying to accomplish.

Working with data in a database

There are two ways to work with data in a database:

  • Using a record type with data sync enabled.
  • Using a CDT, data store, and a record type (with or without data sync).

You can accomplish most of your business needs using only a record type with data sync enabled. This allows you to connect directly to your database table, view and build with that data, and add, update, or delete data as needed.

However, there are two common scenarios that require a CDT and a data store in addition to a record type:

Let’s look at some examples of working with data from a database.

View, add, update, and delete data in a database

Let’s say that you’re building a customer support application to track and report on your support cases. Support engineers will also need to create new cases and update existing ones. Your data currently lives in a database, where you have multiple tables for case, customer, and case priority, and the largest table has 1.4 million rows of data.

Relevant data objects

Record TypeRecord types with data sync enabled

This is the perfect opportunity to create record types with data sync enabled:

  • All of your database tables are below the row limit, which means each table can be used to create a record type with data sync enabled.
  • You can set up relationships between record types to seamlessly reference related data, like referencing related customer information from the Case record type.
  • You can build a records-powered grid that displays case names, statuses, customers, and assigned engineers.
  • You can use the Write Records smart service to build processes that add or update data in your database and then automatically sync those changes in Appian. You can then start those processes as record actions in your grids, interfaces, and reports.

Learn more:

Manage data from large datasets

Suppose you’re building a fleet management application that manages all new vehicle repair requests and audits all closed requests. All of your existing vehicle repair requests live in a database table that has about 3 million rows of data, and this number of requests will only continue to grow.

Relevant data objects

Data TypeCustom data type

Data StoreData store

Record TypeRecord type without data sync enabled

This is one of the few scenarios where you should not enable data sync on your record type because:

  • The repair request database table exceeds the 2 million row limit for a single record type with data sync enabled.
  • The application requires all of the repair request data (all open, in progress, and closed repair requests), so you cannot apply source filters to limit the number of rows synced in the record type.

Instead, you would need to create a new record type without data sync enabled in order to have all of your source data available from a single record type.

You first need to create a CDT with fields matching the structure of your database table, and a data store to connect the database to Appian.

Once you have these two objects configured, you can create a new record type without data sync enabled from your data store entity. You can then use the Write to Data Store Entity smart service to add new data as needed.

If you didn’t need all of your repair request data, you could create a record type with data sync enabled and use source filters to filter out the unnecessary data.

For example, if you only needed to see cases that were either “Open” or “In Progress” in the last six months, you could create a synced record type that only syncs requests with a certain status and created on date.

Write to multiple database tables at the same time

Now let’s say you’re creating an HR management application, and you want to add a point of contact for each of your employees. Each point of contact must have at least two methods of communication.

In your database, the point of contact and the contact methods are stored in two separate tables. However, it’s important that the contact and contact method are added at the same time to ensure you have the appropriate information in case of an emergency. In other words, you need to avoid a situation where a contact is added without any contact method information.

Relevant data objects

Data TypeCustom data types

Data StoreData store

Record TypeRecord types with data sync enabled

In most cases, you can use a sequence of Write Records smart services to write data to different tables within the same process. However, if it's important that both updates either succeed together, or fail together, you may want to take a different approach.

Instead, to write data to different tables at the same time, you can:

  • Create a CDT for each database table: Contact CDT and Contact_Method CDT.
  • Nest the Contact_Method CDT inside the Contact CDT. This data structure ensures data is written to both tables at the same time.
  • Create a data store to connect to the database, and use it in the Write to Data Store Entity smart service so you can add new contacts and their contact methods to the database.

    Whenever data is written to the database using the Write to Data Store Entity smart service, those changes will also be automatically synced in Appian—keeping your synced data fresh.

Then to view data, you can:

  • Create a record type with data sync enabled for each database table: Contact record type and Contact Method record type.
  • On the Contact record type, create a one-to-many relationship with the Contact Method record type so you can seamlessly reference the related contact information in queries, reports, and interfaces.

Working with data in external systems

Appian provides a few objects that allow you to connect to your external systems, as well as add, update, and reference that data in Appian: connected systems, integrations, and web APIs. You’ll often use a combination of these objects in your application to achieve your different business requirements.

Specifically, you’ll use:

  • Connected systems and integrations to allow Appian to interact with an external system. Like when you need to read data from the system in Appian.
  • Web APIs to allow an external system to interact with Appian. Like when you need your system to notify Appian of new or changed data in the source.

Once Appian is connected with your external system, you can create a record type to reference your external data in an easy, unified manner.

Let’s look at some examples of how these objects work together to manage data from an external source.

View data from an external system

Imagine you’re building an expense report application. All of your expense data currently lives in a third-party system, and you need to pull that data into Appian so you can build an application that analyzes expense trends and patterns.

Relevant data objects

Connected SystemConnected system

IntegrationIntegration

Record TypeRecord types with data sync enabled

Since Appian needs to call another system in order to view and work with the data in your application, you need to create a connected system and integration specific to your third-party system. This integration will query data from the source system so it's available in Appian.

You can then create a record type with data sync enabled using your integration so you can quickly build insightful reports using your expense data.

Since this application focuses on reporting on existing data, a daily, full sync on the record type should be sufficient to keep the synced data up to date with the external source.

If you require more frequent syncs, or you want to sync data changed by the Call an Integration smart service, you can configure the Sync Records smart service to sync the records you need. See the scenarios below for more details.

See the Service-Backed Record Type Tutorial for step-by-step instructions on building this type of scenario.

Sync changes from an external system

Now let’s say you want to expand the expense report application mentioned in the example above. Not only do you want to create reports on existing expenses, you want to view and report on all unsettled transactions.

Unsettled transactions can occur anytime throughout the day, so you need to ensure that you have the latest data in Appian, even when data is changed in your third-party system.

Relevant data objects

Connected SystemConnected system

IntegrationIntegration

Web APIWeb API

Record TypeRecord types with data sync enabled

Since unsettled transactions are logged in your third-party system, you need to create a web API to allow your source system to interact with Appian. Specifically, you need the external system to inform Appian whenever there is new data available so that we can sync the latest data.

To do this, you can generate a web API configured with the a!syncRecords() function. This function allows you to sync a record or set of records in a specific record type.

To generate this web API, you first need to configure a Sync Expression to enable Appian to sync specific rows of data from your external system. This expression requires an integration object that returns data from your source based on their identifiers. You can easily create this second integration object using the existing connected system from the first example.

Once you configure a Sync Expression, you can generate your web API directly from the record type. You can modify the web API as needed, and then add the web API's URL to your source system's webhook configuration.

Now, the source can notify Appian of changed data, and we can then sync the latest data in your record type—allowing you to see up-to-date transaction data.

Write data to an external system

Finally, let’s say your expense report application now requires a supervisor to approve any high-value expense reports before they can be submitted for reimbursement. To do this, you want to create a process that manages all approval tasks and sends a request to your third-party system to update the expense status.

Relevant data objects

Connected SystemConnected system

IntegrationIntegration

Record TypeRecord types with data sync enabled

In this scenario, you need to create an integration object that can update the status of an expense report once it is approved by a supervisor.

In the examples above, you created a connected system and an integration to query and view data from your external system. Now, you can reuse your connected system to create another integration object that modifies data in that same system. See the Integration Tutorial for step-by-step instructions on creating an integration that modifies data.

Once you create your integration, you can trigger a status update by adding the integration in your process model. After the approval task, add a Call an Integration smart service to write the latest status to the source.

But you're not done yet, you still need to sync the status change in Appian. To do that, you’d simply add a Sync Record smart service at the end of your process to sync the latest changes to the expense’s status.

Open in Github Built: Fri, Dec 02, 2022 (04:36:03 PM)

On This Page

FEEDBACK