Free cookie consent management tool by TermsFeed Working with Data in Appian [Working with Data in Appian]
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

Appian's 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.
  • Use records for portals whenever possible to make connecting to your Appian data simpler.
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.
  • To write data to different database tables concurrently.

  • To create a database-backed record type without data sync enabled:
    • To connect a database view or table.
    • To add, update, or delete data from a database table.
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).

Record types with data sync enabled are the best way to work with your data in Appian. You can seamlessly connect to your database tables and work with the data how you need it. 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.

    Tip:  If you need to sync more than 2,000,000 rows in a record type, use source filters to divide up large datasets into multiple synced record types, each with a specific purpose.

    For example, you could have an Active Case record type to display all open or in progress cases, and a Closed Case record type to display all closed cases. Learn more.

  • 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:

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.

    Tip:  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.

Tip:  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.

Working with Data in Appian

FEEDBACK