Link the Cases (Created through Support Mails) to Case Workflow

By | December 18, 2008

Query

I have set up CRM to auto-respond to support emails and create cases from them, as described in the Systems Administrator’s guide. This is all working fine.

However, the created cases are not assigned to the case workflow.

We have multiple case workflows, and I would like to be able to assign the new case to a specific workflow. I assume I will have to modify the support.js file to accomplish this, but I’m unsure of the mechanism for assigning a programmatically created case to a workflow. Has anyone done this?

Answer

You are right about making changes to the “Support.js” file in order to Log a case in Sage CRM. Well as for the mechanism, I will surely help you as how to go about achieving this.

What you are missing here is you are not updating the “Case_workflowId” field while logging a new Case in Sage CRM. The Standard Sage CRM functionality does this automatically by creating a record in the “WorkflowInstance” table. Here the actual linking of the newly created Case record with the “Case Workflow” (i.e. kept as “Enabled” in your Sage CRM system) is made by updating some fields from “WorkflowInstance” table.

Since you are doing this manually in the script file, you will need to create a record in the “WorkflowInstance” table when a new case is logged in Sage CRM.

Here the logic that you will need to follow…

  1. When a new case is created in Sage CRM, you will need to insert a new record in the “WorkflowInstance” table with the Case Id for the newly created Case record.
  2. Here please note that, you will need to update 4 fields i.e. “WkIn_WorkflowId” (here you will need store the Workflow Id which you can fetch from the “Workflow” table), “WkIn_CurrentRecordId” (here you will need to store the newly logged Case Id), “WkIn_CurrentEntityId” (in your case this will always be “Cases” table Id. Please fetch the Id from the “Custom_Tables” table) and “WkIn_CurrentStateId” (the State of the Case. Please fetch the State Id from the “WorkflowState” table).
  3. After that you will need to update the WorkflowInstance Id with the “Case_workflowId” field for that particular Case record.

This is something that you will need to follow when you are logging a particular Case externally in order to link the same with the existing Case workflow (in your case you can hard code the Workflow Id as you have more than One case workflow in your Sage CRM system).

About Us
Greytrix a globally recognized Premier Sage Gold Development Partner is a one stop solution provider for Sage ERP and Sage CRM needs. Being recognized and rewarded for multi-man years of experience, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third party add-on development and implementation expertise.

Greytrix has some unique integration solutions for Sage CRM with Sage ERPs (Sage Enterprise Management (Sage X3), Sage Intacct, Sage 100Sage 500 and Sage 300).We also offer best-in-class Sage ERP and Sage CRM customization and development services to Business Partners, End Users and Sage PSG worldwide. Greytrix helps in migrating of Sage CRM from Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer. Our Sage CRM Product Suite includes Greytrix Business Manager, Sage CRM Project Manager, Sage CRM Resource Planner, Sage CRM Contract Manager, Sage CRM Event Manager, Sage CRM Budget Planner, Gmail Integration, Sage CRM Mobile Service Signature and Sage CRM CTI Framework.

Greytrix is a recognized Sage Rockstar ISV Partner for GUMU™ Sage Enterprise Management – Sage CRM integration also listed on Sage Marketplace.

For more information on our integration solutions, please contact us at sage@greytrix.com. We will be glad to assist you.