Publish Review Components: Data > Definitions

Validators and Data Types

Data


Data

Velosimo can process data objects that are representations of real-world commerce information such as orders, shipments, and products. All communication involves sending and/or requesting objects.

The Data menu is the first option of the menu and is separated by Definitions, Objects, and Files. Here is where you can manage the data to work in flows, translators, algorithms and other resources in Velosimo. This is also where you setup the configuration between products in Velosimo.

Data 1

 

When you clicked on Data option, you can see the specific menu with the options. Most of the work you will be doing in is in the Data > Objects. Below is a screenshot of the Objects for an Accela and ePlanSoft interface.

Data 2

Definitions

The Definitions are grouped by Validations and Data Types.

Definition 1

Validators

Data Types

The Data Types are the data with we will manage in Velosimo on the flows, workflows, translators, etc. They can be: JSON Data Types, File Types, and Velosimo Types.

JSON Types

The JSON Data Types correspond to a JSON Schema. To learn more about JSON Schema visit this page http://json-schema.org/

JSON 1

The most important Actions in this section are:

Add New Image 1

Add New Image 2

This is the principal form to create a JSON data type, following the sctructure: http://json-schema.org/ in the schema box.

 

JSON type Behavior

Before save callbacks:

  • In this box, the user could define algorithms will be executed before save a record of this data type in a flow process.

Records methods:

  • In this box, the user could define algorithms linked to some attributes of the records created of the data type. Is like a method for an specific attribute, and it could be execute in a code of your integration.

Data type methods:

  • In this box, the user could define algorithms linked to some attributes of the records created of the data type. Is like a method for an specific attribute, and it could be execute in a code of your integration.

How handle data_type via code

Wherever you are in Velosimo, you can call the data_type definition by way:

Cenit.namespace('A').data_type('B')

If you want access to a record, you can use:

object = Cenit.namespace('A').data_type('B').where(query).first

where query is a hash with parameters of a query, ex:

 .where(name: 'photo', id: '123')

For obtain all record you can use:

objects = Cenit.namespace('A').data_type('B').where(query).all

To save a data_type:

Cenit.namespace('A').data_type('B').create_from_json!(data.to_json)