{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":6674,"path":"customer-service-management/defining-custom-flow-create-update-email-interactions.md","title":"Define a custom flow to create or update email interactions","bundle":null,"doc_type":null,"release":"australia","body":"\n# Define a custom flow to create or update email interactions\n\nDefine email-related business processes using Workflow Studio. This tool enables you to manage emails along with your customer service processes through a visual interface without having to design or request complex scripts.\n\n## Create an interaction\n\nCreate an interaction record to capture customer details.\n\n### Before you begin\n\nRole required: workspace\\_admin, awa\\_agent, sn\\_customerservice\\_consumer\\_agent, or sn\\_customerservice\\_agent\n\n### Procedure\n\n1.  Navigate to **All** &gt; **Process Automation** &gt; **Workflow Studio**.\n\n2.  Create a flow.\n\n    1.  Select **Flows**.\n\n    2.  Select **New**.\n\n    3.  Select **Flow**.\n\n    4.  In the **Flow name** field, enter the flow name.\n\n    5.  Select the application scope from the Application list.\n\n    6.  In the **Description** field, enter the description.\n\n    7.  Select **Show additional properties**.\n\n        To know more about additional properties, see [Create a flow in Workflow Studio](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/build-workflows/create-flow.md).\n\n    8.  Select **Build flow**.\n\n3.  Create a trigger.\n\n    1.  Select **Add a Trigger**.\n\n    2.  Search and select **Application**.\n\n    3.  Select **Inbound Email**.\n\n    4.  Select Email conditions with **AND** operator.\n\n        -   Select **Type** is **received**.\n        -   Select **Receive type** is **New**.\n        -   Select **To** contains **customerservice@example.com**.\n        **Note:** **customerservice@example.com** is a sample email address. Specify the actual email address that should be configured as the default for creating email interactions.\n\n    5.  Leave the Reply Record Type as empty.\n\n    6.  Select **Done**.\n\n4.  Select **Add an Action, Flow Logic, or Subflow** and select any of the following.\n\n    -   Action\n    -   Flow Logic\n    -   Subflow\n    **Note:** After you have created action entries, you can select multiple actions using **Select multiple**.\n\n5.  Add error handler.\n\n    1.  To enable the error handling, slide the **ERROR HANDLER** toggle switch.\n\n    2.  Select **Add an Action, Flow Logic, or Subflow** and select any of the following.\n\n    -   Action\n    -   Flow Logic\n    -   Subflow\n6.  Verify the email flow and modify it if necessary.\n\n7.  Select **Save**.\n\n8.  Select **Activate**.\n\n9.  From the confirmation dialog box, select **Activate**.\n\n\n**Related topics**  \n\n\n[Create a flow in Workflow Studio](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/build-workflows/create-flow.md)\n\n## Update an interaction\n\nModify existing interaction records, verifying that all email communication details are updated.\n\n### Before you begin\n\nRole required: admin, workspace\\_admin, awa\\_agent, sn\\_customerservice\\_consumer\\_agent, or sn\\_customerservice\\_agent\n\n### Procedure\n\n1.  Navigate to **All** &gt; **Process Automation** &gt; **Workflow Studio**.\n\n2.  Create a flow.\n\n    1.  Select **Flows**.\n\n    2.  Select **New**.\n\n    3.  Select **Flow**.\n\n    4.  In the **Flow name** field, enter the flow name.\n\n    5.  Select the application scope from the Application list.\n\n    6.  In the **Description** field, enter the description.\n\n    7.  Select **Show additional properties**.\n\n        To know more about additional properties, see [Create a flow in Workflow Studio](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/build-workflows/create-flow.md).\n\n    8.  Select **Build flow**.\n\n3.  Create a trigger.\n\n    1.  Select **Add a Trigger**.\n\n    2.  Search and select **Application**.\n\n    3.  Select **Inbound Email**.\n\n    4.  Select Email conditions with **AND** operator.\n\n        -   Select **Type** is **received**.\n        -   Select **Receive type** is **Reply**.\n    5.  Leave the Reply Record Type as empty.\n\n    6.  Select **Done**.\n\n4.  Select **Add an Action, Flow Logic, or Subflow** and select any of the following.\n\n    -   Action\n    -   Flow Logic\n    -   Subflow\n    **Note:** After you have created action entries, you can select multiple actions using **Select multiple**.\n\n5.  Add error handler.\n\n    1.  To enable the error handling, slide the **ERROR HANDLER** toggle switch.\n\n    2.  Select **Add an Action, Flow Logic, or Subflow** and select any of the following.\n\n    -   Action\n    -   Flow Logic\n    -   Subflow\n6.  Verify the email flow and modify it if necessary.\n\n7.  Select **Save**.\n\n8.  Select **Activate**.\n\n9.  From the confirmation dialog box, select **Activate**.\n\n\n**Related topics**  \n\n\n[Create a flow in Workflow Studio](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/build-workflows/create-flow.md)\n\n"}}