Configuration Single Entity Message
The Connector you develop using the Messaging Framework must be able to parse messages received from the sending API. To parse the message, the Connector must understand the data structure for each message object. You can use a sample message from the sending API to configure the code that parses the inbound message by pasting the sample message as JSON in the item.cs file in your project and modifying the Connector.cs file to match the changes in item.cs. See Creating Message Classes for step-by-step instructions on pasting a message into your project.
If the message received from the third-party API is configured such that the entire message is the entity, note the following:
In JSON the message might look like:
{ "FirstName": "Abby", "LastName": "Aaron" }
Pasting that line as JSON to create classes in your project would result in C# code that looked like:
public class RootobjectPerson
{
public string FirstName { get; set; }
public string LastName { get; set; }
}
In this example we changed the name from the default of ‘Rootobject’ to ‘Person’, because that is a clearer name for this data.
You also need to modify the Connector.cs file to recognize the change made in the item.cs file to include the name change from Rootobject to Person:
protected override IDictionary<string, MessageDescription> RegisterEntities()
{
return this.Start.Register<Person>();
}
See