Nintex Workflow – vtiger CRM UDAs
Looking into CRM systems that are out there, that are cloud based, vtiger CRM came up. Since Nintex Workflow doesn’t have built in connectors to vtiger, I decided to look into their REST API. I investigated what the login steps are, and what is needed, eg access key, login details etc.
There are few things you will need, before you can start building a workflow to talk to vtiger CRM.
1. When you login into vtiger, on the top right, click on the icon that looks like a person and the select My Preferences. Scroll down and you’ll find your Access Key.
2. Next, you’ll need to install the following into your SharePoint farm. -> Download the NtxSecurity.dll.
This assembly contains an inline function for Nintex Workflow, called MD5. This is used in the workflow design to perform an MD5 hash of some data which is needed for communication with vtiger CRM. In the zip file is a .bat file that runs NWAdmin to install the inline function. You’ll need to make sure to add the dll into the GAC first.
3. Take note of your username, because that will also be required in the first UDA, called “vtiger CRM Login UDA”.
4. Finally, there are a few Workflow Constants you need to create.
I created the following so that I don’t have to type this stuff into my actions:
For the URL, I’ve appended /webservice.php because this is the url we will always be using.
vtiger CRM Login UDA
This User Defined Action does all the heavy lifting for you. You give it the Username and Access Key, and in return you get the Session Name and the current users ID. Store those in variables, because you will need to use them. The Session Name is used with every future call. The Current User ID is required in some calls, especially those that update records in vtiger.
Behind the scenes, here are the calls that are being made to vtiger CRM.
To use the UDA, here’s how I configured it in my workflow:
vtiger CRM Create Contact UDA
This action takes that Session Name that was created by the Login action, and lets you go and create a new contact in vtiger CRM.
It also needs the following : Contact Type (which in this case will be lead), the current users ID and the last name of the contact.
The output value is the new contacts ID. That way, you can store that, and use it in future calls to vtiger.
vtiger CRM Retrieve Contact UDA
Before you can update a contact, you will need the contact data packet. This will get you that entire packet.
vtiger CRM Update Contact UDA
The finally UDA I built was an Update Contact UDA. You provide a the contacts packet of data that you retrieved from the Retrieve action, and the first name that you want to set, and the UDA will use Regular Expression to update the packet of Contact data with the new first name. Then it will update xtiger.
The point of this post is to show what could be done. It is far from complete and will most likely require you to make some tweaks to do exactly what you want. Also, we’re talking about created, querying and updating Contacts. There are many other content types in vtiger CRM that you could use this stuff for.
Hopefully, for those who are Nintex customer or looking to be, and you’re using vtiger CRM, this should give you a good idea of how easy it is to talk to vtiger from Nintex Workflow.
Also, once you have UDAs, it makes it easier for your end uses to build workflows to communicate with vtiger CRM, without having to worry about how to make web service calls.