Flow definition

How to map messages?

Message mapping consists in associating the information of a message linked to a category with the information of a Sage X3 representation.

Several predefined message mappings are available.

You can define your own message mapping by duplication. Click Duplicate and enter the new keys.

To create a mapping, enter:

  • The message mapping code and version
  • The category code
  • The representation of Sage X3. The table of the class that the representation is linked to must match the triggering table of the category.

The process direction is automatically defined according to the selected category.

For received messages:

  • Specify the aliases of the fields used as references when performing controls on the authorizations on inbound messages (for example, specify if a site control is applied to the sales site, the delivery site, the financial site, etc.).
    Three aliases must be entered: the aliases of the BP, the BP address and the site.
For issued messages, these fields are defined at category level.
  • In the Import section, specify the import template used.

    The template fields are automatically displayed and each one must be matched with an alias of the representation.

It is not necessary to enter import templates for the delivery receipt notification mappings; notifications are created and deleted using the CRUD method, not document import.

Once the message mapping has been defined, it can be used in:

  • Flows

    In the Flows section, you can view the list of flows using this mapping.

  • Sequential files

    In the Sequential files section, you can view the list of sequential files using this mapping.

  • XML files

    In the XML files section, you can view the list of XML files using this mapping.

How to define the EDI format of exchanged sequential files?

Use this screen to predefine the EDI format of the sequential files to be sent and received.

Several EDI formats have been predefined for sequential files.

On the Query widget, all the defined file formats are displayed.
You can either display the formats for the outbound or inbound files using the predefined filters: Outbound and Inbound.

Format definition

Defining a format means specifying:

  • The message mapping used.

    The representation, instance name and direction of the mapping are automatically displayed.

  • The file standard.
  • The physical file or set of files containing the information required for a document to be sent or received. For a sales invoice, it can be the invoice header file, the detail file, or the footer file.

    For each file, specify:

    • Its mandatory nature, or not.
    • The file code. This code is used to define the relation between the physical files when several files are listed. It is also used in the list of file fields to specify the related file at the level of each field.
    • The root of its name. For inbound messages, the file name must include the file extension. 

    • For outbound messages, the file name can include other components such as the date, the time, a constant, the file extension, etc., to be defined on the File name definition block.
  • The structure used to manage the file data: file type, decimal separator, recording separator, date format, etc.
  • For inbound messages, you must also enter a key identifying the property used as the unique reference to distinguish one document from the other. For example, this can be the customer order number for a sales order document.

  • The list of fields or properties included in the sequential files to be sent or received is displayed. These can be the properties of the class linked to the representation or properties created directly in the representation for transcoding purposes. The Transcode method provided in the representation is used to specify, for each relevant property, the transcoding table number to be used: the values to be transcoded must be defined in the transcoding tables of the Transcribe import/export function (GESAOR).

    These fields are sorted according to:

    • The physical file code

    • The hierarchy level of the recording types inside the physical files (for example, the header, the lines, etc.)
    • The position of the field in the recording (mainly used for fixed-format file types)

The Mandatory nature of each field is also specified, if required.

Depending on the EDI category type, a field defined as not being mandatory in the standard use of Sage X3 can be defined as mandatory here.
For example, it can be the EAN code of the product for documents referencing this product, or the customer order reference for sales orders.


You can also set up other sequential files by duplication. Enter a message mapping code and an existing version with a new file standard (previously defined in the no. 2002 miscellaneous table).

Once the file format has been defined, it will be used in flows.

In the Flows section, you can view the list of flows using this sequential file.

Upload an XSD file

Use this screen to upload the files of the XSD schemas used to define and validate the formats of the exchanged XML files.

You can access the schema content from the relevant BP:

  • FACTURAE, to exchange with the Spanish public administration
  • CHORUS, to send invoices to the French public administration.
  • XRECHNUNG, to send invoices to the German federal administration.
  • EDISOHXML for the receipt of sales invoices. This schema is included in the application.
  • DEB to generate files for the Intrastat declaration generation.

In creation mode, the upload takes place in the File section, by simply copying the schema recovered from the BP.

The CHORUS and XRECHNUNG schemas includes 13 XSD files to upload, including the UBL CommonAggregateComponents-2.0 component supplied with a reduced size to improve performances.

The unique identifier number (UUID) in MongoDB for each of these files is displayed following the upload.

  • In the XML files section, you can view the message mappings that use this schema.

  • In the Flow section, you can view the list of flows that use this category.

How to define the EDI format of the exchanged XML files?

In this screen, use the XSD structure to predefine the EDI format used for the XML files to be sent and received.

Several EDI formats have been predefined for XML files.

They relate to the following elements:

  • The receipt of the purchase invoices
  • The receipt of the sales invoices
  • The generation of the sales invoices for ,
  • The generation of those files necessary for the Intrastat declaration

On the Query widget, all the defined file formats are displayed.
You can either display the formats for the outbound or inbound files using the predefined filters: Outbound and Inbound.

To define an XML format, you need to specify the following elements:

  • The message mapping used

    The representation, instance name and direction of the mapping are automatically displayed in the Parameters section.

  • The file standard
  • The XSD schema(s) to use

Click Generate to generate the list of the XML file path identifiers.

This list is displayed in the Fields table, in the Parameters section.

Then, match each of these identifiers with each property originating from the class associated with the representation.

Once the file setup has been defined, it will be used in flows.

In the Flows section, you can view the list of flows that use this XML file.

What is a flow?

The diagram below shows a flow:


Defining a flow means wrapping or creating a package of EDI messages. This approach aims at grouping the various parameters required to implement an exchange by specifying:

  • The partner

    The partner will determine the protocol to be used.

    The protocol cannot be entered. It is the protocol associated with the EDI partner, by category.

  • The category

    In a flow, messages always belong to the same category. This category must be linked to the entered partner.

    The following information originates from the category and cannot be modified:

    • The direction: Send/Receive
    • The operation type: creation/deletion
  • A message mapping linked to this category, along with the messages associated with this mapping

    You need to specify if the mapping uses files in a sequential or XML format. If it uses an XML format, you need to specify whether the generated XML files must be signed in a XAdES format or if they do not need to be signed at all.

  • The attached file(s): you can enter up to five lines:
    • One line for the generated file. The attached file is generated from the entered Crystal Reports code. However, you can exclude the main XML or sequential file from the sending. You can also choose to sign the generated attached file. In the parameter values table, define a constant value or a property for each Crystal Reports parameter.
      • You can define the type of the generated file (PDF, Word, etc.) according to the destination code using the destination field. You can define the type in the Destinations setup function (GESAIM).
      • The name is set: you generate an attached file with a set name in the specified volume.
      • The name is not set: The file is named after the main file. The file extension matches the one defined by the destination code. You can define the extension using the Destinations setup function (GESAIM).
    • Four lines for attached files. The name of these files is set. You can select these files via the volume you have specified.