:doc:`ConnectWisdomService <../../wisdom>` / Client / create_session

**************
create_session
**************



.. py:method:: ConnectWisdomService.Client.create_session(**kwargs)

  

  Creates a session. A session is a contextual container used for generating recommendations. Amazon Connect creates a new Wisdom session for each contact on which Wisdom is enabled.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/wisdom-2020-10-19/CreateSession>`_  


  **Request Syntax**
  ::

    response = client.create_session(
        assistantId='string',
        clientToken='string',
        description='string',
        name='string',
        tags={
            'string': 'string'
        }
    )
    
  :type assistantId: string
  :param assistantId: **[REQUIRED]** 

    The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

    

  
  :type clientToken: string
  :param clientToken: 

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see `Making retries safe with idempotent APIs <https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/>`__.

    This field is autopopulated if not provided.

  
  :type description: string
  :param description: 

    The description.

    

  
  :type name: string
  :param name: **[REQUIRED]** 

    The name of the session.

    

  
  :type tags: dict
  :param tags: 

    The tags used to organize, track, or control access for this resource.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'session': {
              'description': 'string',
              'integrationConfiguration': {
                  'topicIntegrationArn': 'string'
              },
              'name': 'string',
              'sessionArn': 'string',
              'sessionId': 'string',
              'tags': {
                  'string': 'string'
              }
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **session** *(dict) --* 

        The session.

        
        

        - **description** *(string) --* 

          The description of the session.

          
        

        - **integrationConfiguration** *(dict) --* 

          The configuration information for the session integration.

          
          

          - **topicIntegrationArn** *(string) --* 

            The Amazon Resource Name (ARN) of the integrated Amazon SNS topic used for streaming chat messages.

            
      
        

        - **name** *(string) --* 

          The name of the session.

          
        

        - **sessionArn** *(string) --* 

          The Amazon Resource Name (ARN) of the session.

          
        

        - **sessionId** *(string) --* 

          The identifier of the session.

          
        

        - **tags** *(dict) --* 

          The tags used to organize, track, or control access for this resource.

          
          

          - *(string) --* 
            

            - *(string) --* 
      
    
    
  
  **Exceptions**
  
  *   :py:class:`ConnectWisdomService.Client.exceptions.ConflictException`

  
  *   :py:class:`ConnectWisdomService.Client.exceptions.ValidationException`

  
  *   :py:class:`ConnectWisdomService.Client.exceptions.ResourceNotFoundException`

  