Automated Messaging to Office Communicator (from code)
A new feature introduced with Dynamics AX 2009 was integration with Office Communicator.
This enables the presence of a person/contact to be shown as part of the contact information, along with links to contact that person:
Selecting the link to send an instant message to a contact launches the Office Communicator client conversation:

The following job shows how to send an instant message to a contact using Office Communicator from code:
static void UCMAExample(Args _args)
{
AlertSender.OCS_Sender ocSender;
;
try
{
ocSender = new AlertSender.OCS_Sender(@"sip:Administrator@contoso.com", "ax-srv-03.contoso.com",
"Administrator", @"thepassword", "contoso");
ocSender.SendMessage("sip:Alicia@contoso.com", "Hello from AX", "Normal");
}
catch(Exception::CLRError)
{
throw error(AifUtil::getClrErrorMessage());
}
}
To enable this you will need to install the UCMA redistributable, available as part of the UCMA SDK download:
http://www.microsoft.com/downloads/details.aspx?FamilyID=b30306e4-7dc1-44d2-9a68-9b4a6fc5c2df&displaylang=en
You will also need to modify, compile and add the AlertSender.OCS_Sender .Net reference to AX, which is available to download here:
http://www.microsoft.com/downloads/details.aspx?FamilyId=9EFC784B-E443-4441-926C-5FD405D41BD9&displaylang=en
