Automatically look up the contact ID in salesforce

I would like a feature that would operate when a case is created in Salesforce from JIRA. It would probably make sense to be able to turn on this feature for certain JIRA projects.


Background:

I believe the main reason for creating a case in Salesforce is so that Sales People can know if there are any outstanding "issues" with their customers. Unfortunately, the native way that the connector creates a case produces a case with no contacts or account in Salesforce.

There is a cumbersome workaround to this where I can map the Reporter field in JIRA to the Contact ID field in Salesforce. I can then specify a field map where I list JIRA users and map it to the 18 character Salesforce ID. Unfortunately when the contact list gets large, it be very cumbersome. In addition, the mapping needs to be repeated with other issue types.


Request:

I would like the connector that creates a case to automatically look up the contact ID in salesforce and update it. The contact object has an email address index. Therefore, it should be fairly easy to use the email address of the JIRA Reporter and lookup the Salesforce Contact ID based on that email address. It should then add the Contact ID to the case record it creates. It appears that once the Salesforce contact ID is updated in a case, Salesforce uses the contact record to update the account ID.

In the possible instance that multiple Salesforce Contacts share the same email address, it would be acceptable to arbitrarily pick one of them (perhaps the first one returned) and use it's Contact ID. They are likely to map to the same Account ID.

It is possible that the lookup will fail. In that case, the contact ID should be zero. It would be nice to know that happened, but a simple way of doing so would be to add a new indicator in the associated Cases area of JIRA that there is no contact in the case in Salesforce. Perhaps a little "No Contact" icon could appear, or maybe even a little Face with a slash through it. This would allow an indicate whether the contact was created automatically via the POST function on a transition or manually in the "Create Salesforce Object" manual process.

You probably would want to make this feature optional, probably by Project since it may not make sense for all JIRA Projects.

  • Sam Gatica
  • May 2 2016
  • Needs review
  • Attach files