Share this link

    Home / Tradeshift Documentation / Tradeshift Partner Apps / Babelway / Chapter 5. Admin

    Document Types

    1973 0 Created on 2020-10-02 06:53:56; Last updated on 2022-07-01 13:01:13

    Documents allow you to have a business view on the processed messages.

    In this tab, you can configure which documents you want to use, and configure the fields that you want to have, or how the interface must display them.

    

    Environment settings - DocumentTypes

    • Name: The name of the document. Please note that this name will be used as an identifier to identify the DocumentType, and is therefore independent of the language, but you will be able to define labels for this DocumentType in every language (see parameter Labels). 
    • Keep duration: How long the documents must be kept. 
    • Fields: All the fields that you want to have for this DocumentType.  For every field, you can choose its name and its type.  The type is important, as it helps the application validate the data that you encode, and eases the manipulation of the data. For example :
    • If you tell the application the possible values that a String may contain (when the field can only have a known set of acceptable values), the interface will offer you a dropdown menu for selecting the values, this guarantees that you can not enter another value in error.
    • If you choose an Integer type, you will be guaranteed to have only numbers in the field, and the interface will sort the values numerically (e.g.: 1, 2, 10) instead of alphabetically (1, 10, 2)

    A special field UniqueKey can be used as a user identifier for the Document. It can be used in extractors to indicate that multiple extractions concern the same logical document, and result in updates instead of creating a new document. 

    You can also personalize how the interface will display your DocumentTypes.

    • Menu section: By default, if you leave this field empty, all Documents will be displayed in the Monitoring section, with one menu entry by DocumentType.  By using this parameter, you can group multiple DocumentTypes in just one menu section. The DocumentTypes will then be displayed as tabs in this menu section.  To do this, simply add an id for the menu section. All the DocumentTypes with the same id will be grouped together. 
    • Labels: This parameter allows you to load labels that must be used, in any language, to display data related to this DocumentType.  To do this, you must load a zip file containing a properties file (with all labels) for every language. Files in the zip must be named documents_[language].properties, or documents.properties for texts to use by default.  By clicking on the link "Download file pattern", you can easily get an example file for the properties files, with all the correct keys already defined. 

    

    Document Type labels

    • List default columns: Names of the columns that must be displayed by default in the list of documents, separated by commas. The names must be the name of a field. 'id', 'creationMoment', 'lastUpdateMoment', 'keepUntil' are also accepted to show the corresponding columns. 

    If you leave this field blank, the default is to display the columns for all of your fields, and also id and creationMoment.  

    The order of elements in the list has no importance. 

    • List default search: The criteria, on document creationMoment field, that will be applied by default when users come to the table of this DocumentType.  

    If you choose for shorter values, the searches will be faster. For this reason, it is often better to choose short values, because users almost always access only recent documents, and let them change the criteria on the rare occasions when the users want to access old documents.

    • List operators: The operators that will be applied for searches in the table. The expected format is a semicolon separated list of items of the form [fieldName]:[operators]. [operators] is a comme separated list of operators to display. Possible operators are 'eq' (equals), 'lt' (less than), 'le' (less or equal), 'gt' (greather than), 'ge' (greather or equal) or 'cn' (contains). Example of value : 'field1:eq,cn;field2:eq'. 
    • Detail columns: How the fields must be displayed in the page with the details of a document.  The value must have the form [Section1]field1,field2[Section2]field4,field3... For better readability, newLines are also accepted before every section.  If you leave this field blank, the default is to display all the possible fields. 

    

    

    

    0 people found this helpful.

    Related Articles