The following XML example shows how to use an eConnect XML document to retrieve a customer record. Note the following characteristics of the document:
- The document contains a single <RQeConnectOutType> transaction type schema. The schema contains XML nodes you use to specify an existing customer record.
- Notice how the <RQeConnectOutType> schema includes <eConnectProcessInfo> and <eConnectOut> nodes. You use these nodes to specify the customer and how you want to retrieve the data for the customer record.
- Notice how the <Outgoing> element of the <eConnectProcessInfo> node is set to TRUE. You use TRUE to specify that this is a request for an existing record. Also notice how the <MessageID> element describes the record type.
- Notice that the <DOCTYPE> element of the <eConnectOut> node specifies the value Customer. The value identifies the type of document in the eConnect_Out_Setup table that you want to use to retrieve the record.
- Notice how the <OUTPUTTYPE> element specifies the value of 2. A value of 2 instructs eConnect to return complete customer record for the specified customer.
- Notice how the <INDEX1TO> and <INDEX1FROM> elements specify the ID of the customer you want to retrieve. To retrieve a customer, the INDEX1 column in the eConnect_Out_Setup table requires you to submit a CUSTNMBR value. To retrieve a single record, you use the same ID value to populate the <INDEX1TO> and <INDEX1FROM> elements.
- The values that populate the <FORLOAD>, <FORLIST>, and <ACTION> elements instruct eConnect to return the document to the caller and not create a record in the eConnect_Out table.
<eConnect xmlns:dt="urn:schemas-microsoft-com:datatypes">
<RQeConnectOutType>
<eConnectProcessInfo>
<Outgoing>TRUE</Outgoing>
<MessageID>Customer</MessageID>
</eConnectProcessInfo>
<eConnectOut>
<DOCTYPE>Customer</DOCTYPE>
<OUTPUTTYPE>2</OUTPUTTYPE>
<INDEX1TO>ADAMPARK0001</INDEX1TO>
<INDEX1FROM>ADAMPARK0001</INDEX1FROM>
<FORLOAD>0</FORLOAD>
<FORLIST>1</FORLIST>
<ACTION>0</ACTION>
<ROWCOUNT>0</ROWCOUNT>
<REMOVE>0</REMOVE>
</eConnectOut>
</RQeConnectOutType>
</eConnect>