{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":47899,"path":"servicenow-platform/live-feed/c_Example3OpportunityWonNonTask.md","title":"Opportunity won \\(non-task\\)","bundle":null,"doc_type":null,"release":"australia","body":"\n# Opportunity won \\(non-task\\)\n\nThis example demonstrates a table notification on a non-task table. It generates an automatic message on Live Feed whenever a sales opportunity is won, if you have activated the Sales Force Automation plugin.\n\nCreate a [business rule](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/live-feed/t_SetUpTableNotifNonTaskTables.md) on the Opportunity \\[sales\\_opportunity\\] table that matches the **Live Feed events** business rule on the task table.\n\nCreate a table notification with the following values:\n\n-   **Table**: Opportunity \\[sales\\_opportunity\\]\n-   **Active**: Select the check box.\n-   **Update**: Select the check box.\n-   **Post to Live Feed**: Select the check box.\n-   **Conditions**: \\[State\\] \\[is\\] \\[Closed Won\\]\n-   **Description**: `Opportunity won`\n-   **Message**:\n\n    ```\n    ${owner} closed a sale with ${account}!\n    ```\n\n-   **Before script**:\n\n    ```\n    //make the message appear to come from the assigned salesperson if there is one if ( !current. owner. nil ( ) )\n    profileSource  = current. owner. getRefRecord ( ) ; //need GlideRecord object\n    ```\n\n\n**Parent Topic:**[Live Feed table notification examples](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/live-feed/c_LFTableNotifiExamples.md)\n\n**Related topics**  \n\n\n[Live Feed table notifications](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/live-feed/c_SetUpLiveFeedTableNotifications.md)\n\n"}}