> For the complete documentation index, see [llms.txt](https://help.windmillsoft.kr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.windmillsoft.kr/en/simplychat/installation-and-basic-setup-guide/salesforce-settings/omni-channel/flows.md).

# Flows

Creates a flow for using Omni-Channel.

* ![](https://174170309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcMCw4RFNzatnGReKcWKb%2Fuploads%2FDMPUx7KPboVMKP47LTtp%2F%EC%8A%A4%ED%81%AC%EB%A6%B0%EC%83%B7%202023-07-19%20160323.png?alt=media\&token=a47d455e-de8c-4c2f-8ac1-2cc0d665b423) > \[Setup] >Quick Find > \[Flows] > \[New Flow] > \[Record-Triggered Flow] > \[Create] > Configure the Start element as shown below and click \[Done].

<figure><img src="https://174170309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcMCw4RFNzatnGReKcWKb%2Fuploads%2FcCr1DSZDjzQQFL2er9Tf%2F31.png?alt=media&amp;token=a109c526-9d02-415f-872f-015ba1718e5e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://174170309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcMCw4RFNzatnGReKcWKb%2Fuploads%2F9DVVqi9wNTCfv7vdIxXM%2F32.png?alt=media&amp;token=e6961283-f2e1-440c-8400-f51ddde6adbb" alt=""><figcaption></figcaption></figure>

<figure><img src="https://174170309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcMCw4RFNzatnGReKcWKb%2Fuploads%2FakK6LCQSP2dnSAdGLAlG%2F33.png?alt=media&amp;token=869a781f-d487-42f8-985b-22a57f68e1a0" alt=""><figcaption><p>Configure Start</p></figcaption></figure>

* Create all elements in the following order, then click \[Save] and \[Activate].
  * You can add elements using the plus (+) button.
  * Use the default values for items that are not specified.
  * Save the flow with the name 'SC\_talkSession status update when owner changed via omni channel'.

<figure><img src="https://174170309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcMCw4RFNzatnGReKcWKb%2Fuploads%2FQyQLNuOctBksknlfT5nX%2F34.png?alt=media&amp;token=52e785cf-fed7-44b7-8e12-8adbeb8fd72e" alt=""><figcaption></figcaption></figure>

| Element                                   | Decision                     |
| ----------------------------------------- | ---------------------------- |
| Label                                     | Agent Work Status            |
| Outcome Details                           |                              |
| Label                                     | Status is assigned           |
| Condition Requirements to Execute Outcome | All Conditions Are Met (AND) |
| Resource                                  | {!$Record.Status}            |
| Operator                                  | Equals                       |
| Value                                     | Opened                       |

| Element                | Get Records                  |
| ---------------------- | ---------------------------- |
| Label                  | Get TalkSession              |
| Object                 | Chat Session                 |
| Condition Requirements | All Conditions Are Met (AND) |
| Field                  | Id                           |
| Operator               | Equals                       |
| Value                  | {!$Record.WorkItemId}        |

| Element                                   | Decision                     |
| ----------------------------------------- | ---------------------------- |
| Label                                     | Is TalkSession Null          |
| Outcome Details                           |                              |
| Label                                     | TalkSession is Not null      |
| Condition Requirements to Execute Outcome | All Conditions Are Met (AND) |
| Resource                                  | {!Get\_TalkSession\_Record}  |
| Operator                                  | Is Null                      |
| Value                                     | {!$GlobalConstant.False}     |

| Element  | Assignment                                      |
| -------- | ----------------------------------------------- |
| Label    | Set TalkSession                                 |
| Variable | {!Get\_TalkSession\_Record.WINP\_\_Status\_\_c} |
| Operator | Equals                                          |
| Value    | Chatting                                        |
| Variable | {!Get\_TalkSession\_Record.OwnerId}             |
| Operator | Equals                                          |
| Value    | {!$User.Id}                                     |

| Element                                            | Update Records                                                      |
| -------------------------------------------------- | ------------------------------------------------------------------- |
| Label                                              | Update TalkSession                                                  |
| How to Find Records to Update and Set Their Values | Use the IDs and all field values from a record or record collection |
| Condition Requirements                             | All Conditions Are Met (AND)                                        |
| Record or Record Collection                        | {!Get\_TalkSession\_Record}                                         |

| Element                | Get Records                                                |
| ---------------------- | ---------------------------------------------------------- |
| Label                  | Get TalkCustomer                                           |
| Object                 | Chat Customer                                              |
| Condition Requirements | All Conditions Are Met (AND)                               |
| Field                  | Id                                                         |
| Operator               | Equals                                                     |
| Value                  | {!Get\_TalkSession\_Record.WINP\_\_Talk\_Customer\_\_r.Id} |

| Element  | Assignment                            |
| -------- | ------------------------------------- |
| Label    | Set AgentId                           |
| Variable | {!GetTalkCustomer.WINP\_\_Agent\_\_c} |
| Operator | Equals                                |
| Value    | {!$User.Id}                           |

| Element                                            | Update Records                                                      |
| -------------------------------------------------- | ------------------------------------------------------------------- |
| Label                                              | Update TalkCustomer                                                 |
| How to Find Records to Update and Set Their Values | Use the IDs and all field values from a record or record collection |
| Condition Requirements                             | All Conditions Are Met (AND)                                        |
| Record or Record Collection                        | {!GetTalkCustomer}                                                  |
