Transaction Response Events

EPC notifies integrations of transaction response processing success or errors via callback transaction events, enabling Partners to update and synchronize their internal management of orders against transaction processing success/errors in the EPC platform, and drive the appropriate workflows in their application.


Prerequisite


Of-course, the first thing a Partner needs to do is make sure their subject product subscribes to webhook notifications for the urn:elli:epc:transaction:event resources created event type. This is done via the products configuration, and illustrated in the Working with Webhooks section.

Once this is done, for all transaction response processing success/errors, the product will receive callback transaction events in the following manner:


Step 1: Receive webhook for urn:elli:epc:transaction:event resource


This indicates that a new event has been created for the subject transaction and can be retrieved.

{
  "eventTime" : "2020-05-02T11:08:52Z",
  "eventType" : "created",
  "meta" : {
    "resourceType" : "urn:elli:epc:transaction:event",
    "resourceId" : "{{TRANSACTION_EVENT_ID}}",
    "instanceId" : "{{PRODUCT_NAME}}",
    "resourceRef" : "https://api.elliemae.com/partner/v2/transactions/{{TRANSACTION_ID}}/events/{{TRANSACTION_EVENT_ID}}"
  }
}

Step 2: Retrieve the created transaction event


To retrieve details of the transaction event, the Partner will call back into EPC. The callback URL is provided under the resourceRef property of the Webhook JSON payload, as shown in the example below:

{
    "id": "28d673d6-e0ba-4d8c-a60c-22bd762e2197",
    "text": "Transaction response successfully processed",
    "type": "urn:elli:epc:transaction:response:processed",
    "from": "System",
    "sent": "2021-05-27T17:14:21Z",
    "comments": "Transaction response successfully processed",
    "details": {
      "status": "Processing",
      "requestType": "UpdateLoan",
      "transactionId": "1d4b6e93-47c7-400d-855d-5d530c773e7a"
    }
  }

Step 3: Interpret the transaction event


The following event types are emitted by the System (read, EPC platform) when processing a transaction response:


✅ Response processing success! urn:elli:epc:transaction:response:processed


{
    "id": "11512820-cf41-4e99-a44c-4169fed0cf14",
    "text": "Transaction response successfully processed",
    "type": "urn:elli:epc:transaction:response:processed",
    "from": "System",
    "sent": "2021-05-12T23:55:54Z",
    "comments": "Transaction response successfully processed",
    "details": {
      "status": "Success",
      "requestType": "UpdateLoan",
      "transactionId": "1556d0c5-2d6e-461c-a7cd-2280305e7358"
    }
  }


❌ Error in processing the transaction response: urn:elli:epc:transaction:response:error


{
    "id": "23e449cc-990b-4f18-922c-327e8b06ed52",
    "text": "Bad data in transaction response",
    "type": "urn:elli:epc:transaction:response:error",
    "from": "System",
    "sent": "2021-05-12T23:56:49Z",
    "comments": "{\"summary\":\"Bad Request\",\"details\":\"Request Payload has errors\",\"errors\":[{\"summary\":\"changeset[0].value.loanContract.applications[0].id\",\"details\":\"Error in changeset[0].value.loanContract.applications[0].id: id field is required for updating\"}]}",
    "details": {
      "status": "Error",
      "requestType": "UpdateLoan",
      "transactionId": "1556d0c5-2d6e-461c-a7cd-2280305e7358"
    }
  }
{
    "text": "Data validation error in transaction response",
    "type": "urn:elli:epc:transaction:response:error",
    "from": "System",
    "comments": "{\"summary\": \"Conflict\", \"details\": \"Field entry rules validation failed\", \"errors\": [ { \"summary\": \"loan.borrowerRequestedLoanAmount\", \"details\": \"The value must be in the range between 1 and 100\" }]}"
    "details": {
      "status": "Error",
      "requestType": "UpdateLoan",
      "transactionId": "1556d0c5-2d6e-461c-a7cd-2280305e7358"
    } 
}


🕒 Retry initiation, for retry-able errors: urn:elli:epc:transaction:response:retry


{
    "text": "Transaction response processing retry in progress",
    "type": "urn:elli:epc:transaction:response:retry",
    "from": "System",
    "comments": "{{Partner facing details of error that caused us to kick-off retry process}}"
}


❌ Error after retrying, for retry-able errors: urn:elli:epc:transaction:response:error


{
    "text": "Transaction response processing retry failed",
    "type": "urn:elli:epc:transaction:response:error",
    "from": "System",
    "comments": "{{Partner facing details of error that caused us to fail out of retry process}}"
}