Written by:Kbase QB7/4/2010 4:26 PM
I was asked how to include the case’s work details in a workflow email sent to customer when case is resolved. The Case attribute “Resolution” (ask_resolutiontext) is created at the close case stage and saved to the activity type “Case Resolution”. It is easy to create workflow that sends an email when case is resolved and to include the work details from the case attribute “Resolution” in the email to the customer. What happens if all jobs are completed but the case is still active with the status “Ready for Billing”. At this status no other job can be created, but the case is not yet in “Problem Solved” status and therefore the work details are not available to be inserted to the email. Each time an activity is created (such as phone, email, remote, onsite) the activity’s details are stored in the description field of the Phone, Task or Email activities that are linked to the case. By creating new attribute in the case entity and using workflows associated with the phone, task & email activities we can merge the work details of all activities and store them in the case at the time each activity is completed. Note: Before you modify customization, export the existing customization and backup CRM. Firstly, create new attribute “Task Details” type “ntext” with maximum length of 2,000 characters. Add the new field to the Form in the Administration tab. Click and open the form properties. Select and open to edit the OnLoad event. Add the following JavaScript after the last line of the existing script:
{ if (crmForm.all.new_taskdetails.DataValue ==null) crmForm.all.new_taskdetails.DataValue ='Work Details:'; }
Replace “new_taskdetails” with the attribute name you have created (if different to my attribute) This script will populate the field Task Details with text (“Work details:”). If the field is left blank the plug-in to search and replace text will fail. Save and close Publish case customization Create three very similar workflows each for Phone, Task and Email entities. Select: Start when: Record status changes Add Step: “Check Condition” and set the conditions as per this image:
Click: Add step and select “Replace Text” plug in from the option “QoS-IT Generic” The plug in replaces text within a field with another text. We use this function to merge the information stored in the case attribute “Task Details” with the one stored in the description field of the activity. Click to open “Set Properties” and enter values as in this image:
Click: Add Step and select “Update Record”: Regarding (Case)
Save and Publish all three workflows. Test the workflows to ensure that work details reported in all jobs are updating the case attribute Task Details. The next workflow is the one that sends Email to customer when the case status is “Ready for Billing” and when the case status is “Problem Solved”. You only need to send the workflow once. To eliminate sending two emails, add another attribute to the case entity with type=bit. Add step “Update Record” for the workflow to update this attribute as =1 when Email is sent. Add another step “Check Condition” to ensure that an email is sent only if this attribute is not equal 1.
Download samples of workflows
0 comment(s) so far...
Call to Learn More: 1300-50-68-48 All trademarks are property of their respective owners.