---
sidebar_position: 12
description: Set channel purpose and other functions to work with Slack in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Slack]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Set channel purpose
 Sets the channel purpose (description)



`Function SetChannelGoal(Val Token, Val Channel, Val Purpose) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Bot token |
  | Channel | --channel | String | &#x2714; | Channel ID |
  | Purpose | --purpose | String | &#x2714; | Channel purpose |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Slack



```bsl title="1C:Enterprise/OneScript code example"
    Token   = "xoxb-6965308400114-696804637...";
    Channel = "C0A3MS0PZS4";
    Purpose = "TestGoal";

    Result = OPI_Slack.SetChannelGoal(Token, Channel, Purpose);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint slack SetChannelGoal \
             --token "***" \
             --channel "C0A2MHCL9EF" \
             --purpose "TestGoal"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint slack SetChannelGoal ^
             --token "***" ^
             --channel "C0A2MHCL9EF" ^
             --purpose "TestGoal"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "ok": true,
 "channel": {
  "id": "C0A2MHCL9EF",
  "created": 1765395529,
  "creator": "U06UG1CAYH2",
  "is_org_shared": false,
  "is_im": false,
  "context_team_id": "T06UD92BS3C",
  "updated": 1765395535304,
  "name": "testconv6744ac3d-2d30-43b1-b36f-65fc42754aa4",
  "name_normalized": "testconv6744ac3d-2d30-43b1-b36f-65fc42754aa4",
  "is_channel": true,
  "is_group": false,
  "is_mpim": false,
  "is_private": false,
  "is_archived": false,
  "is_general": false,
  "is_shared": false,
  "is_ext_shared": false,
  "unlinked": 0,
  "is_pending_ext_shared": false,
  "pending_shared": [],
  "parent_conversation": null,
  "purpose": {
   "value": "TestGoal",
   "creator": "U06UG1CAYH2",
   "last_set": 1765395535
  },
  "topic": {
   "value": "TestTopic",
   "creator": "U06UG1CAYH2",
   "last_set": 1765395532
  },
  "shared_team_ids": [
   "***"
  ],
  "pending_connected_team_ids": [],
  "is_member": false,
  "previous_names": []
 }
}
```
