Rotina de sincronismo de chamados entre ServiceNow e GLPI
Go to file
Rafael Lopes a082bad82c FEAT: Coletado mais dados de incidentes e requisições.
*   **Enriquecimento de Dados e Criação de Tickets:**
    *   Requisições do ServiceNow com descrição vazia agora são enriquecidas buscando dados de variáveis de catálogo (`sc_item_option`), como justificativas e telefones, melhorando a qualidade dos tickets criados no GLPI.
    *   O `ticketGlpiModel` agora formata descrições em tabelas HTML para melhor legibilidade no GLPI.

*   **Refatoração e Novas Funções:**
    *   O `servicenowService` foi expandido com funções para fechar, atualizar status e adicionar notas de trabalho (`work_notes`) diretamente nos tickets do ServiceNow.

*   **Coleta de dados de telefone e ajustes para coletar o Assigment correro
    *   Water Mark Ajustado para que processo o chamado apenas uma vez.
2025-10-28 14:06:00 -03:00
config FEAT: Coletado mais dados de incidentes e requisições. 2025-10-28 14:06:00 -03:00
src FEAT: Coletado mais dados de incidentes e requisições. 2025-10-28 14:06:00 -03:00
.env FEAT: Coletado mais dados de incidentes e requisições. 2025-10-28 14:06:00 -03:00
.gitignore FEAT: Entidades mapeadas a partir do CSV localizado na pasta tecnica 2025-09-17 20:56:32 -03:00
package-lock.json WIP: Model do GLPI em construção 2025-09-11 20:57:43 -03:00
package.json WIP: Model do GLPI em construção 2025-09-11 20:57:43 -03:00
README.md Initial commit - SNGLPI 2025-08-30 22:04:35 +00:00
servicenow_comments_ticket_626.json REFACTOR: Realizando teste para função de busca de todos os comentários atravé da criação de um arquivo JSON. 2025-10-07 10:39:01 -03:00

servicenow-glpi-sync/README.md

ServiceNow and GLPI Sync

This project is designed to facilitate the integration between ServiceNow and GLPI, allowing for the synchronization of tickets between the two platforms. It utilizes Node.js and follows the MVC architecture pattern.

Table of Contents

Prerequisites

  • Node.js (version 14 or higher)
  • npm (Node Package Manager)
  • PostgreSQL or MySQL database
  • Access to ServiceNow and GLPI APIs

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/servicenow-glpi-sync.git
    cd servicenow-glpi-sync
    
  2. Install the dependencies:

    npm install
    
  3. Copy the .env.example file to .env and fill in the required environment variables:

    cp .env.example .env
    

Configuration

  • Update the .env file with your ServiceNow and GLPI API credentials, database connection details, and any other necessary configurations.

Running the Application

To start the application, run:

node server.js

The application will listen on the port specified in the .env file.

Endpoints

  • POST /tickets/sync - Synchronize tickets from ServiceNow to GLPI.
  • GET /tickets/:id - Retrieve details of a specific ticket.
  • POST /tickets - Create a new ticket in GLPI based on ServiceNow data.
  • PUT /tickets/:id - Update an existing ticket in GLPI.

Logging

The application uses Winston for logging. Logs are stored in the logs directory:

  • app.log - Logs application events.
  • error.log - Logs errors that occur during execution.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.