Create a new data model

Overview

A data model is a structure or schema for storing data. All data in Accode is structured in data models. This data, in turn, can be used in a workflow, either as the entity data that runs through the workflow itself or as supporting data that is queried into the workflow on demand.

Accode allows you to create custom data models that can be used to store data.

Creating a new data model

In order to create a new data model, press the Create button in the left hand corner and select the corresponding option. Name the model, fill out the relevant fields and in which format they should be, and then press save.

After you have created your data model, it can be found from the Your components page under the Data tab.

Extending an existing model

You can add custom fields to an existing data model by extending the data model. In the data view, press Edit model and you will see all the fields in the relevant data model. The existing fields in the model can not be edited, but you can extend the model with extra fields.

Examples

Keyword-to-value supporting data

One of the more common use cases is identifying a particular category based on a set of keywords. This can be represented as a data model, that contains two fields: one that contains keywords and another for the responding value to be set (e.g. a dimension value in this example).

The example below shows a made-up keyword list as well as the responding dimensions.

Fetch custom data

More demanding use cases could be to use Accode actions to fetch data from an external source and store it in a data model.

In this case, we use the fetch action to fetch data from an API. We then transform the data using a custom script in an action and store it in a data model. This is useful in many different cases, one could be if you were to automate billing or just keep track of clients in an external system.

Previous
Tasks