Processing a Transaction with AutoSelection

This scenario processes specifically chosen documents based on autoselection logic. To process specific documents, you can use the Select operation (or any of the select document generation operations; , SelectAndGenerate, SelectGenerateAndSave).

First, invoke ListPackages to get a list of the document packages for an organization. By submitting the OrganizationID on the request, only Packages visible by this organization are returned. Alternatively, ListLinesOfBusiness and ListPhases could be used to get a respective list of document packages that can also be used.

Next, using the response from ListPackages, you can find the PackageID values for all of the document packages for the organization. The PackageID value, along with the TransactionID, is then used to request a document package on the Select operation (SelectRequest).
soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:exp="http://schemas.bankerssystems.com/2004/ExpereAPI/ExpereIEServices">
 <soapenv:Header/>
 <soapenv:Body>
 <exp:SelectRequest>
 <!--Optional:-->
 <exp:Transaction>
 <!--Optional:-->
 <exp:TransactionID>?</exp:TransactionID>
 <!--Optional:-->
 <exp:Data>
 <!--You may enter ANY elements at this point-->
 </exp:Data>
 <!--Optional:-->
 <exp:SaveInDatabase>?</exp:SaveInDatabase>
 <!--Optional:-->
 <exp:HtmlData>?</exp:HtmlData>
 <!--Optional:-->
 <exp:FileName>?</exp:FileName>
 <!--Optional:-->
 <exp:BaselineTransactionName>?</exp:BaselineTransactionName>
 <!--Optional:-->
 <exp:CustomerTransactionName>?</exp:CustomerTransactionName>
 <!--Optional:-->
 <exp:BaselineTransaction>
 <!--Optional:-->
 <exp:FileName>?</exp:FileName>
 <!--Optional:-->
 <exp:Date>?</exp:Date>
 </exp:BaselineTransaction>
 <!--Optional:-->
 <exp:CustomerTransaction>
 <!--Optional:-->
 <exp:FileName>?</exp:FileName>
 <!--Optional:-->
 <exp:Date>?</exp:Date>
 </exp:CustomerTransaction>
 </exp:Transaction>
 <!--Optional:-->
 <exp:Organization>
 <!--Optional:-->
 <exp:OrganizationID>?</exp:OrganizationID>
 <!--Optional:-->
 <exp:OrganizationName>?</exp:OrganizationName>
 <!--Optional:-->
 <exp:OrganizationDescription>?</exp:OrganizationDescription>
 <!--Optional:-->
 <exp:ParentOrganizationID>?</exp:ParentOrganizationID>
 </exp:Organization>
 <!--Optional:-->
 <exp:RequestID>?</exp:RequestID>
 <!--Optional:-->
 <exp:Policy>
 <!--Optional:-->
 <exp:PolicyID>?</exp:PolicyID>
 <!--Optional:-->
 <exp:PrecedenceID>?</exp:PrecedenceID>
 </exp:Policy>
 <!--Optional:-->
 <exp:Oppsa>
 <!--Optional:-->
 <exp:OppsaOrganizationName>?</exp:OppsaOrganizationName>
 <!--Optional:-->
 <exp:OppsaProductName>?</exp:OppsaProductName>
 <!--Optional:-->
 <exp:WIP>?</exp:WIP>
 </exp:Oppsa>
 <!--Optional:-->
 <exp:PackageID>?</exp:PackageID>
 <!--Optional:-->
 <exp:LOBPhase>
 <!--Optional:-->
 <exp:LineOfBusinessID>?</exp:LineOfBusinessID>
 <!--Optional:-->
 <exp:Phase>?</exp:Phase>
 </exp:LOBPhase>
 </exp:SelectRequest>
 </soapenv:Body>
</soapenv:Envelope>
The response from the Select operation (SelectResponse) contains a list of the autoselected and suggested documents for the transaction. In this example Sample Document 1 and Sample Document 2 have been autoselected, Sample Document 3 has been suggested.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<r:SelectResponse xmlns:r="http://schemas.bankerssystems.com/2004/ExpereAPI/ExpereIEServices">
<r:DocumentSet>
<r:Document>
 <r:DocumentID>PKGD.SampleDocument1</r:DocumentID>
 <r:DisplayName>Sample Document 1</r:DisplayName>
 <r:Type>Template</r:Type>
 <r:Autoselected>true</r:Autoselected>
 <r:Suggested>false</r:Suggested>
 <r:Prepare>true</r:Prepare>
</r:Document>
<r:Document>
 <r:DocumentID>PKGD.SampleDocument2</r:DocumentID>
 <r:DisplayName>Sample Document 2</r:DisplayName>
 <r:Type>Dynamic</r:Type>
 <r:Autoselected>true</r:Autoselected>
 <r:Suggested>false</r:Suggested>
 <r:Prepare>true</r:Prepare>
</r:Document>
<r:Document>
 <r:DocumentID>PKGD.SampleDocument3</r:DocumentID>
 <r:DisplayName>Sample Document 3</r:DisplayName>
 <r:Type>Dynamic</r:Type>
 <r:Autoselected>false</r:Autoselected>
 <r:Suggested>true</r:Suggested>
 <r:Prepare>false</r:Prepare>
</r:Document>
</r:DocumentSet>
</r:SelectResponse>
</soap:Body>
</soap:Envelope>

To add the suggested documents to the transaction, use the list returned as part of the Generate response. Now that the document set has been selected for the transaction, invoke Generate to assemble all of the documents, the response contains all assembled documents.