Announcement

Collapse
No announcement yet.

E-mail to case question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • E-mail to case question

    Hello,

    when espocrm creates a case from an e-mail, you can configure that this case is assigned to a user.
    Automatically the status of the case is set to "assigned".

    Is there a way to change the code of Espo so that the status is set to "new"?
    peter

  • #2
    Hi,

    Check this out https://github.com/espocrm/espocrm/b...Fetch.php#L558

    this is where the CRM set the case status to assigned, you can overwrite it but it won't be upgrade safe, i think one way is to create a hook and copy and paste and just amend as you wish.

    good luck

    Comment


    • peterberlin
      peterberlin commented
      Editing a comment
      Many thanks rabii

      That helps me further.

  • #3
    Hi peterberlin,

    Please go to the Administration > Entity Manager > Case and try to insert this lines into Formula:

    ifThen(
    entity\isNew() = true && entity\attribute('status') == 'Assigned',
    entity\setAttribute('status', 'New')
    );

    Comment


    • peterberlin
      peterberlin commented
      Editing a comment
      Many thanks lozovic

      but it does not work with a formula. Formula is not activated by itself.
      Some time ago, I had suggested that I should be able to execute a formula when creating a case from an email.
      Unfortunately, this option is not available in the configuration.

  • #4
    Hi peterberlin

    Such logic can be implemented via Workflow. Screenshot with configurations attached.
    Attached Files

    Comment


    • #5
      peterberlin,

      I tested this formula both manually, creating a new Case with Assigned status on my own, and automatically through Workflow, when, for example, when creating a new Contact, the system had to create a new Case with Assigned status. In all cases, the statuses changed immediately to the New status.

      The only thing that can be added to this formula is the field 'createdById' == 'system', as Vadym rightly noted a little higher.

      In any case, if you find a suitable solution for yourself, that's great.

      Comment


      • #6
        Many thanks to all who have replied.

        Comment

        Working...
        X