# MergeProductData

## Overview

The MergeProductData operation uses an originating XML transaction of Expere TXN schema data elements as input and merges it with a retrieved set of data using the OPPSA Organization and Product specified in the request. The result is a combined transaction data set of the originating transaction data and OPPSA product/policy data that can then be used as an input to other processes/tools to present a combined set to a system/user for additional data collection (i.e. DocViewer secondary data collection tool).

This operation returns a merged Expere TXN schema transaction in XML format. This method uses the OPPSA GetOrganizations and GetProductsForOrgGuid methods to validate OPPSA user credentials and permissions. The merge method calls the following existing Expere APIs to pass in an Expere Transaction to obtain OPPSA data and return an updated Expere Transaction with merged data: CreateTransaction, GetTransaction, DeleteTransaction.

Operation | List Documents
--- | ---
Style | document
Operation | Request-response. The endpoint receives a message, and sends a correlated message.
SOAP Action | SOAP Action
Input | IIntegrationService_MergeProductData_InputMessage (soap:body, use = literal) parameters type MergeProductDataRequest
Output | IIntegrationService_MergeProductData_OutputMessage (soap:body, use = literal) parameters type MergeProductDataResponse

## Request Message

The operation input is MergeProductRequest. The request requires a MergeProductDataRequest object containing OPPSA user and password, OPPSA Organization GUID, OPPSA Product, and Originating XML Transaction parameters on the input.

Parameter | Type | Constraints | Description
--- | --- | --- | ---
request | MergeProductDataRequest | Required | The input message for the MergeProductData operation used to request a combined transaction XML that uses a transaction XML dataset from loan origination, merged with OPPSA policy/product data for a specified organization and product requested.

## Response Element

The operation output is MergeProductDataResponse. The response returns a MergeProductDataResponse object containing status information for the request.

Parameter | Type | Description
--- | --- | ---
MergeProductDataResponse | MergeProductDataResponse | The output message for the MergeProductData operation used to return the details of the request.

## MergeProductData Example Request

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:int="http://integrationservice.oppsa.wk">
     <soapenv:Header/>
     <soapenv:Body>
     <int:MergeProductData>
     <!--Optional:-->
     <int:userName>user1</int:userName>
     <!--Optional:-->
     <int:password>Password1111!</int:password>
     <!--Optional:-->
     <int:orgGuid> d2c12e6e845a9685b88f56f2c7dede11</int:orgGuid>
     <!--Optional:-->
     <int:productName>Product AAA</int:productName>
     <!--Optional:-->
     <int:transaction>
     <Txn xmlns="http://schemas.bankerssystems.com/2004/ExpereTxn">
     <Deposit>
     <Accounts>
     <Account index="1">
     <AccountAgreementID>1</AccountAgreementID>
     <AccountType>1</AccountType>
     <CertificateOfDepositCertificateType>2</CertificateOfDepositCertificateType>
     </Account>
     </Accounts>
     </Deposit>
     <OrgJurisdiction>MN</OrgJurisdiction>
     </Txn>
     </int:transaction>
     </int:MergeProductData>
     </soapenv:Body>
    </soapenv:Envelope>

## MergeProduct Example Response

    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
     <s:Header>
     <ActivityId CorrelationId="51613607-c41a-4b2c-9705-93097abd2570" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">a5377417-1e1c-4777-b8d2-f9edc08994c2</ActivityId>
     </s:Header>
     <s:Body>
     <MergeProductDataResponse xmlns="http://integrationservice.oppsa.wk">
     <MergeProductDataResult>
     <p:Txn xmlns:p="http://schemas.bankerssystems.com/2004/ExpereTxn">
     <p:Deposit>
     <p:Accounts>
     <p:Account index="1">
     <p:AccountAgreementID>1</p:AccountAgreementID>
     <p:AccountType>1</p:AccountType>
     <p:CertificateOfDepositCertificateType>2</p:CertificateOfDepositCertificateType>
     <p:TCACHWireTransfersInd>1</p:TCACHWireTransfersInd>
     </p:Account>
     </p:Accounts>
     <p:BusinessCardPolicies>
     <p:BusinessCardPolicy>
     <p:PaymentOrderType>1</p:PaymentOrderType>
     <p:FinancialInstitutionTerminationType>1</p:FinancialInstitutionTerminationType>
     <p:AccessibleAccountsDesc>acount types description</p:AccessibleAccountsDesc>
     <p:TransactionType>1</p:TransactionType>
     <p:EntityTerminationType>1</p:EntityTerminationType>
     <p:NameDesc>BUS DEBIT CARD NAME</p:NameDesc>
     </p:BusinessCardPolicy>
     </p:BusinessCardPolicies>
     </p:Deposit>
     <p:OrgJurisdiction>MN</p:OrgJurisdiction>
     <p:OrgShortName>Main Bank</p:OrgShortName>
     <p:OrgPhone>(800) 222-3333</p:OrgPhone>
     <p:OrgAddresses>
     <p:OrgAddress>
     <p:Value>1234 Main Street</p:Value>
     </p:OrgAddress>
     </p:OrgAddresses>
     <p:OrgType>National Bank</p:OrgType>
     <p:OrgFaxNumber>( ) -</p:OrgFaxNumber>
     <p:OrgPostalCode>55555</p:OrgPostalCode>
     <p:OrgInsurerType>1</p:OrgInsurerType>
     <p:OrgTaxID>88-1234567</p:OrgTaxID>
     <p:OrgState>MN</p:OrgState>
     <p:OrgCounty>Stearns</p:OrgCounty>
     <p:OrgLegalName>Legal Main Bank</p:OrgLegalName>
     <p:Regulators>
     <p:Regulator>
     <p:RegulatorType>2</p:RegulatorType>
     </p:Regulator>
     </p:Regulators>
     <p:OrgCity>Saint Cloud</p:OrgCity>
     <p:OrgCharter>Federal</p:OrgCharter>
     </p:Txn>
     </MergeProductDataResult>
     </MergeProductDataResponse>
     </s:Body>
    </s:Envelope>