Input Message Sample

Input messages contain several required tags that determine what operation should be performed and what entity is affected. The following is an example of an input message:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<crm:account.Create schemaVersion="1.0" xmlns:crm="urn:iwaysoftware:adapter:MSCRM2011:account:Create" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <crm:EntityList>
      <crm:Entity>
         <crm:Params>
            <crm:accountcategorycode>1</crm:accountcategorycode>
            <crm:accountratingcode>1</crm:accountratingcode>
            <crm:name>account1</crm:name>
            <crm:numberofemployees>1234</crm:numberofemployees>
            <crm:ownershipcode>1</crm:ownershipcode>
            <crm:participatesinworkflow>0</crm:participatesinworkflow>
            <crm:paymenttermscode>1</crm:paymenttermscode>
         </crm:Params>
      </crm:Entity>
      <crm:Entity>
         <crm:Params>
            <crm:accountcategorycode>1</crm:accountcategorycode>
            <crm:accountratingcode>1</crm:accountratingcode>
            <crm:name>account2</crm:name>
            <crm:numberofemployees>1234</crm:numberofemployees>
            <crm:ownershipcode>1</crm:ownershipcode>
            <crm:participatesinworkflow>0</crm:participatesinworkflow>
            <crm:paymenttermscode>1</crm:paymenttermscode>
         </crm:Params>
      </crm:Entity>
   </crm:EntityList>
</crm:account.Create>

In this example, the input message contains a command to create two accounts (Batch Account 1 and Batch Account 2). The input message can contain only one action, but multiple entities. Each entity is processed as a separate request to MS CRM. Since iWay Application Adapter for Microsoft Dynamics CRM 2011 On-Premises does not support transactions, some of the entities can be created while others may fail.