How to auto-reply to a SugarCRM contact after a case has been created through Portal


A customer has submitted a case through Sugar Portal and we would like to send them an email reply indicating a case has been opened.


To solve this problem,  you can create a workflow on the Cases module using a time elapsed workflow to account for the case creation mechanism in Sugar Portal. Currently Sugar Portal creates the case and adds the contact relationship in two steps. This means that when the case is initially saved there is no relationship between the case and the submitting contact. Using a time elapsed workflow,   you can detect when the case is created, and send out an alert after Sugar relates it with the contact.

To create the workflow:

  1. Navigate to Admin > Workflow Management
  2. Click Create Workflow Definition
  3. Provide a name
  4. Set the properties:
    • Execution Occurs: After time elapses
    • Target Module: Cases
    • Processing Order: Alerts then Actions
  5. Save the definition
  6. Create a condition
    • Field does not change for a specified amount of time
      • Field: Created By Id
      • Time: 0 hours
  7. Create another condition
    • When a field in the target module contains a specified value
      • specified field: Created By Id = portal user
  8. Create a new Alert
  9. Add a recipient to the alert recipient list
    • Recipient associated with a related module
      • Module: Contact
    • Select custom email and name fields
      • Email
      • Name
      • To:

Note: You will need to enable the Process Workflow Tasks Scheduler under Admin > Schedulers, and ensure that cron is operating correctly on your system. Related article: How do I set up the scheduler?

Note: Time elapsed workflows require the default admin user (id = 1) to exist and be configured as an Administrator (is_admin = 1)