Understanding E-Document Transaction Response

The Electronic Transaction Response feature enables you to create and send transaction responses with Acknowledged and Accepted response types when receiving the inbound e-document. To use this feature, you must do the following:

Currently, the SuiteApp supports creation of transaction responses with Acknowledged and Accepted response types. The acknowledged transaction response will be created when the inbound record or e-document is in For Conversion status.

The accepted transaction response will be created when:

The acknowledged transaction response is shown on an inbound record whereas acknowledged and accepted transaction responses are shown on the successfully converted transaction. You can view the responses in the E-Document Transaction Response subtab under the E-Document subtab present in a converted transaction or inbound record.

Note:

Generation and Sending of transaction response content is currently supported for transaction response records with response type For Cancellation, For Rejection and Rejected. Users can use the Generate and Send button present on the transaction response records to use these features. For more information see, Generating Transaction Response Content, Sending Transaction Response Content for Avalara Users, Sending Transaction Response Content for Non-Avalara Users.

The transaction response record contains the following fields:

Field Name

Description

Subtab

Reason for Cancellation or Reason for Rejection

This field displays the reason for which the transaction linked to this transaction response is requested for cancellation/rejection or cancelled.

Field names for response type:

For Cancellation – Reason for Cancellation

For Rejection, Rejected – Reason for Rejection

-

Error Code

This field displays the error code when an error is encountered while generating or sending the transaction response content.

Error Details

Error Message

This field displays the error message when an error is encountered while generating or sending the transaction response content.

Error Details

OBN Document ID

This field stores the OBN Document ID for transaction response sent. (Applicable for Avalara Transactions)

Network References

Avalara Mandate

This field displays the primary value that identifies a particular e-invoicing mandate. This is same as the code used by Avalara to represent a particular country-mandate. (Applicable for Avalara Transactions)

Network References

Avalara Document ID

This field contains the value of the Avalara Doc ID returned through the Document Status record. (Applicable for Avalara Transactions)

Network References

Transaction Response Content

This field allows you to preview and download the generated transaction response content.

-

Response Type

This field displays the type of the transaction response. For list of response types, see Response Type Field Values

-

Status

This field displays the status of the transaction response. For list of statuses, see Status Field Values

-

Response Issue Date

This field displays the date and time at which the transaction response is issued from the customer or vendor.

-

Transaction ID

This field displays the transaction ID to which the response belongs to.

-

Direction

This field indicates whether the response is received (inbound) or sent (outbound). It contains either of the two values: Inbound or Outbound.

-

Inbound E-Document

This field contains a link to the inbound e-document to which the response belongs to.

-

Response Sent Date

This field displays the date and time at which the transaction response is sent.

-

Response Type Field Values

The Response Type field may contain one of the following values:

  • Accepted

  • Acknowledged

  • Conditionally accepted

  • For Cancellation

  • For Rejection

  • In process

  • Paid

  • Rejected

  • Under query

  • Request Further Objection

  • Continue Generation

Status Field Values

  • Ready for Generation

  • Generation Failed

  • Ready for Sending

  • Sending Failed

  • In Error

  • Processing

  • Cancelled

  • Request Completed

  • Sent

  • Not Sent

The Status field may contain one of the following values:

Inbound Transaction Response

Inbound transaction response feature creates transaction response records from NSEB inbound documents. When a valid NSEB inbound document is to be processed, the system creates a transaction response and records a corresponding entry in the e-document audit trail on the linked transaction.

The following is the criteria for converting an NSEB inbound document to transaction response:

  • Format: UBL

  • Document Type: ApplicationResponseUBL

  • Status: Pending/Failed

Required Licenses and Quantity Consumption

The following are the licenses required:

  • Electronic Invoicing

  • NetSuite Electronic Business

  • Avalara Processing for NetSuite Electronic Invoicing

If the Electronic Invoicing license is inactive and a Free country is specified in E-document preferences, the system processes all NSEB Inbound documents whose resolved transaction subsidiary matches the Free country.

The quantity for Avalara Processing for NetSuite Electronic Invoicing is not consumed for US‑B2B‑DBNA mandate based NSEB inbound documents when all the following are true:

  • Resolved transaction type using Related Avalara document ID

    : Invoice / Credit Memo

  • Mandate: US-B2B-DBNA

  • Document Type: ApplicationResponseUBL

  • Acknowledged (AB) response code NSEB Inbound documents

Note:

For e-documents related to mandates other than the US-B2B-DBNA mandate, the system will consume volume for the Avalara Processing for NetSuite Electronic Invoicing license.

If an inbound document is not processed, the system moves it to the backlog with status Failed. Run the scheduled script (E-Invoicing Transaction Response SS), to reprocess all valid NSEB inbound documents in these statuses. The script applies the same rules as real-time processing. It processes the NSEB inbound document, creates a transaction response and records an audit trail for each.

If the system fails to process an NSEB inbound document, it sends an email notification to the “Recipient of E-Document Notifications” specified in the Parent Company’s Electronic Invoicing Preferences. If no recipient is specified, the system sends the failure notification to all active administrators in the account. When a Scheduled Script fails to process any inbound documents, it sends a CSV file listing the NSEB inbound documents that it could not process.

Custom Plugin Support

If the Avalara mandate specifies a custom plugin, the system uses that plugin during transaction response processing to determine the transaction response type.

              /**
 * @NApiVersion 2.x
 * @NScriptType plugintypeimpl
 */
define([], function () {
  /**
   * Determines the Transaction Response Type to be created.
   *
   * @param {Object} params - Parameters for document modification.
   * @param {Object} params.inboundDocumentRec - Details of the transaction record (loaded via N/record)
   * @param {string} params.mandateId - Transaction Internal ID
   * @param {string} params.relatedAvalaraDocId - User internal ID (Current User or First Active Admin)
   * @param {string} params.rawXml - Returned as part of CDS response (customDataSources[0].data)
   * @param {string} params.responseCode - E-document content
   * @returns {Object} Result object indicating success or failure.
   * @returns {boolean} result.success - Indicates whether determining transaction response type was successful or not.
   * @returns {string} [result.trResponseTypeId] - The internal ID of the transaction response type to be created.
   * @returns {string} [result.eiAuditMessage] - Custom audit trail message or error description.
   *
   */
  function inject(params) {
    
    var trResponseTypeId = null;
    /**
     * Implement logic to determine trResponseTypeId
     */

    return {
      success: true, 
      trResponseTypeId: trResponseTypeId, // Make sure it is the internal ID of the transaction response type to be created.
      eiAuditMessage: "message from cds",
    };
  }
  return {
    inject: inject,
  };
}); 

            

General Notices