

# Managing AWS B2B Data Interchange events using Amazon EventBridge
<a name="eventbridge"></a>

Amazon EventBridge is a serverless service that uses events to connect application components together, making it easier for you to build scalable event-driven applications. Event-driven architecture is a style of building loosely-coupled software systems that work together by emitting and responding to events. Events represent an operation that succeeds or fails. 

As with many AWS services, AWS B2B Data Interchange generates and sends events to the EventBridge default event bus, which is automatically provisioned in every AWS account. An event bus is a router that receives events and delivers them to zero or more destinations, or *targets*. Rules you specify for the event bus evaluate events as they arrive. Each rule checks whether an event matches the rule's *event pattern*. If the event does match, the event bus sends the event to the specified target(s).

![\[AWS services send events to the EventBridge default event bus. If the event matches a rule's event pattern, EventBridge sends the event to the targets specified for that rule.\]](http://docs.aws.amazon.com/b2bi/latest/userguide/images/eventbridge-integration-how-it-works.png)


**Topics**
+ [AWS B2B Data Interchange events](#supported-events)
+ [Sending AWS B2B Data Interchange events using EventBridge rules](#eventbridge-using-events-rules)
+ [Amazon EventBridge permissions](#eventbridge-permissions)
+ [Additional EventBridge resources](#eventbridge-additonal-resources)
+ [AWS B2B Data Interchange events detail reference](events-detail-reference.md)
+ [EventBridge Example events for B2B Data Interchange](#ev-examples)

## AWS B2B Data Interchange events
<a name="supported-events"></a>

AWS B2B Data Interchange sends events to the default EventBridge event bus automatically. You can create rules on the event bus; each rule includes an event pattern and one or more targets. Events that match a rule's event pattern are delivered to the specified targets on a [best effort basis](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-delivery-level). Events might be delivered out of order.

The following events are generated by AWS B2B Data Interchange. For more information, see [EventBridge events](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html) in the *Amazon EventBridge User Guide*.

AWS B2B Data Interchange emits the following events to EventBridge.


| Event detail type | Description | 
| --- | --- | 
|  Transformation Completed  |  This event is emitted when either a standard or split transformation has completed successfully.  | 
|  Transformation Failed  |  This event is emitted when either a standard or split transformation has failed.  | 
| Acknowledgement Completed | An Acknowledgement was generated and written to Amazon S3. | 
| Acknowledgement Failed | An Acknowledgement either failed to generate or failed to write to Amazon S3. | 

## Sending AWS B2B Data Interchange events using EventBridge rules
<a name="eventbridge-using-events-rules"></a>

To have the EventBridge default event bus send AWS B2B Data Interchange events to a target, you must create a rule that contains an event pattern that matches the data in the desired AWS B2B Data Interchange events. 

Creating a rule consists of the following general steps:

1. Creating an event pattern for the rule that specifies: 
   + AWS B2B Data Interchange is the source of events being evaluated by the rule.
   + (Optional): Any other event data to match against.

   For more information, see [Creating event patterns for AWS B2B Data Interchange events](#eventbridge-using-events-rules-patterns)

1. (Optional): Creating an *input transformer* that customizes the data from the event before EventBridge passes the information to the target of the rule.

   For more information, see [Input transformation](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-transform-target-input.html) in the *EventBridge User Guide*.

1. Specifying the target(s) to which you want EventBridge to deliver events that match the event pattern.

   Targets can be other AWS services, software-as-a-service (SaaS) applications, API destinations, or other custom endpoints. For more information, see [Targets](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-targets.html) in the *EventBridge User Guide*.

For comprehensive instructions on creating event bus rules, see [Creating rules that react to events](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule.html) in the *EventBridge User Guide*.

### Creating event patterns for AWS B2B Data Interchange events
<a name="eventbridge-using-events-rules-patterns"></a>

When AWS B2B Data Interchange delivers an event to the default event bus, EventBridge uses the event pattern defined for each rule to determine if the event should be delivered to the rule's target(s). An event pattern matches the data in the desired AWS B2B Data Interchange events. Each event pattern is a JSON object that contains:
+ A `source` attribute that identifies the service sending the event. For AWS B2B Data Interchange events, the source is `aws.b2bi`.
+ (Optional): A `detail-type` attribute that contains an array of the event types to match.
+ (Optional): A `detail` attribute containing any other event data on which to match.

For example, the following event pattern matches against all events from AWS B2B Data Interchange:

```
{
  "source": ["aws.b2bi"]
}
```

The following event pattern matches all of the B2B Data Interchange events.

```
{
  "source": ["aws.b2bi"],
  "detail-type": ["Transformation Completed", "Transformation Failed"]
}
```

The following event pattern matches successful transformations for a trading partner with ID *trading-partner-id*.

```
{
  "source": ["aws.b2bi"],
  "detail-type": ["Transformation Completed"],
  "detail": {
    "trading-partner-id": [trading-partner-id]
  }
}
```

The following event pattern matches events for split transformations:

```
{
  "source": ["aws.b2bi"],
  "detail-type": ["Transformation Completed", "Transformation Failed"],
  "detail": {
    "split-attributes": [{
      "exists": true
    }]
  }
}
```

This example pattern matches events for the first split of any transformation.

For more information on writing event patterns, see [Event patterns](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html) in the *EventBridge User Guide*.

### Testing event patterns for AWS B2B Data Interchange events in EventBridge
<a name="eventbridge-using-events-testing"></a>

You can use the EventBridge Sandbox to quickly define and test an event pattern, without having to complete the larger process of creating or editing a rule. Using the Sandbox, you can define an event pattern and use a sample event to confirm the pattern matches the desired events. EventBridge give you the option of creating a new rule using that event pattern, directly from the sandbox.

For more information, see [Testing an event pattern using the EventBridge Sandbox](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-pattern-sandbox.html) in the *EventBridge User Guide*.

## Amazon EventBridge permissions
<a name="eventbridge-permissions"></a>

AWS B2B Data Interchange doesn't require any additional permissions to deliver events to Amazon EventBridge.

The targets you specify may need specific permissions or configuration. For more details on using specific services for targets, see [Amazon EventBridge targets](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-targets.html) in the *Amazon EventBridge User Guide*.

## Additional EventBridge resources
<a name="eventbridge-additonal-resources"></a>

Refer to the following topics in the [https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html) for more information on how to use EventBridge to process and manage events.
+ For detailed information on how event buses work, see [Amazon EventBridge event bus](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-bus.html).
+ For information on event structure, see [Events](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html).
+ For information on constructing event patterns for EventBridge to use when matching events against rules, see [Event patterns](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html).
+ For information on creating rules to specify which events EventBridge processes, see [Rules](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rules.html).
+ For information on to specify what services or other destinations EventBridge sends matched events to, see [Targets](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-targets.html).

# AWS B2B Data Interchange events detail reference
<a name="events-detail-reference"></a>

All events from AWS services have a common set of fields containing metadata about the event, such as the AWS service that is the source of the event, the time the event was generated, the account and region in which the event took place, and others. For definitions of these general fields, see [Event structure reference](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events-structure.html) in the *Amazon EventBridge User Guide*. 

In addition, each event has a `detail` field that contains data specific to that particular event. The reference below defines the detail fields for the various AWS B2B Data Interchange events.

When using EventBridge to select and manage AWS B2B Data Interchange events, it's useful to keep the following in mind:
+ The `source` field for all events from AWS B2B Data Interchange is set to `aws.b2bi`.
+ The `detail-type` field specifies the event type. 

  For example, `Transformation Completed`.
+ The `detail` field contains the data that is specific to that particular event. 

For information on constructing event patterns that enable rules to match AWS B2B Data Interchange events, see [Event patterns](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html) in the *Amazon EventBridge User Guide*.

For more information on events and how EventBridge processes them, see [Amazon EventBridge events](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html) in the *Amazon EventBridge User Guide*.

## Details fields for transformation events
<a name="detail-fields-transform"></a>

This section describes the detail fields for the following events:
+ Transformation Completed
+ Transformation Failed

The `source` and `detail-type` fields are included because they contain specific values for AWS B2B Data Interchange events. For definitions of the other metadata fields that are included in all events, see [Event structure reference](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events-structure.html) in the *Amazon EventBridge User Guide*.

```
{
  . . .,
  "detail-type": "string",
  "source": "aws.b2bi",
  . . .,
  "detail": {
    "transformer-job-id" : "string",
    "trading-partner-id" : "string",
    "start-timestamp" : "string"                
    "end-timestamp" : "string",
    "x12-transaction-set" : "string",
    "x12-version" : "string",
    "input-file-s3-attributes" : {
       "bucket" : "string",
       "object-key" : "string",
       "object-size-bytes" : "number"
    },
    "output-file-s3-attributes" : {
       "bucket" : "string",
       "object-key" : "string",
       "object-size-bytes" : "number"
    },
    "failure-message" : "string",
    "failure-code" : "string",
    "ack-generation-status" : "string",
    "ack-error-code-detected" : "boolean",
    "input-format" : "string",
    "output-format" : "string",
    "validation-status" : "string",
    "validation-report-s3-location" : {
       "bucket" : "string",
       "object-key" : "string"
    }
}
```

`detail-type`  <a name="event-detail-events-detail-type"></a>
Identifies the type of event.  
For this event, this value is either `Transformation Completed` or `Transformation Failed`.

`source`  <a name="event-detail-events-source"></a>
Identifies the service that generated the event. For AWS B2B Data Interchange events, this value is `aws.b2bi`.

`detail`  <a name="detail"></a>
A JSON object that contains information about the event. The service generating the event determines the content of this field.  
For this event, this data includes:    
`transformer-job-id`  <a name="transformer-job-id"></a>
The unique, system-generated identifier for a transformer run  
`trading-partner-id`  <a name="trading-partner-id"></a>
The unique, system-generated identifier for a trading partner.  
`start-timestamp`  <a name="start-timestamp"></a>
The time stamp for when the transformation request begins processing.  
`end-timestamp`  <a name="end-timestamp"></a>
The time stamp for when the transformation request finishes processing.  
`x12-transaction-set`  <a name="x12-transaction-set"></a>
A list of supported X12 transaction sets. Transaction sets are maintained by the X12 Accredited Standards Committee.  
`x12-version`  <a name="x12-version"></a>
The version to use for the specified X12 transaction set.  
`input-file-s3-attributes`  <a name="input-file-s3-attributes"></a>
This parameter contains the details of the location of the AWS input storage file.     
`bucket`  <a name="bucket"></a>
The container for the object in Amazon S3  
`object-key`  <a name="object-key"></a>
The name assigned to the object in Amazon S3.  
`object-size-bytes`  <a name="object-size-bytes"></a>
The size, in bytes, of the input file.  
`output-file-s3-attributes`  <a name="output-file-s3-attributes"></a>
This parameter contains the details of the location of the AWS output storage file.     
`bucket`  <a name="output-bucket"></a>
The container for the object in Amazon S3  
`object-key`  <a name="output-object-key"></a>
The name assigned to the object in Amazon S3.  
`object-size-bytes`  <a name="output-object-size-bytes"></a>
The size, in bytes, of the output file.  
`failure-message`  <a name="failure-message"></a>
For failed transformations, the details for why the transform failed.  
`failure-code`  <a name="failure-code"></a>
For failed transformations, the reason code for why the transformations failed.  
`ack-generation-status`  <a name="ack-generation-status"></a>
This field is only populated when the transformation is supposed to generate an acknowledgement. The status of acknowledgement for this transformation. Valid values are `NOT_ATTEMPTED`, `COMPLETED`, or `FAILED`.  
`ack-error-code-detected`  <a name="ack-error-code-detected-transform"></a>
This field is only populated for transformations that have a `COMPLETED` `ack-generation-status`. Specifies whether or not an error code was detected during the validation step of acknowledgement generation.  
`input-format`  <a name="input-format"></a>
The format for the source, or input, data: either `JSON` or `XML`. Only populated for Outbound EDI transformations.  
`output-format`  <a name="output-format"></a>
 The format for the output file, `X12`. Only populated for Outbound EDI transformations.   
`validation-status`  <a name="validation-status"></a>
Value is one of `SUCCEEDED`, `FAILED`, or `NOT_ATTEMPTED`.   
`validation-report-s3-location`  <a name="validation-report-s3-location"></a>
The location in Amazon S3 where the validation report is stored.

## Details fields for split transformation events
<a name="detail-fields-split"></a>

This section describes the detail fields for the following events:
+ Transformation Completed
+ Transformation Failed

The `source` and `detail-type` fields are included because they contain specific values for AWS B2B Data Interchange events. For definitions of the other metadata fields that are included in all events, see [Event structure reference](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events-structure.html) in the *Amazon EventBridge User Guide*.

```
{
   "version": "0",
   "id": "12345678-abcd-efgh-ijkl-mnopqrstuvwx",
   "detail-type": "Transformation Completed",
   "source": "aws.b2bi",
   "account": "111122223333",
   "time": "2025-07-11T15:30:00Z",
   "region": "US West (Oregon)",
   "resources": [
      "arn:AWS:b2bi:us-west-2:111122223333:transformer/tr-1a2b3c4d5e6f7g8h9",
      "arn:AWS:b2bi:us-west-2111122223333:profile/p-1a2b3c4d5e6f7g8h9",
      "arn:AWS:b2bi:us-west-2:111122223333:capability/ca-1a2b3c4d5e6f7g8h9",
      "arn:AWS:b2bi:us-west-2:111122223333:partnership/ps-1a2b3c4d5e6f7g8h9"
    ],
    "detail": {
       "trading-partner-id": "tp-1a2b3c4d5e6f7g8h9",
       "start-timestamp": "2025-07-11T15:30:00.000Z",
       "end-timestamp": "2025-07-11T15:30:01.000Z",
       "x12-transaction-set": "X12_856",
       "x12-version": "VERSION_4010",
       "input-file-s3-attributes": {
          "bucket": "amzn-s3-demo-source-bucket",
          "object-key": "tp-1a2b3c4d5e6f7g8h9/sample-856-4010.edi",
          "object-size-bytes": 3000
       },
       "output-file-s3-attributes": {
          "bucket": "amzn-s3-demo-destination-bucket",
          "object-key": "tp-1a2b3c4d5e6f7g8h9/sample-856-4010.edi.2025-07-11T15:30:00.000Z.xml",
          "object-size-bytes": 40000
       },
       "split-attributes": {
          "split-number": 1,
          "total-split-count": 1,
          "split-is-valid": false
       },
       "validation-status": "FAILED",
       "validation-report-s3-location": {
          "bucket": "amzn-s3-demo-bucket",
          "object-key": "tp-abc123def456gh789/VALIDATION_REPORT/456_9876_15txn.x12.2025-08-22T21:30:45.123Z.json.validation-errors.txt"
       }
    }
}
```

`detail-type`  
Identifies the type of event.  
For this event, this value is either `Transformation Completed` or `Transformation Failed`.

`source`  
Identifies the service that generated the event. For AWS B2B Data Interchange events, this value is `aws.b2bi`.

`detail`  
A JSON object that contains information about the event. The service generating the event determines the content of this field.  
For this event, this data includes:    
`transformer-id`  
The unique identifier for the transformer.  
`transformer-job-id`  
The unique identifier for the transformer job.  
`input-file-s3-attributes`  
An object containing the S3 details of the input file.  
`output-file-s3-attributes`  
An object containing the S3 details of the output file for this split.  
`split-attributes`  
An object containing information specific to the split.    
`split-number`  
The index of the current split (1-indexed).  
`total-split-count`  
The total number of splits.  
`split-is-valid`  
Whether the current split is valid according to X12 standard.  
`validation-status`  
Indicates the validity of the original (pre-split) EDI file. Possible values:  
+ `SUCCEEDED`: The original EDI file is valid.
+ `FAILED`: The original EDI file is invalid.
+ `NOT_ATTEMPTED`: The validity check wasn't performed due to an earlier failure in the process.  
`validation-report-s3-location`  
The location in Amazon S3 where the validation report is stored. For example:

## Details fields for acknowledgement events
<a name="detail-ack-events"></a>

This section describes the detail fields for the following events:
+ Acknowledgement Completed
+ Acknowledgement Failed

The `source` and `detail-type` fields are included because they contain specific values for AWS B2B Data Interchange events. For definitions of the other metadata fields that are included in all events, see [Event structure reference](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events-structure.html) in the *Amazon EventBridge User Guide*.

```
{
  . . .,
  "detail-type": "string",
  "source": "aws.b2bi",
  . . .,
  "detail": {
    "transformer-job-id" : "string",
    "trading-partner-id" : "string",
    "start-timestamp" : "string"                
    "end-timestamp" : "string",
    "input-x12-transaction-set" : "string",
    "input-x12-version" : "string",
    "input-file-s3-attributes" : {
       "bucket" : "string",
       "object-key" : "string",
       "object-size-bytes" : "number"
    },
    "ack-x12-type : "string",
    "ack-x12-version : "string",
    "ack-file-s3-attributes" : {
       "bucket" : "string",
       "object-key" : "string",
       "object-size-bytes" : "number"
    },
    "ack-error-code-detected : "boolean",
    "failure-message" : "string",
    "failure-code" : "string"    
  }  
}
```

`detail-type`  <a name="event-detail-events-detail-type-ack"></a>
Identifies the type of event.  
For this event, this value is either `Acknowledgement Completed` or `Acknowledgement Failed`.

`source`  <a name="event-detail-events-source-ack"></a>
Identifies the service that generated the event. For AWS B2B Data Interchange events, this value is `aws.b2bi`.

`detail`  <a name="detail-ack"></a>
A JSON object that contains information about the event. The service generating the event determines the content of this field.  
For this event, this data includes:    
`transformer-job-id`  <a name="transformer-job-id-ack"></a>
The unique, system-generated identifier for a transformer run.  
`trading-partner-id`  <a name="trading-partner-id-ack"></a>
The unique, system-generated identifier for a trading partner.  
`start-timestamp`  <a name="start-timestamp-ack"></a>
The time stamp for when the acknowledgement request begins processing.  
`end-timestamp`  <a name="end-timestamp-ack"></a>
The time stamp for when the acknowledgement request finishes processing.  
`input-x12-transaction-set`  <a name="input-x12-transaction-set"></a>
The X12 transaction set of the input file.  
`input-x12-version`  <a name="input-x12-version"></a>
The version to use for the specified X12 transaction set.  
`input-file-s3-attributes`  <a name="input-file-s3-attributes-ack"></a>
This parameter contains the details of the location of the AWS input storage file.     
`bucket`  <a name="bucket-ack"></a>
The container for the object in Amazon S3  
`object-key`  <a name="object-key-ack"></a>
The name assigned to the object in Amazon S3.  
`object-size-bytes`  <a name="object-size-bytes-ack"></a>
The size, in bytes, of the input file.  
`ack-x12-type`  <a name="ack-x12-type"></a>
X12 type for the acknowledgement.  
`ack-x12-version`  <a name="ack-x12-version"></a>
X12 version for the acknowledgement.  
`ack-file-s3-attributes`  <a name="ack-file-s3-attributes"></a>
This parameter contains the details of the location of the AWS acknowledgement storage file. The acknowledgement file attributes are only included in Acknowledgement Completed events.    
`bucket`  <a name="ack-bucket-ack"></a>
The container for the object in Amazon S3  
`object-key`  <a name="ack-object-key-ack"></a>
The name assigned to the object in Amazon S3.  
`object-size-bytes`  <a name="ack-object-size-bytes-ack"></a>
The size, in bytes, of the acknowledgement file.  
`ack-error-code-detected`  <a name="ack-error-code-detected"></a>
For Acknowledgement Completed events, is either true or false, depending on whether an error code was detected.  
`failure-message`  <a name="failure-message-ack"></a>
For failed acknowledgements, the details for why the event failed.  
`failure-code`  <a name="failure-code-ack"></a>
For failed acknowledgements, the reason code for why the transformations failed.

## EventBridge Example events for B2B Data Interchange
<a name="ev-examples"></a>

This section presents the details for some example events generated by B2B Data Interchange.

**Example Transformation Completed event (for an event that originated from a transformer or standalone)**  <a name="event-detail-example-1"></a>
The following example shows an event where an inbound transformation completed successfully.  

```
{
  "version": "0",
  "id": "370d77b7-cb45-60de-7fc6-cb0522a3e43d",
  "detail-type": "Transformation Completed",
  "source": "aws.b2bi",
  "account": "1234abcd5678",
  "time": "2024-03-08T19:52:48Z",
  "region": "us-east-2",
  "resources": [
    "arn:aws:b2bi:us-east-2:1234abcd5678:transformer/tr-1234567890abcdef0"
  ],
  "detail": {    
    "transformer-job-id": "tj-1111aa2222bb33334444cc",
    "start-timestamp": "2024-03-08T19:52:47.418Z",
    "end-timestamp": "2024-03-08T19:52:48.089Z",
    "x12-transaction-set": "X12_214",
    "x12-version": "VERSION_4010",
    "input-file-s3-attributes": {
      "bucket": "amzn-s3-demo-bucket",
      "object-key": "edi_214_4010.txt",
      "object-size-bytes": 1034
    },
    "output-file-s3-attributes": {
      "bucket": "amzn-s3-demo-bucket1",
      "object-key": "getTransformerJobTestOutput/edi_214_4010.txt.2024-03-12T22:57:42.182Z.json",
      "object-size-bytes": 4174
    },
    "ack-generation-status": "COMPLETED",
    "ack-error-code-detected": false
  }
}
```

**Example Transformation Failed event (for an event that originated from a Capability)**  <a name="event-detail-example-2"></a>
The following example shows an event where a transformation failed to complete successfully.  

```
{
    "version": "0",
    "id": "1ba25f10-d560-3e06-49bb-761a2de88679",
    "detail-type": "Transformation Failed",
    "source": "aws.b2bi",
    "account": "1234abcd5678",
    "time": "2024-03-09T07:29:12Z",
    "region": "us-east-2",
    "resources": [
        "arn:aws:b2bi:us-east-2:1234abcd5678:transformer/tr-1234567890abcdef0",
        "arn:aws:b2bi:us-east-2:639140540422:profile/p-11111aaaa2222bbbb3",
        "arn:aws:b2bi:us-east-2:639140540422:capability/ca-ABCDE111122223333",
        "arn:aws:b2bi:us-east-2:639140540422:partnership/ps-11112222333344445"
    ],
    "detail": {        
        "trading-partner-id": "tp-aaaa11bbbb22cccc33dddd",
        "start-timestamp": "2024-03-09T07:29:12.015Z",
        "end-timestamp": "2024-03-09T07:29:12.149Z",
        "x12-transaction-set": "X12_214",
        "x12-version": "VERSION_4010",        
        "failure-message": "Access denied when getting object attributes from s3://amzn-s3-demo-bucket/myinputs/tp-aaaa11bbbb22cccc33dddd/edi_file_mar_14_2024_2.txt",
        "failure-code": "FILE_TRANSFORM_FAILED",
        "ack-generation-status": "NOT_ATTEMPTED"
    }
}
```

**Example Acknowledgement Completed event**  <a name="event-detail-example-3"></a>
The following example shows an event where an acknowledgement completed successfully.  

```
{
    "version": "0",
    "id": "1ba25f10-d560-3e06-49bb-761a2de88679",
    "detail-type": "Acknowledgement Completed",
    "source": "aws.b2bi",
    "account": "1234abcd5678",
    "time": "2024-03-09T07:29:12Z",
    "region": "us-east-2",
    "resources": [
        "arn:aws:b2bi:us-east-2:1234abcd5678:transformer/tr-1234567890abcdef0",
        "arn:aws:b2bi:us-east-2:639140540422:profile/p-11111aaaa2222bbbb3",
        "arn:aws:b2bi:us-east-2:639140540422:capability/ca-ABCDE111122223333",
        "arn:aws:b2bi:us-east-2:639140540422:partnership/ps-11112222333344445"
    ],
    "detail": {        
        "trading-partner-id": "tp-aaaa11bbbb22cccc33dddd",
        "start-timestamp": "2024-03-09T07:29:12.015Z",
        "end-timestamp": "2024-03-09T07:29:12.149Z",
        "input-x12-transaction-set": "X12_214",
        "input-x12-version": "VERSION_4010",
        "input-file-s3-attributes": {
           "bucket": "amzn-s3-demo-bucket",
           "object-key": "edi_214_4010.txt",
           "object-size-bytes": 449
        },
        "ack-x12-type": "X12_997",
        "ack-x12-version": "VERSION_4010",
        "ack-file-s3-attributes": {
           "bucket": "amzn-s3-demo-bucket2",
           "object-key": "testouput/tp-1234567890abcdef0/ACK/edi_214_4010_event_1 copy 4.txt.2024-04-23T17:00:14.007Z.json.997",
           "object-size-bytes": 379
        },
        "ack-error-code-detected": true
    }
}
```

**Example Acknowledgement Failed event**  <a name="event-detail-example-4"></a>
The following example shows an event where an acknowledgement failed.  

```
{
    "version": "0",
    "id": "1ba25f10-d560-3e06-49bb-761a2de88679",
    "detail-type": "Acknowledgement Completed",
    "source": "aws.b2bi",
    "account": "1234abcd5678",
    "time": "2024-03-09T07:29:12Z",
    "region": "us-east-2",
    "resources": [
        "arn:aws:b2bi:us-east-2:1234abcd5678:transformer/tr-1234567890abcdef0",
        "arn:aws:b2bi:us-east-2:639140540422:profile/p-11111aaaa2222bbbb3",
        "arn:aws:b2bi:us-east-2:639140540422:capability/ca-ABCDE111122223333",
        "arn:aws:b2bi:us-east-2:639140540422:partnership/ps-11112222333344445"
    ],
    "detail": {        
        "trading-partner-id": "tp-aaaa11bbbb22cccc33dddd",
        "start-timestamp": "2024-03-09T07:29:12.015Z",
        "end-timestamp": "2024-03-09T07:29:12.149Z",
        "input-x12-transaction-set": "X12_214",
        "input-x12-version": "VERSION_4010",
        "input-file-s3-attributes": {
           "bucket": "amzn-s3-demo-bucket",
           "object-key": "edi_214_4010.txt",
           "object-size-bytes": 449
        },
        "ack-x12-type": "X12_997",
        "ack-x12-version": "VERSION_4010",
        "failure-message": "997 ACK generation failed. Refer to CloudWatch logs for full details.",
        "failure-code": "ACKNOWLEDGEMENT_FAILED"        
    }
}
```

**Example Transformation Completed event for a split scenario**  <a name="event-detail-example-split"></a>
The following example shows an event where a split transformation completed successfully.  

```
{
    "version": "0",
    "id": "46dcf1c5-0475-1443-4f12-9a33dfc1570d",
    "detail-type": "Transformation Completed",
    "source": "aws.b2bi",
    "account": "1234abcd5678",
    "time": "2025-06-30T15:54:45Z",
    "region": "us-east-2",
    "resources": [
        "arn:aws:b2bi:us-east-2:1234abcd5678:transformer/tr-1234567890abcdef0",
        "arn:aws:b2bi:us-east-2:1234abcd5678:profile/p-11111aaaa2222bbbb3",
        "arn:aws:b2bi:us-east-2:1234abcd5678:capability/ca-ABCDE111122223333",
        "arn:aws:b2bi:us-east-2:1234abcd5678:partnership/ps-11112222333344445"
    ],
    "detail": {
        "trading-partner-id": "tp-aaaa11bbbb22cccc33dddd",
        "start-timestamp": "2025-06-30T15:54:45.579Z",
        "end-timestamp": "2025-06-30T15:54:45.741Z",
        "x12-transaction-set": "X12_214",
        "x12-version": "VERSION_4010",
        "input-file-s3-attributes": {
            "bucket": "amzn-s3-demo-bucket",
            "object-key": "input/tp-aaaa11bbbb22cccc33dddd/214.edi.xml",
            "object-size-bytes": 450
        },
        "output-file-s3-attributes": {
            "bucket": "amzn-s3-demo-bucket",
            "object-key": "output/tp-aaaa11bbbb22cccc33dddd/214.edi.xml.2025-06-30T15:54:43.084Z.XML.split/214.edi.xml.split-000000001.XML",
            "object-size-bytes": 3024
        },
        "split-attributes": {
            "split-number": 1,
            "total-split-count": 1,
            "split-is-valid": true
        },
        "validation-status": "SUCCEEDED"
    }
}
```