{"id":63,"date":"2008-12-18T11:13:00","date_gmt":"2008-12-18T11:13:00","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/?p=63"},"modified":"2020-02-27T09:09:40","modified_gmt":"2020-02-27T09:09:40","slug":"link-the-cases-created-through-support-mails-to-case-workflow","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2008\/12\/18\/link-the-cases-created-through-support-mails-to-case-workflow\/","title":{"rendered":"Link the Cases (Created through Support Mails) to Case Workflow"},"content":{"rendered":"<p><span style=\"color: #c71d22; font-size: 13pt;\"><strong>Query<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\">I have set up CRM to auto-respond to support emails and create cases from them, as described in the Systems Administrator&#8217;s guide. This is all working fine.<\/p>\n<p>However, the created cases are not assigned to the case workflow.<\/p>\n<p style=\"text-align: justify;\">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&#8217;m unsure of the mechanism for assigning a programmatically created case to a workflow. Has anyone done this?<\/p>\n<p><span style=\"color: #c71d22; font-size: 13pt;\"><strong>Answer<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\">You are right about making changes to the \u201cSupport.js\u201d 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.<\/p>\n<p style=\"text-align: justify;\">What you are missing here is you are not updating the \u201cCase_workflowId\u201d field while logging a new Case in Sage CRM. The Standard Sage CRM functionality does this automatically by creating a record in the \u201cWorkflowInstance\u201d table. Here the actual linking of the newly created Case record with the \u201cCase Workflow\u201d (i.e. kept as \u201cEnabled\u201d in your Sage CRM system) is made by updating some fields from \u201cWorkflowInstance\u201d table.<\/p>\n<p style=\"text-align: justify;\">Since you are doing this manually in the script file, you will need to create a record in the \u201cWorkflowInstance\u201d table when a new case is logged in Sage CRM.<\/p>\n<p>Here the logic that you will need to follow\u2026<\/p>\n<ol>\n<li>When a new case is created in Sage CRM, you will need to insert a new record in the \u201cWorkflowInstance\u201d table with the Case Id for the newly created Case record.<\/li>\n<li>Here please note that, you will need to update 4 fields i.e. \u201cWkIn_WorkflowId\u201d (here you will need store the Workflow Id which you can fetch from the \u201cWorkflow\u201d table), \u201cWkIn_CurrentRecordId\u201d (here you will need to store the newly logged Case Id), \u201cWkIn_CurrentEntityId\u201d (in your case this will always be \u201cCases\u201d table Id. Please fetch the Id from the \u201cCustom_Tables\u201d table) and \u201cWkIn_CurrentStateId\u201d (the State of the Case. Please fetch the State Id from the \u201cWorkflowState\u201d table).<\/li>\n<li>After that you will need to update the WorkflowInstance Id with the \u201cCase_workflowId\u201d field for that particular Case record.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">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).<\/p>\n<p><span style=\"font-size: Medium;\"><strong>About Us<\/strong><\/span><br \/>\n<a href=\"https:\/\/www.greytrix.com\/\">Greytrix<\/a> 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.<\/p>\n<p><a href=\"https:\/\/www.greytrix.com\/\">Greytrix<\/a>&nbsp;has some unique integration solutions for Sage CRM with Sage ERPs (<a href=\"https:\/\/www.greytrix.com\/product\/sage-crm\/gumu-sage-x3-integration\">Sage Enterprise Management (Sage X3<\/a>),&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/intacct-apps-and-products\/gumu-sage-intacct-sage-crm-integration\">Sage Intacct<\/a>, <a href=\"https:\/\/www.greytrix.com\/product\/sage-crm\/gumu-sage-100-erp-integration\">Sage 100<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/sage-crm\/gumu-sage-500-erp-integration\">Sage 500<\/a>&nbsp;and&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/sage-crm\/gumu-sage-300-erp-integration\">Sage 300<\/a>).We also offer best-in-class&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/erp-development\/sage-x3\">Sage ERP<\/a> and <a href=\"https:\/\/www.greytrix.com\/product\/crm-development\/sage-crm\">Sage CRM<\/a> customization and development services&nbsp;to&nbsp;Business&nbsp;Partners,&nbsp;End&nbsp;Users and Sage PSG worldwide. Greytrix&nbsp;helps in&nbsp;migrating of Sage CRM from <a href=\"https:\/\/www.greytrix.com\/resources\/sage-erp-crm-migration.pdf\">Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer<\/a>. Our Sage CRM Product Suite includes <a href=\"https:\/\/www.greytrix.com\/product\/sage-crm-add-ons\/business-manager\">Greytrix Business Manager<\/a>, <a href=\"https:\/\/www.greytrix.com\/product\/sage-crm-add-ons\/sage-crm-project-manager\">Sage CRM Project Manager<\/a>, <a href=\"https:\/\/www.greytrix.com\/product\/sage-crm-add-ons\/sage-crm-resource-planner\">Sage CRM Resource Planner<\/a>, <a href=\"https:\/\/www.greytrix.com\/product\/sage-crm-add-ons\/sage-crm-contract-manager\">Sage CRM Contract Manager<\/a>, <a href=\"https:\/\/www.greytrix.com\/product\/sage-crm-add-ons\/sage-crm-event-manager\">Sage CRM Event Manager<\/a>, <a href=\"https:\/\/www.greytrix.com\/product\/sage-crm-add-ons\/sage-crm-budget-planner\">Sage CRM Budget Planner<\/a>, <a href=\"https:\/\/www.greytrix.com\/product\/sage-crm-add-ons\/gmail-integration-for-sage-crm\">Gmail Integration<\/a>, <a href=\"https:\/\/www.greytrix.com\/product\/sage-crm-add-ons\/sage-crm-mobile-service-signature\">Sage CRM Mobile Service Signature<\/a> and <a href=\"https:\/\/www.greytrix.com\/product\/sage-crm-add-ons\/sage-crm-cti-framework\">Sage CRM CTI Framework<\/a>.<\/p>\n<p>Greytrix is a recognized&nbsp;<a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2017\/07\/26\/greytrix-on-boards-sage-global-rockstar-isv-program-with-gumu-for-sage-crm-sage-x3-solution\/\">Sage Rockstar ISV Partner<\/a>&nbsp;for GUMU&#x2122; Sage Enterprise Management \u2013 Sage CRM integration also listed on&nbsp;<a href=\"https:\/\/www.sage.com\/marketplace\/asb_ListingDetail?listingId=a1h24000007PC3aAAG\" target=\"_blank\" rel=\"noopener\">Sage Marketplace<\/a>.<\/p>\n<p>For more information on our integration solutions, please contact us at&nbsp;<a href=\"mailto:sage@greytrix.com\">sage@greytrix.com<\/a>. We will be glad to assist you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Query I have set up CRM to auto-respond to support emails and create cases from them, as described in the Systems Administrator&#8217;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\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2008\/12\/18\/link-the-cases-created-through-support-mails-to-case-workflow\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[332],"tags":[4086,2010,3561],"class_list":["post-63","post","type-post","status-publish","format-standard","hentry","category-sage-crm","tag-case-workflow","tag-sage-crm","tag-sage-crm-technical-assistance"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Link the Cases (Created through Support Mails) to Case Workflow - Sage CRM \u2013 Tips, Tricks and Components<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2008\/12\/18\/link-the-cases-created-through-support-mails-to-case-workflow\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Link the Cases (Created through Support Mails) to Case Workflow - Sage CRM \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"og:description\" content=\"Query I have set up CRM to auto-respond to support emails and create cases from them, as described in the Systems Administrator&#8217;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\u2026 Read More &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2008\/12\/18\/link-the-cases-created-through-support-mails-to-case-workflow\/\" \/>\n<meta property=\"og:site_name\" content=\"Sage CRM \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"article:published_time\" content=\"2008-12-18T11:13:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-02-27T09:09:40+00:00\" \/>\n<meta name=\"author\" content=\"greysagecrm\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"greysagecrm\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2008\/12\/18\/link-the-cases-created-through-support-mails-to-case-workflow\/\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2008\/12\/18\/link-the-cases-created-through-support-mails-to-case-workflow\/\",\"name\":\"Link the Cases (Created through Support Mails) to Case Workflow - Sage CRM \u2013 Tips, Tricks and Components\",\"isPartOf\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website\"},\"datePublished\":\"2008-12-18T11:13:00+00:00\",\"dateModified\":\"2020-02-27T09:09:40+00:00\",\"author\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2008\/12\/18\/link-the-cases-created-through-support-mails-to-case-workflow\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2008\/12\/18\/link-the-cases-created-through-support-mails-to-case-workflow\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2008\/12\/18\/link-the-cases-created-through-support-mails-to-case-workflow\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Link the Cases (Created through Support Mails) to Case Workflow\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/\",\"name\":\"Sage CRM \u2013 Tips, Tricks and Components\",\"description\":\"Explore the possibilities with Sage CRM insights through our comprehensive blogs. As a leading Sage partner, Greytrix helps businesses maximize their Sage CRM potential with its rich expertise and immense knowledge. Here, you will find blogs that feature expert advice, tips &amp; tricks, best practices, and comprehensive guides on customizing and configuring Sage CRM for your business. Stay informed with our regular updates and expert insights!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f\",\"name\":\"greysagecrm\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g\",\"caption\":\"greysagecrm\"},\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/author\/greysagecrm\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Link the Cases (Created through Support Mails) to Case Workflow - Sage CRM \u2013 Tips, Tricks and Components","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2008\/12\/18\/link-the-cases-created-through-support-mails-to-case-workflow\/","og_locale":"en_US","og_type":"article","og_title":"Link the Cases (Created through Support Mails) to Case Workflow - Sage CRM \u2013 Tips, Tricks and Components","og_description":"Query I have set up CRM to auto-respond to support emails and create cases from them, as described in the Systems Administrator&#8217;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\u2026 Read More &raquo;","og_url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2008\/12\/18\/link-the-cases-created-through-support-mails-to-case-workflow\/","og_site_name":"Sage CRM \u2013 Tips, Tricks and Components","article_published_time":"2008-12-18T11:13:00+00:00","article_modified_time":"2020-02-27T09:09:40+00:00","author":"greysagecrm","twitter_card":"summary_large_image","twitter_misc":{"Written by":"greysagecrm","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2008\/12\/18\/link-the-cases-created-through-support-mails-to-case-workflow\/","url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2008\/12\/18\/link-the-cases-created-through-support-mails-to-case-workflow\/","name":"Link the Cases (Created through Support Mails) to Case Workflow - Sage CRM \u2013 Tips, Tricks and Components","isPartOf":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website"},"datePublished":"2008-12-18T11:13:00+00:00","dateModified":"2020-02-27T09:09:40+00:00","author":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f"},"breadcrumb":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2008\/12\/18\/link-the-cases-created-through-support-mails-to-case-workflow\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.greytrix.com\/blogs\/sagecrm\/2008\/12\/18\/link-the-cases-created-through-support-mails-to-case-workflow\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2008\/12\/18\/link-the-cases-created-through-support-mails-to-case-workflow\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/"},{"@type":"ListItem","position":2,"name":"Link the Cases (Created through Support Mails) to Case Workflow"}]},{"@type":"WebSite","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website","url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/","name":"Sage CRM \u2013 Tips, Tricks and Components","description":"Explore the possibilities with Sage CRM insights through our comprehensive blogs. As a leading Sage partner, Greytrix helps businesses maximize their Sage CRM potential with its rich expertise and immense knowledge. Here, you will find blogs that feature expert advice, tips &amp; tricks, best practices, and comprehensive guides on customizing and configuring Sage CRM for your business. Stay informed with our regular updates and expert insights!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f","name":"greysagecrm","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g","caption":"greysagecrm"},"url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/author\/greysagecrm\/"}]}},"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts\/63","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/comments?post=63"}],"version-history":[{"count":3,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts\/63\/revisions"}],"predecessor-version":[{"id":23741,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts\/63\/revisions\/23741"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/media?parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/categories?post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/tags?post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}