Metadata-Version: 2.1
Name: odoo-addon-helpdesk_mgmt_livechat
Version: 18.0.1.0.0.4
Requires-Python: >=3.10
Requires-Dist: odoo-addon-helpdesk_mgmt==18.0.*
Requires-Dist: odoo==18.0.*
Summary: Create ticket from livechat conversation
Home-page: https://github.com/OCA/helpdesk
License: AGPL-3
Author: Escodoo, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 18.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Description-Content-Type: text/x-rst

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

============================
Helpdesk Management Livechat
============================

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:3e467b981b334d4f93c6557054e8bc19ba7b9548922b522cfe344a1c153a16c5
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
    :target: https://odoo-community.org/page/development-status
    :alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
    :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
    :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhelpdesk-lightgray.png?logo=github
    :target: https://github.com/OCA/helpdesk/tree/18.0/helpdesk_mgmt_livechat
    :alt: OCA/helpdesk
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/helpdesk-18-0/helpdesk-18-0-helpdesk_mgmt_livechat
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
    :target: https://runboat.odoo-community.org/builds?repo=OCA/helpdesk&target_branch=18.0
    :alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module extends the helpdesk management functionality by allowing
you to create tickets directly from livechat conversations.

Main Features
-------------

- **Create Tickets from Livechat**: Allows creating helpdesk tickets
  directly from livechat conversations using the ``/ticket`` command
- **Chatbot Integration**: Automatically creates tickets when chatbot
  reaches a "create_ticket" step
- **Automatic Team Assignment**: Configure chatbot steps to
  automatically assign tickets to specific helpdesk teams
- **Conversation History**: Automatically includes the full conversation
  history in the ticket description
- **Ticket Counter**: Displays the number of tickets generated by each
  chatbot directly in the chatbot view
- **Channel Tracking**: Automatically marks tickets created from
  livechat with the "Livechat" channel

Benefits
--------

- Streamline customer support by creating tickets directly from chat
  conversations
- Automate ticket creation through chatbot workflows
- Keep complete conversation context in ticket descriptions
- Track tickets originated from livechat interactions
- Improve response time by converting chats to actionable tickets

Dependencies
------------

This module requires:

- ``helpdesk_mgmt``: Base helpdesk management module
- ``im_livechat``: Odoo's livechat module

**Table of contents**

.. contents::
   :local:

Configuration
=============

This module does not require additional configuration after
installation. It works automatically once installed.

Installation
------------

1. Go to the **Apps** menu
2. Remove the "Apps" filter if necessary
3. Search for "Helpdesk Management Livechat"
4. Click **Install**

The module will be automatically installed when both ``helpdesk_mgmt``
and ``im_livechat`` are installed.

Prerequisites
-------------

Make sure the following modules are installed:

- **Helpdesk Management** (base helpdesk module)
- **Livechat** (Odoo's livechat module)

The system will automatically install the necessary dependencies during
installation.

Configuration
-------------

**Setting up Chatbot Ticket Creation**

1. Go to **Settings > Livechat > Chatbots**
2. Create or edit a chatbot script
3. Add steps to your chatbot workflow
4. Add a step with type **"Create Ticket"**
5. Configure the step:

   - Select a **Helpdesk Team** (optional)
   - The ticket will be assigned to this team when created

6. Save the chatbot script

**Using the /ticket Command**

No additional configuration is required. The ``/ticket`` command is
automatically available in all livechat conversations.

Permissions
-----------

The module uses the same access permissions as the base modules:

- Users with access to **Helpdesk** can view tickets created from
  livechat
- Users with access to **Livechat** can use the ``/ticket`` command
- Users with access to **Chatbots** can configure chatbot ticket
  creation

No additional permission configuration is required.

Channel Setup
-------------

The module automatically creates a "Livechat" channel in the helpdesk
system. This channel is used to track all tickets created from livechat
conversations.

If the channel doesn't exist, it will be created automatically when the
first ticket is created.

Usage
=====

This guide explains how to use the Helpdesk Management Livechat module
to create tickets from livechat conversations.

Create a Ticket from Livechat
-----------------------------

**Method 1: Using the /ticket Command**

1. Start a livechat conversation with a customer
2. During the conversation, type ``/ticket`` followed by the ticket
   title

   - Example: ``/ticket Customer cannot access their account``

3. The system will automatically create a helpdesk ticket with:

   - The ticket title you specified
   - The full conversation history in the description
   - The customer as the contact (if identified)
   - The "Livechat" channel assigned

**Method 2: Through Chatbot Workflow**

1. Configure a chatbot script in **Settings > Livechat > Chatbots**
2. Add a step with type **"Create Ticket"**
3. Configure the step:

   - Select a **Helpdesk Team** to automatically assign the ticket
   - The chatbot will create a ticket when it reaches this step

4. When a visitor completes the chatbot flow, a ticket is automatically
   created

Automatic Behaviors
-------------------

**Automatic Ticket Creation**

When using the ``/ticket`` command:

- A new helpdesk ticket is created immediately
- The conversation history is saved in the ticket description
- The customer partner is linked to the ticket (if available)
- The ticket is marked with the "Livechat" channel

**Chatbot Ticket Creation**

When a chatbot reaches a "create_ticket" step:

- A ticket is created with the chatbot's title
- Visitor information (email, phone) is captured
- The conversation history is included in the description
- The ticket is assigned to the configured helpdesk team
- The ticket is marked with the "Livechat" channel

**Conversation History**

The system automatically:

- Captures all messages from the livechat conversation
- Formats them in a readable way in the ticket description
- Includes author names and timestamps
- Preserves the full context for support agents

View Tickets Created from Livechat
----------------------------------

1. Go to the **Helpdesk** module
2. Open the **Tickets** menu
3. Filter by **Channel = Livechat** to see all tickets created from
   livechat
4. You can also filter by chatbot title to see tickets from specific
   chatbots

View Chatbot Ticket Statistics
------------------------------

1. Go to **Settings > Livechat > Chatbots**
2. Open a chatbot script
3. At the top of the form, you will see the **Tickets** button with a
   counter
4. The displayed number indicates how many tickets were generated by
   this chatbot
5. Click the button to see all tickets created by this chatbot

Usage Examples
--------------

**Example 1: Quick Ticket Creation**

1. Customer starts a livechat conversation
2. After understanding the issue, type:
   ``/ticket Login password reset request``
3. Ticket is created immediately with full conversation context
4. Support agent can continue working on the ticket

**Example 2: Automated Ticket Creation**

1. Configure a chatbot with steps:

   - Welcome message
   - Collect customer email
   - Collect issue description
   - Create ticket step (assigned to "Support Team")

2. When visitor completes the flow, ticket is automatically created
3. Support team receives the ticket with all collected information

**Example 3: Escalation from Chat to Ticket**

1. Operator is chatting with a customer
2. Issue requires more investigation
3. Operator types:
   ``/ticket Technical issue - Database connection timeout``
4. Ticket is created with full conversation history
5. Operator can continue the conversation while ticket is being
   processed

Tips
----

- Use the ``/ticket`` command to quickly convert conversations into
  actionable tickets
- Configure chatbot workflows to automatically create tickets for common
  issues
- The conversation history in tickets helps support agents understand
  the full context
- Use the ticket counter on chatbots to track automation effectiveness
- Filter tickets by "Livechat" channel to analyze chat-to-ticket
  conversion rates

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/helpdesk/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/helpdesk/issues/new?body=module:%20helpdesk_mgmt_livechat%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Escodoo

Contributors
------------

- `ESCODOO <https://escodoo.com.br>`__:

  - Marcel Savegnago <marcel.savegnago@escodoo.com.br>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-marcelsavegnago| image:: https://github.com/marcelsavegnago.png?size=40px
    :target: https://github.com/marcelsavegnago
    :alt: marcelsavegnago

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-marcelsavegnago| 

This module is part of the `OCA/helpdesk <https://github.com/OCA/helpdesk/tree/18.0/helpdesk_mgmt_livechat>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
