Developer Programs

Learn

Docs
Important notification about upcoming changes to the DMZ environment. Please read.

Related Account Emails

Enterprise SOAP API > Tutorials > Customer > Related Account Emails

How to get email addresses from related accounts

Steps

There are two steps to retrieve email addresses for related accounts:

  1. Find related account IDs: We’ll use the jXchange SOAP <AcctRelSrch> operation. This call will return a list of customer IDs (<CustId>) for accounts related to the original account. AcctRelSrch
  2. Get email addresses for each ID: For each retrieved <CustId>, we’ll make another jXchange SOAP call using the <CustInq> operation. This will provide the email addresses associated with that specific customer ID. CustInq

Further Information

AcctRelSrch will give you a response with an an array of associated <CustId> in a <AcctRelSrchRecArray>.

The <AcctRelSrchRecArray> returns quite a bit of information on each account, as shown below. However, it does not list any email addresses. That is why you will need to make a subsequent call to <CustInq> to get the email addresses.

Example `<AcctRelSrchRecArray>`
 <AcctRelSrchRecArray>
     <AcctRelSrchRec>
         <CustId>MAA0999</CustId>
         <PersonName>
             <ComName>Cody J Mike</ComName>
             <FirstName>Cody</FirstName>
             <MiddleName>J</MiddleName>
             <LastName>Mike</LastName>
             <Ver_1/>
         </PersonName>
         <AcctRelCode>P</AcctRelCode>
         <AcctRelDesc>Primary</AcctRelDesc>
         <TaxId MaskVal="006-66-6666">6666666</TaxId>
         <TINDesc>Individual TIN</TINDesc>
         <Addr>
             <FreeFormAddrArray>
                 <AddrLineInfo>
                     <AddrLine>Cody J Mike</AddrLine>
                     <Ver_1/>
                 </AddrLineInfo>
                 <AddrLineInfo>
                     <AddrLine>123 main</AddrLine>
                     <Ver_1/>
                 </AddrLineInfo>
                 <AddrLineInfo>
                     <AddrLine>Fairless Hills PA 19030</AddrLine>
                     <Ver_1/>
                 </AddrLineInfo>
             </FreeFormAddrArray>
             <StreetAddr1>123 main</StreetAddr1>
             <City>Fairless Hills</City>
             <StateCode>PA</StateCode>
             <PostalCode>190300000</PostalCode>
             <County>0</County>
             <FornAddr>N</FornAddr>
             <InvAddr>N</InvAddr>
             <Ver_1/>
             <StreetAddr3>Fairless Hills PA 19030</StreetAddr3>
             <Ver_2/>
         </Addr>
         <CustType>Individual</CustType>
         <BirthDt>1990-01-01</BirthDt>
         <Ver_1/>
     </AcctRelSrchRec>
 </AcctRelSrchRecArray>

Each <CustInq> call will return a response that will show an <EmailArray> for each individual <CustId>, as shown below.

Example EmailArray
<EmailArray>
    <EmailInfo>
        <EmailAddr>jdoe@bank.com</EmailAddr>
        <EmailType>Primary E-Mail</EmailType>
        <Ver_1/>
    </EmailInfo>
    <EmailInfo>
        <EmailAddr>jdoe@gmail.com</EmailAddr>
        <EmailType>Secondary E-Mail</EmailType>
        <Ver_1/>
    </EmailInfo>
</EmailArray>

Keep in mind, that you can further refine this multi-step process by checking the <AcctRelCode> of each related <CustId> in the <AcctRelSrchRec>. This will allow you to gather only emails for primary, authorized signers, or whatever you might need.

Referenced and Associated Operations

It is highly recommended that as part of referencing this use case that a user becomes familiar with the following jXchange operations and their function. While the user may elect to not use the listed operation as part of their programming or workflow, knowledge of the operations listed below is essential to understanding the process set forth with this use case.

Detailed information about the operation, the request structure/response, error messages and other useful information can be obtained by clicking the operation names below.

Operation NameDescriptionXSD/WSDL Container
AcctRelSrchSearch related accountsInquiry
CustAddCreate a new customer recordCustomer
CustInqInquire on existing customer informationCustomer
CustModModify an existing customer recordCustomer
CustRelAddCreate a relationship between customersCustomer
CustRelAddValidateValidate the relationship fieldsCustomer
CustRelModUpdate or delete a relationship between customersCustomer

Have a Question?
Have a how-to question? Seeing a weird error? Get help on StackOverflow.
Register for the Digital Toolkit Meetup where we answer technical Q&A from the audience.
Last updated Thu May 9 2024