Used to search sessions, create new sessions, assign sessions to operators, etc.

Hierarchy

  • LineSessions

Methods

create

  • The method is used to create a new live chat session.

    Parameters

    • channel: LineChannelItemRef

      Channel that the session needs to be created in.

    • account: string

      Account of the client that the session needs to be created with. Depending on the channel type, it can be an account (or nickname), a phone number, or an email.

      const contact = await Context.data.contact.fetch();
      const account = contact.data._account[0].login; 
      const newSession = await  System.lines.sessions.create(Context.data.channel, account); 
      

    Returns Promise<LineSessionItemRef>

search

  • The method is used to search for live chat sessions.

    To search for items in the collection, use the Search object:

    const cu = await System.users.getCurrentUser();
    const sessions  = await System.lines.sessions.search() 
        .where(f => f._userId.eq(cu))  
        .all(); 
    

    Read more about using search in the Manage apps article.

    Returns LineSessionSearch