This site doesnt allow the use of the word c o n t a c t so I've modified accordinly.
We need a custom plug-in developed for CRM 4.0 as follows:
We get emails from a vendor that contain (K)ontact/Order information in an XML file. One email/XML file per Order. We need a plug-in created that can parse that xml info and create a new (K)ontact (or update an existing (K)ontact), and then perform a (K)ontact assignement given some rules. the flow is as follows:
email received in CRM Queue (email router functioning now)
plug-in fires via a workflow when new Queue item is received
XML file attachment is parsed, and the fields are used to as follows:
If (K)ontact Not exist then
create a new (K)ontact and add a Note Entry with info from the XML file
Assign (K)ontact based on round robin selection of users who belong to the "WTN Team"
Create new Appointment Activity for (K)ontact created with a due date of Now() + 5 mintues
Else If (K)ontact Exists then
Update existing (K)ontact and add a new Note Entry with info from the XML file
Create new Appointment Activity for (K)ontact with a due date of Now() + 5 mintues
The Contents of the XML file attachment to the email that is sent are as follows:
<OrderDate>April 19, 2011<OrderDate>
<OrderTotal>$[url removed, login to view]<OrderTotal>
The format of the XML file remains consistent for every email received.
There is only one Parent Customer, and all new (K)ontacts will be added to that parent Customer
the key fields are CRM's "Parent Customer" and XML file <Customer No>
If it is found that (K)ontact/<Customer No.> already exists under the parent customer, then it is an UPDATE (K)ontact function, else it is an ADD (K)ontact function.
Appointment Activity Info:
The Subject of the Appointment Activity will be "NEW WTN Order: <OrderTotal> from <CustomerFirst> <CustomerLast>"
Appointment Category: WTN
Start Time: Now() + 5 minutes
End Time: Now() + 10 minutes
Owner = (K)ontact owner
Change new_EmailState = Processed (change from value of 1/Unprocessed to value of 2/Processed)