Search

Home

Home

Creating an AS2 Server Trigger

If you want to configure the GRAVITY application to be triggered via the AS2 server, select TRIGGERS from the main menu.

By choosing New..., you can add a new configuration for automatically starting the GRAVITY application.

image

After selecting New…, choose the type of automatic trigger from the list.

image

When you choose the AS2 server mechanism, select the AS2 Server option from the list.

In the PROPERTIES area, you must also specify the GRAVITY application (project) to be associated with this configured trigger.

image
icon

A trigger of this type passes the data received by the AS2 server to the project. The data is transferred to the project through project parameters. For this reason, the project must include a parameter to receive the incoming message (EDIFACT, JSON, XML, etc.) and another parameter to receive the unique message ID MessageId.

To complete the configuration, fill in the required fields for this type of trigger:

image
  • Document content type → the type of document you want this trigger to handle:
    • application/EDIFACT
    • application/edi-x12
    • application/JSON
    • application/XML
    • icon

      Document content type is decoded based on the content-type header in the MIME message received by the server from the AS2 partner.

  • Document type → the type of EDI document you want this trigger to handle. Supported message types:
    • Not recognized - for documents whose type is not recognized by the system,
    • Invoice (INVOIC, 810) – invoice – a sales document containing details of the transaction,
    • Order (ORDERS, 850) – order – a purchase request for goods or services,
    • Order Response (ORDRSP, 855) – order response – confirmation of order acceptance or modification,
    • Despatch Advice (DESADV, 856) – dispatch advice – a notice providing shipping information
    • Receiving Advice (RECADV, 861)– goods receipt confirmation,
    • Delivery Forecast (DELFOR, 830) – delivery forecast – a schedule of planned deliveries,
    • Delivery Message (DELMAS, 862) – delivery message – information detailing the shipment of goods,
    • Remittance Advice (REMADV, 820) – remittance advice – payment information related to an invoice,
    • Control Message (CONTRL, 997) – control message – used to acknowledge receipt of an EDI document or report,
    • Inventory Report (INVRPT, 846) – inventory report – information on stock levels,
    • Sales Report (SLSRPT, 852) – sales report – details on sales and transactions,
    • Price/Sales Catalogue (PRICAT, 832) – price catalogue – contains information about product or service prices,
    • Commercial Invoice (CMT, 888) – commercial invoice – a sales document containing additional commercial information,
    • Credit Note (CREDIT, 812) – credit note – document used to correct an invoice when errors occur,
    • Debit Note (DEBILL, 812) – debit note – document notifying of an outstanding payment,
    • Purchase Order (PURCHORD, 940) – purchase order – buyer’s order for goods or services,
    • Dispatch Instruction (DISINV, 889) – dispatch instruction – details concerning the shipping of goods,
    • Bayplan/Lading Instruction (BAPLIE, 848) – loading instruction – information regarding container loading,
    • Financial Summary (FINSUM, 821) – financial summary – a financial report containing transaction data,
    • Location Message (LOCATE, 869) – location message – provides information about the location of goods or facilities,
    • International Forwarding and Transport Instruction (IFTMIN, 204) – transport instruction – information about international transport,
    • Market Data Structure (MDS, 891) – market data structure – information on market structure,
    • Transport Details (TDT, 212) – transport details – information describing the specifics of goods transport,
    • Waybill (WAYBIL, 211) – waybill – a transport document containing shipment information.
    • icon

      Document type is decoded based on the information contained in the message, depending on the Document content type.

  • Send data to process → method of passing data to the process
    • as parameter - as a parameter
  • Data parameter → the parameter that receives the data contained in the AS2 message. In the project, this parameter should be defined as type text or blob. (A blob type has to be converted to text within the process using the COMPUTINGCOMPUTING and/or CONVERTER CONVERTER operator.)
  • Message id parameter - the parameter that receives the unique message identifier MessageId. In the project, this parameter should be defined as type text.
icon

The trigger will be executed only if the Document content type and Document type in the message received by the AS2 server match the definitions specified in the trigger.

If the server receives an unsupported message — meaning its Document content type and Document type do not match any defined trigger — the system will return a failed execution status to the partner, along with a message indicating that the document type is not supported.

If you want the system to send an email to specified recipients when a process error occurs, enable the Send mail when error option.

image