Answers.Body: <p>You would need to write some code in an <a href="https://docs.civicrm.org/dev/en/latest/extensions/" rel="nofollow noreferrer">extension</a> and use this hook: <a href="https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_emailProcessor/" rel="nofollow noreferrer">https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_emailProcessor/</a></p>
  <p>The params will contain the activity id.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-03-14T00:07:24.137Z
Answers.LastActivityDate: 2024-03-14T00:07:24.137Z
Answers.UserDisplayName: Demerit
Body: <p>When processing inbound email to activities, and automatically they are filed to correct case with the specified case id, how to set the value of duration for these inbound email activities? Where should I make any change to realize this setting of duration when the system files inbound email activities to case, on the programming level? I know I could key in duration if creating a new activity in the contact, but I want the system to be able to give a value for duration for every inbound email activities automatically.</p>
  
Tags: <civicase><activities><inbound-email>
Title: How to set duration and some custom fields for inbound email activity
ThreadText: # How to set duration and some custom fields for inbound email activity
  
  (Asked by: username_0 on 2024-03-13)
  
  When processing inbound email to activities, and automatically they are filed to correct case with the specified case id, how to set the value of duration for these inbound email activities? Where should I make any change to realize this setting of duration when the system files inbound email activities to case, on the programming level? I know I could key in duration if creating a new activity in the contact, but I want the system to be able to give a value for duration for every inbound email activities automatically.
  
  **Tags:** civicase, activities, inbound-email
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-03-14. Score: 1 | Accepted answer
  
  You would need to write some code in an [extension](https://docs.civicrm.org/dev/en/latest/extensions/) and use this hook: <https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_emailProcessor/>
  
  The params will contain the activity id.
  
  
  ---
  
  