Adição de require 'dotenv' em apiConfig.js para utilização das variáveis de ambiente. Criação de função que busca os tickets no servicenowService para chamados designados para a Sothis. Execução gera um JSON com a resposta da API.
This commit is contained in:
parent
8ce32a03d9
commit
2a64c1cce2
39
.env.example
39
.env.example
@ -1,39 +0,0 @@
|
||||
# Contents of the file: /servicenow-glpi-sync/servicenow-glpi-sync/.env.example
|
||||
|
||||
# This is an example of the environment variables needed for the application.
|
||||
|
||||
# ServiceNow API Configuration
|
||||
SERVICENOW_INCIDENT_URL=https://caoadev.service-now.com/api/now/table/incident?sysparm_display_value=all&sysparm_limit=20&sysparm_query=ORDERBYDESCsys_created_on&sysparm_fields=number%2Copened_by%2Copened_at%2Clocation%2Cshort_description%2Cdescription%2Cvariables.caller_id%2Cvariables.location%2Cvariables.telephone_favorecido_rh%2Cvariables.numero_ramal%2Copened_by.email%2Csys_id%5Eassignment_group%3D46d44f91c611227500713c12f0b7c78d
|
||||
SERVICENOW_USERNAME=SOTHIS.CAOA
|
||||
SERVICENOW_PASSWORD=#Sothis20
|
||||
|
||||
# GLPI API Configuration
|
||||
GLPI_URL=https://your-glpi-instance/apirest.php/
|
||||
GLPI_APP_TOKEN=your_glpi_app_token
|
||||
GLPI_USER_TOKEN=your_glpi_user_token
|
||||
|
||||
# GLPI access via DB (use DB connection instead of API)
|
||||
GLPI_DB_TYPE=mysql # ou postgresql
|
||||
GLPI_DB_HOST=localhost
|
||||
GLPI_DB_PORT=3306
|
||||
GLPI_DB_USER=glpi_user
|
||||
GLPI_DB_PASSWORD=your_glpi_db_password
|
||||
GLPI_DB_NAME=glpi_database
|
||||
GLPI_DB_CHARSET=utf8mb4
|
||||
GLPI_TABLE_PREFIX=glpi_ # deixe em branco se não houver prefixo
|
||||
|
||||
# Database Configuration
|
||||
DB_HOST=localhost
|
||||
DB_PORT=3306 # or 5432 for PostgreSQL
|
||||
DB_USER=your_database_user
|
||||
DB_PASSWORD=your_database_password
|
||||
DB_NAME=your_database_name
|
||||
|
||||
# Logging Configuration
|
||||
LOG_LEVEL=info
|
||||
LOG_FILE_PATH=logs/app.log
|
||||
ERROR_LOG_FILE_PATH=logs/error.log
|
||||
|
||||
# Other Configuration
|
||||
PORT=3000
|
||||
NODE_ENV=development
|
||||
@ -1,3 +1,5 @@
|
||||
require('dotenv').config();
|
||||
|
||||
const glpiDbConfig = {
|
||||
client: process.env.GLPI_DB_TYPE || 'mysql',
|
||||
connection: {
|
||||
@ -11,7 +13,17 @@ const glpiDbConfig = {
|
||||
tablePrefix: process.env.GLPI_TABLE_PREFIX || ''
|
||||
};
|
||||
|
||||
const snApiConfig = {
|
||||
baseUrl: process.env.SERVICENOW_INCIDENT_URL,
|
||||
auth: {
|
||||
username: process.env.SERVICENOW_USERNAME,
|
||||
password: process.env.SERVICENOW_PASSWORD
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
// configuração do ServiceNow e outras já existentes podem permanecer
|
||||
glpiDbConfig
|
||||
glpiDbConfig,
|
||||
snApiConfig
|
||||
};
|
||||
944
servicenow_tickets.json
Normal file
944
servicenow_tickets.json
Normal file
@ -0,0 +1,944 @@
|
||||
{
|
||||
"result": [
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "SOTHIS CAOA",
|
||||
"value": "b131d6ed1b2ba510c5e163923b4bcb77"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140378",
|
||||
"value": "INC0140378"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "26/08/2025 10:13:20",
|
||||
"value": "2025-08-26 13:13:20"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Telefonia Fixa",
|
||||
"value": "Problemas com Telefonia Fixa"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(11) 2222-2222",
|
||||
"value": "(11) 2222-2222"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "",
|
||||
"value": ""
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "SOTHIS CAOA",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/b131d6ed1b2ba510c5e163923b4bcb77",
|
||||
"value": "b131d6ed1b2ba510c5e163923b4bcb77"
|
||||
},
|
||||
"variables.numero_ramal": {
|
||||
"display_value": "666",
|
||||
"value": "666"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "teste",
|
||||
"value": "teste"
|
||||
},
|
||||
"location": {
|
||||
"display_value": "CAOA MONTADORA - ANAPOLIS",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/af22f6e91b6f1050e77eb9121b4bcbc3",
|
||||
"value": "af22f6e91b6f1050e77eb9121b4bcbc3"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "CAOA MONTADORA - ANAPOLIS",
|
||||
"value": "af22f6e91b6f1050e77eb9121b4bcbc3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "SOTHIS CAOA",
|
||||
"value": "b131d6ed1b2ba510c5e163923b4bcb77"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140377",
|
||||
"value": "INC0140377"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "25/08/2025 10:47:40",
|
||||
"value": "2025-08-25 13:47:40"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Telefonia Fixa",
|
||||
"value": "Problemas com Telefonia Fixa"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(11) 2222-2222",
|
||||
"value": "(11) 2222-2222"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "",
|
||||
"value": ""
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "SOTHIS CAOA",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/b131d6ed1b2ba510c5e163923b4bcb77",
|
||||
"value": "b131d6ed1b2ba510c5e163923b4bcb77"
|
||||
},
|
||||
"variables.numero_ramal": {
|
||||
"display_value": "666",
|
||||
"value": "666"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "Teste",
|
||||
"value": "Teste"
|
||||
},
|
||||
"location": {
|
||||
"display_value": "HMB - ANHAIA MELO",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/ab22f6e91b6f1050e77eb9121b4bcbcd",
|
||||
"value": "ab22f6e91b6f1050e77eb9121b4bcbcd"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "HMB - ANHAIA MELO",
|
||||
"value": "ab22f6e91b6f1050e77eb9121b4bcbcd"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "SOTHIS CAOA",
|
||||
"value": "b131d6ed1b2ba510c5e163923b4bcb77"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140376",
|
||||
"value": "INC0140376"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "25/08/2025 10:25:32",
|
||||
"value": "2025-08-25 13:25:32"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Telefonia Fixa",
|
||||
"value": "Problemas com Telefonia Fixa"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(11) 2222-2222",
|
||||
"value": "(11) 2222-2222"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "",
|
||||
"value": ""
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "SOTHIS CAOA",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/b131d6ed1b2ba510c5e163923b4bcb77",
|
||||
"value": "b131d6ed1b2ba510c5e163923b4bcb77"
|
||||
},
|
||||
"variables.numero_ramal": {
|
||||
"display_value": "666",
|
||||
"value": "666"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "teste",
|
||||
"value": "teste"
|
||||
},
|
||||
"location": {
|
||||
"display_value": "HYUNDAI - MATRIZ",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/a3223ae91b6f1050e77eb9121b4bcb12",
|
||||
"value": "a3223ae91b6f1050e77eb9121b4bcb12"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "HYUNDAI - MATRIZ",
|
||||
"value": "a3223ae91b6f1050e77eb9121b4bcb12"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "Vanessa Aparecida Dos Santos Mota",
|
||||
"value": "a39a8abb1be2d01029846538fa4bcb82"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140349",
|
||||
"value": "INC0140349"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "17/07/2025 15:47:53",
|
||||
"value": "2025-07-17 18:47:53"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Telefonia Fixa",
|
||||
"value": "Problemas com Telefonia Fixa"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(12) 99118-5984",
|
||||
"value": "(12) 99118-5984"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "vanessa.mota@caoa.com.br",
|
||||
"value": "vanessa.mota@caoa.com.br"
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "Vanessa Aparecida Dos Santos Mota",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/a39a8abb1be2d01029846538fa4bcb82",
|
||||
"value": "a39a8abb1be2d01029846538fa4bcb82"
|
||||
},
|
||||
"variables.numero_ramal": {
|
||||
"display_value": "1239040620",
|
||||
"value": "1239040620"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "Boa tarde, telefone principal da loja não está recebendo ligação, já mandei mensagem para o pessoal da Sothis e até o momento não tive retorno. Obrigada.",
|
||||
"value": "Boa tarde, telefone principal da loja não está recebendo ligação, já mandei mensagem para o pessoal da Sothis e até o momento não tive retorno. Obrigada."
|
||||
},
|
||||
"location": {
|
||||
"display_value": "HMB - SAO JOSE DOS CAMPOS",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/eb22f6e91b6f1050e77eb9121b4bcbeb",
|
||||
"value": "eb22f6e91b6f1050e77eb9121b4bcbeb"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "HMB - SAO JOSE DOS CAMPOS",
|
||||
"value": "eb22f6e91b6f1050e77eb9121b4bcbeb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "Rebeca Maila Pereira De Jesus Da Silva",
|
||||
"value": "c8ed818d870cea90ab40c8440cbb3532"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140292",
|
||||
"value": "INC0140292"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "17/07/2025 09:07:35",
|
||||
"value": "2025-07-17 12:07:35"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Telefonia Fixa",
|
||||
"value": "Problemas com Telefonia Fixa"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(71) 3032-2350",
|
||||
"value": "(71) 3032-2350"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "rebeca.dsilva@caoa.com.br",
|
||||
"value": "rebeca.dsilva@caoa.com.br"
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "Rebeca Maila Pereira De Jesus Da Silva",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/c8ed818d870cea90ab40c8440cbb3532",
|
||||
"value": "c8ed818d870cea90ab40c8440cbb3532"
|
||||
},
|
||||
"variables.numero_ramal": {
|
||||
"display_value": "2357, 2386, 2384, 2370",
|
||||
"value": "2357, 2386, 2384, 2370"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "Ao tentar realizar chamadas, aparece a mensagem de \"rede indisponível\", impossibilitando o atendimento aos clientes.",
|
||||
"value": "Ao tentar realizar chamadas, aparece a mensagem de \"rede indisponível\", impossibilitando o atendimento aos clientes."
|
||||
},
|
||||
"location": {
|
||||
"display_value": "HMB - LAURO DE FREITAS",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/af22f6e91b6f1050e77eb9121b4bcbdd",
|
||||
"value": "af22f6e91b6f1050e77eb9121b4bcbdd"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "HMB - LAURO DE FREITAS",
|
||||
"value": "af22f6e91b6f1050e77eb9121b4bcbdd"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "Edson Goncalves Da Silva Junior",
|
||||
"value": "a28a0a7b1be2d01029846538fa4bcb9d"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140279",
|
||||
"value": "INC0140279"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "16/07/2025 18:08:06",
|
||||
"value": "2025-07-16 21:08:06"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Telefonia Fixa",
|
||||
"value": "Problemas com Telefonia Fixa"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(43) 99127-1402",
|
||||
"value": "(43) 99127-1402"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "edson.gjunior@d21motors.com.br",
|
||||
"value": "edson.gjunior@d21motors.com.br"
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "Edson Goncalves Da Silva Junior",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/a28a0a7b1be2d01029846538fa4bcb9d",
|
||||
"value": "a28a0a7b1be2d01029846538fa4bcb9d"
|
||||
},
|
||||
"variables.numero_ramal": {
|
||||
"display_value": "4330313200",
|
||||
"value": "4330313200"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "Gostaria de informar que diversos cliente estão relatando a incompatibilidade ao tentar entra em contato com a unidade, e notamos que ocorre principalmente com feitas pela operadora vivo.",
|
||||
"value": "Gostaria de informar que diversos cliente estão relatando a incompatibilidade ao tentar entra em contato com a unidade, e notamos que ocorre principalmente com feitas pela operadora vivo."
|
||||
},
|
||||
"location": {
|
||||
"display_value": "YELLOW - LONDRINA",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/37223ae91b6f1050e77eb9121b4bcb4e",
|
||||
"value": "37223ae91b6f1050e77eb9121b4bcb4e"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "YELLOW - LONDRINA",
|
||||
"value": "37223ae91b6f1050e77eb9121b4bcb4e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "Vanessa Klenk Ribeiro Dos Santos",
|
||||
"value": "21a5900cdb93701015471403149619e2"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140253",
|
||||
"value": "INC0140253"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "16/07/2025 13:51:05",
|
||||
"value": "2025-07-16 16:51:05"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Internet",
|
||||
"value": "Problemas com Internet"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(41) 99202-2250",
|
||||
"value": "(41) 99202-2250"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "gustavo.tavares@globalweb.com.br",
|
||||
"value": "gustavo.tavares@globalweb.com.br"
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "Gustavo Oliveira Tavares",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/93a51e5f87dd9a10ab40c8440cbb356d",
|
||||
"value": "93a51e5f87dd9a10ab40c8440cbb356d"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "Colaboradora informa que teve uma queda de energia na localidade e quando retornou a energia, apenas sua máquina não está conectado com a internet. Poderiam verificar?\r\n\r\nKb não localizado\r\n\r\nContato: (41) 99202-2250\r\ne-mail: vanessa.santos@caoa.com.br",
|
||||
"value": "Colaboradora informa que teve uma queda de energia na localidade e quando retornou a energia, apenas sua máquina não está conectado com a internet. Poderiam verificar?\r\n\r\nKb não localizado\r\n\r\nContato: (41) 99202-2250\r\ne-mail: vanessa.santos@caoa.com.br"
|
||||
},
|
||||
"location": {
|
||||
"display_value": "HMB - ALTO DA XV",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/6f22f6e91b6f1050e77eb9121b4bcbcc",
|
||||
"value": "6f22f6e91b6f1050e77eb9121b4bcbcc"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "HMB - ALTO DA XV",
|
||||
"value": "6f22f6e91b6f1050e77eb9121b4bcbcc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "Alexandre Elizeu De Almeida",
|
||||
"value": "988a427b1be2d01029846538fa4bcb56"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140250",
|
||||
"value": "INC0140250"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "16/07/2025 13:21:51",
|
||||
"value": "2025-07-16 16:21:51"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Internet",
|
||||
"value": "Problemas com Internet"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(44) 99108-9896",
|
||||
"value": "(44) 99108-9896"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "alexandre.almeida@d21motors.com.br",
|
||||
"value": "alexandre.almeida@d21motors.com.br"
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "Alexandre Elizeu De Almeida",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/988a427b1be2d01029846538fa4bcb56",
|
||||
"value": "988a427b1be2d01029846538fa4bcb56"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "Boa tarde! A filial D21 Maringá está toda sem internet. Tanto a rede cabeada quanto wi-fi estão fora. Poderiam por gentileza verificar?",
|
||||
"value": "Boa tarde! A filial D21 Maringá está toda sem internet. Tanto a rede cabeada quanto wi-fi estão fora. Poderiam por gentileza verificar?"
|
||||
},
|
||||
"location": {
|
||||
"display_value": "YELLOW - MARINGA",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/73223ae91b6f1050e77eb9121b4bcb4f",
|
||||
"value": "73223ae91b6f1050e77eb9121b4bcb4f"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "YELLOW - MARINGA",
|
||||
"value": "73223ae91b6f1050e77eb9121b4bcb4f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "Vanessa Klenk Ribeiro Dos Santos",
|
||||
"value": "21a5900cdb93701015471403149619e2"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140220",
|
||||
"value": "INC0140220"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "16/07/2025 09:33:05",
|
||||
"value": "2025-07-16 12:33:05"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Internet",
|
||||
"value": "Problemas com Internet"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(41) 99202-2250",
|
||||
"value": "(41) 99202-2250"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "guilhermefo@globalweb.com.br",
|
||||
"value": "guilhermefo@globalweb.com.br"
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "Guilherme Henrique Fonseca Oliveira",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/bf3d28ad872c16d0ab40c8440cbb3599",
|
||||
"value": "bf3d28ad872c16d0ab40c8440cbb3599"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "Colaborador(a) relata que toda a localidade está sem acesso à internet, poderiam verificar por gentileza?\r\n\r\nOBS: Colaboradora informou que ontem houve uma queda de energia na localidade por volta das 18 e após isso a internet não voltou \r\nOBS: Segue em anexo prints evidenciando a indisponibilidade da Internet \r\n\r\nProblemas com Internet - Nenhum site está navegando-KB0010694",
|
||||
"value": "Colaborador(a) relata que toda a localidade está sem acesso à internet, poderiam verificar por gentileza?\r\n\r\nOBS: Colaboradora informou que ontem houve uma queda de energia na localidade por volta das 18 e após isso a internet não voltou \r\nOBS: Segue em anexo prints evidenciando a indisponibilidade da Internet \r\n\r\nProblemas com Internet - Nenhum site está navegando-KB0010694"
|
||||
},
|
||||
"location": {
|
||||
"display_value": "HMB - ALTO DA XV",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/6f22f6e91b6f1050e77eb9121b4bcbcc",
|
||||
"value": "6f22f6e91b6f1050e77eb9121b4bcbcc"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "HMB - ALTO DA XV",
|
||||
"value": "6f22f6e91b6f1050e77eb9121b4bcbcc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "Amanda Dos Santos Silva",
|
||||
"value": "c88a027b1be2d01029846538fa4bcbdd"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140170",
|
||||
"value": "INC0140170"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "15/07/2025 14:43:01",
|
||||
"value": "2025-07-15 17:43:01"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Wi-Fi/Rede Corporativa",
|
||||
"value": "Problemas com Wi-Fi/Rede Corporativa"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(11) 3060-2865",
|
||||
"value": "(11) 3060-2865"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "amanda.ssilva@caoa.com.br",
|
||||
"value": "amanda.ssilva@caoa.com.br"
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "Amanda Dos Santos Silva",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/c88a027b1be2d01029846538fa4bcbdd",
|
||||
"value": "c88a027b1be2d01029846538fa4bcbdd"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "Boa tarde!\r\nInternet não atinge a velocidade exigida pela montadora devido ao sinal, necessário instalação de uma nova antena de internet na sala dos consultores.\r\nCaso sendo tratado e acompanhado pelo Raphael Anjos.",
|
||||
"value": "Boa tarde!\r\nInternet não atinge a velocidade exigida pela montadora devido ao sinal, necessário instalação de uma nova antena de internet na sala dos consultores.\r\nCaso sendo tratado e acompanhado pelo Raphael Anjos."
|
||||
},
|
||||
"location": {
|
||||
"display_value": "ELIVEL - CEASA",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/6722f6e91b6f1050e77eb9121b4bcbc6",
|
||||
"value": "6722f6e91b6f1050e77eb9121b4bcbc6"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "ELIVEL - CEASA",
|
||||
"value": "6722f6e91b6f1050e77eb9121b4bcbc6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "Marcelo Machado",
|
||||
"value": "1cd863e31bbcd550598a2021f54bcb8f"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140127",
|
||||
"value": "INC0140127"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "15/07/2025 08:35:12",
|
||||
"value": "2025-07-15 11:35:12"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Wi-fi Clientes",
|
||||
"value": "Wi-fi Clientes"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(11) 94748-8877",
|
||||
"value": "(11) 94748-8877"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "gustavo.tavares@globalweb.com.br",
|
||||
"value": "gustavo.tavares@globalweb.com.br"
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "Gustavo Oliveira Tavares",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/93a51e5f87dd9a10ab40c8440cbb356d",
|
||||
"value": "93a51e5f87dd9a10ab40c8440cbb356d"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "Colaborador informa que o wifi dos clientes da loja está conectando mas não está recebendo internet, impossibilitando a não navegação. Colaborador informa também que não sabe qual roteador deve reiniciar e por isso segue com esse problema. Poderiam verificar?\r\n\r\nContato: (11) 94748-8877\r\ne-mail: machado.marcelo@d21motors.com.br\r\nKb não localizado",
|
||||
"value": "Colaborador informa que o wifi dos clientes da loja está conectando mas não está recebendo internet, impossibilitando a não navegação. Colaborador informa também que não sabe qual roteador deve reiniciar e por isso segue com esse problema. Poderiam verificar?\r\n\r\nContato: (11) 94748-8877\r\ne-mail: machado.marcelo@d21motors.com.br\r\nKb não localizado"
|
||||
},
|
||||
"location": {
|
||||
"display_value": "YELLOW - SÃO BERNARDO",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/77223ae91b6f1050e77eb9121b4bcb69",
|
||||
"value": "77223ae91b6f1050e77eb9121b4bcb69"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "YELLOW - SÃO BERNARDO",
|
||||
"value": "77223ae91b6f1050e77eb9121b4bcb69"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "Mayara Santos Duarte",
|
||||
"value": "6fd0181d1b334ed0c5e163923b4bcb60"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140090",
|
||||
"value": "INC0140090"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "14/07/2025 15:22:54",
|
||||
"value": "2025-07-14 18:22:54"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Telefonia Fixa",
|
||||
"value": "Problemas com Telefonia Fixa"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(11) 97766-5397",
|
||||
"value": "(11) 97766-5397"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "gustavo.tavares@globalweb.com.br",
|
||||
"value": "gustavo.tavares@globalweb.com.br"
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "Gustavo Oliveira Tavares",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/93a51e5f87dd9a10ab40c8440cbb356d",
|
||||
"value": "93a51e5f87dd9a10ab40c8440cbb356d"
|
||||
},
|
||||
"variables.numero_ramal": {
|
||||
"display_value": "3883 / 3880 / 3882",
|
||||
"value": "3883 / 3880 / 3882"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "Colaboradora informa que os ramais dos consultores não estão recebendo e nem efetuando ligações. No ramal aparece a mensagem a procurar serviço. Poderiam verificar?\r\n\r\nKb não localizado",
|
||||
"value": "Colaboradora informa que os ramais dos consultores não estão recebendo e nem efetuando ligações. No ramal aparece a mensagem a procurar serviço. Poderiam verificar?\r\n\r\nKb não localizado"
|
||||
},
|
||||
"location": {
|
||||
"display_value": "HMB - NACOES UNIDAS MATRIZ",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/ef22f6e91b6f1050e77eb9121b4bcbe1",
|
||||
"value": "ef22f6e91b6f1050e77eb9121b4bcbe1"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "HMB - NACOES UNIDAS MATRIZ",
|
||||
"value": "ef22f6e91b6f1050e77eb9121b4bcbe1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "Raphael Ranquini Da Rocha Araujo",
|
||||
"value": "1275062d3be16210f6e903f136e45a95"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140089",
|
||||
"value": "INC0140089"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "14/07/2025 15:17:38",
|
||||
"value": "2025-07-14 18:17:38"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Telefonia Fixa",
|
||||
"value": "Problemas com Telefonia Fixa"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(21) 98438-5173",
|
||||
"value": "(21) 98438-5173"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "tales.lima@globalweb.com.br",
|
||||
"value": "tales.lima@globalweb.com.br"
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "Tales da Silva de Lima",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/f5f3499e3be312102b4dd037f4e45a01",
|
||||
"value": "f5f3499e3be312102b4dd037f4e45a01"
|
||||
},
|
||||
"variables.numero_ramal": {
|
||||
"display_value": "9257",
|
||||
"value": "9257"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "O colaborador entrou em contato para solicitar ajuda com seu ramala que nçao recebe nem faz ligações. Relatou que os outros rmais da loja estão funcionando normalmente, exceto da sua mesa vizinha.\r\nKb não localizado",
|
||||
"value": "O colaborador entrou em contato para solicitar ajuda com seu ramala que nçao recebe nem faz ligações. Relatou que os outros rmais da loja estão funcionando normalmente, exceto da sua mesa vizinha.\r\nKb não localizado"
|
||||
},
|
||||
"location": {
|
||||
"display_value": "HMB - ITAUNA",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/e722f6e91b6f1050e77eb9121b4bcbdb",
|
||||
"value": "e722f6e91b6f1050e77eb9121b4bcbdb"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "HMB - ITAUNA",
|
||||
"value": "e722f6e91b6f1050e77eb9121b4bcbdb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "Rebeca Maila Pereira De Jesus Da Silva",
|
||||
"value": "c8ed818d870cea90ab40c8440cbb3532"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140067",
|
||||
"value": "INC0140067"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "14/07/2025 11:03:11",
|
||||
"value": "2025-07-14 14:03:11"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Telefonia Fixa",
|
||||
"value": "Problemas com Telefonia Fixa"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(71) 3032-2350",
|
||||
"value": "(71) 3032-2350"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "rebeca.dsilva@caoa.com.br",
|
||||
"value": "rebeca.dsilva@caoa.com.br"
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "Rebeca Maila Pereira De Jesus Da Silva",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/c8ed818d870cea90ab40c8440cbb3532",
|
||||
"value": "c8ed818d870cea90ab40c8440cbb3532"
|
||||
},
|
||||
"variables.numero_ramal": {
|
||||
"display_value": "RAMAIS DO SETOR DE VENDAS EM GERAL: 2368, 2350...",
|
||||
"value": "RAMAIS DO SETOR DE VENDAS EM GERAL: 2368, 2350..."
|
||||
},
|
||||
"description": {
|
||||
"display_value": "O telefone 7130322350 não esta recebendo ligações externas, mesmo todos os cabos de redes estando conectados. Foi feito o teste efetuando a ligação com o telefone de colaboradores para a loja, mas a chamada não completa.\r\n\r\nPeço, por gentileza, a regularização com urgência pois esta impactando o atendimento aos clientes.",
|
||||
"value": "O telefone 7130322350 não esta recebendo ligações externas, mesmo todos os cabos de redes estando conectados. Foi feito o teste efetuando a ligação com o telefone de colaboradores para a loja, mas a chamada não completa.\r\n\r\nPeço, por gentileza, a regularização com urgência pois esta impactando o atendimento aos clientes."
|
||||
},
|
||||
"location": {
|
||||
"display_value": "HMB - LAURO DE FREITAS",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/af22f6e91b6f1050e77eb9121b4bcbdd",
|
||||
"value": "af22f6e91b6f1050e77eb9121b4bcbdd"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "HMB - LAURO DE FREITAS",
|
||||
"value": "af22f6e91b6f1050e77eb9121b4bcbdd"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "Danieli Da Silva Lourenco",
|
||||
"value": "0fbaae3bdba00210154714031496198c"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140062",
|
||||
"value": "INC0140062"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "14/07/2025 10:41:24",
|
||||
"value": "2025-07-14 13:41:24"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Telefonia Fixa",
|
||||
"value": "Problemas com Telefonia Fixa"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(11) 95437-2858",
|
||||
"value": "(11) 95437-2858"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "andrey.muniz@globalweb.com.br",
|
||||
"value": "andrey.muniz@globalweb.com.br"
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "Andrey Chaves de Assuncao Barros Muniz",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/530501c087f45e14ab40c8440cbb358c",
|
||||
"value": "530501c087f45e14ab40c8440cbb358c"
|
||||
},
|
||||
"variables.numero_ramal": {
|
||||
"display_value": "4229",
|
||||
"value": "4229"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "Colaboradora diz que ao entrarem em contato com a loja uma das opções da ura de atendkmeto, da como indisponivel, poderiam verificar?",
|
||||
"value": "Colaboradora diz que ao entrarem em contato com a loja uma das opções da ura de atendkmeto, da como indisponivel, poderiam verificar?"
|
||||
},
|
||||
"location": {
|
||||
"display_value": "YELLOW - BERRINI",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/73223ae91b6f1050e77eb9121b4bcb35",
|
||||
"value": "73223ae91b6f1050e77eb9121b4bcb35"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "YELLOW - BERRINI",
|
||||
"value": "73223ae91b6f1050e77eb9121b4bcb35"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "Halyff Lucas Zembrsuski",
|
||||
"value": "bcca8efb1be2d01029846538fa4bcb82"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140050",
|
||||
"value": "INC0140050"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "14/07/2025 09:17:29",
|
||||
"value": "2025-07-14 12:17:29"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Telefonia Fixa",
|
||||
"value": "Problemas com Telefonia Fixa"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(51) 98404-0351",
|
||||
"value": "(51) 98404-0351"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "talison.costa@globalweb.com.br",
|
||||
"value": "talison.costa@globalweb.com.br"
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "Talison Medeiros Costa",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/664e5b4e8701a290ab40c8440cbb3598",
|
||||
"value": "664e5b4e8701a290ab40c8440cbb3598"
|
||||
},
|
||||
"variables.numero_ramal": {
|
||||
"display_value": "30758998",
|
||||
"value": "30758998"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "Colaborador informa que o telefone da marca FAVIL está indisponível e mesmo trocando de ponto de rede continua sem dar sinal. Poderiam verificar?\r\n\r\nContato: (51) 98404-0351\r\n\r\nKb não localizado",
|
||||
"value": "Colaborador informa que o telefone da marca FAVIL está indisponível e mesmo trocando de ponto de rede continua sem dar sinal. Poderiam verificar?\r\n\r\nContato: (51) 98404-0351\r\n\r\nKb não localizado"
|
||||
},
|
||||
"location": {
|
||||
"display_value": "YELLOW - CANOAS",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/f3223ae91b6f1050e77eb9121b4bcb3d",
|
||||
"value": "f3223ae91b6f1050e77eb9121b4bcb3d"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "YELLOW - CANOAS",
|
||||
"value": "f3223ae91b6f1050e77eb9121b4bcb3d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "Alexandre Filgueiras Sampaio",
|
||||
"value": "678b8ad1db1f715015471403149619b1"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140047",
|
||||
"value": "INC0140047"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "14/07/2025 09:03:05",
|
||||
"value": "2025-07-14 12:03:05"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Telefonia Fixa",
|
||||
"value": "Problemas com Telefonia Fixa"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(91) 98142-5518",
|
||||
"value": "(91) 98142-5518"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "guilhermefo@globalweb.com.br",
|
||||
"value": "guilhermefo@globalweb.com.br"
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "Guilherme Henrique Fonseca Oliveira",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/bf3d28ad872c16d0ab40c8440cbb3599",
|
||||
"value": "bf3d28ad872c16d0ab40c8440cbb3599"
|
||||
},
|
||||
"variables.numero_ramal": {
|
||||
"display_value": "33234109",
|
||||
"value": "33234109"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "Colaborador entrou em contato informando que ao receber ligações os ramais ficam mudo, poderiam verificar?\r\n\r\nOBS: Problema se iniciou hoje\r\n\r\nContato: (91) 98142-5518\r\nKB não localizado ",
|
||||
"value": "Colaborador entrou em contato informando que ao receber ligações os ramais ficam mudo, poderiam verificar?\r\n\r\nOBS: Problema se iniciou hoje\r\n\r\nContato: (91) 98142-5518\r\nKB não localizado "
|
||||
},
|
||||
"location": {
|
||||
"display_value": "YELLOW - BELEM",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/f7223ae91b6f1050e77eb9121b4bcb33",
|
||||
"value": "f7223ae91b6f1050e77eb9121b4bcb33"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "YELLOW - BELEM",
|
||||
"value": "f7223ae91b6f1050e77eb9121b4bcb33"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "Ester Da Conceicao Pinheiro Bandeira",
|
||||
"value": "031cfdab97822a14501634a6f053afe1"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140037",
|
||||
"value": "INC0140037"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "12/07/2025 11:04:20",
|
||||
"value": "2025-07-12 14:04:20"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Telefonia Fixa",
|
||||
"value": "Problemas com Telefonia Fixa"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(91) 98293-5650",
|
||||
"value": "(91) 98293-5650"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "tales.lima@globalweb.com.br",
|
||||
"value": "tales.lima@globalweb.com.br"
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "Tales da Silva de Lima",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/f5f3499e3be312102b4dd037f4e45a01",
|
||||
"value": "f5f3499e3be312102b4dd037f4e45a01"
|
||||
},
|
||||
"variables.numero_ramal": {
|
||||
"display_value": "4108",
|
||||
"value": "4108"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "A colaboradora informou que seu ramal se encontra fora. Não está recebendo nem fazendo ligações, sejam internas ou externas. Poderiam verificar, por genitleza?\r\nKb não localizado",
|
||||
"value": "A colaboradora informou que seu ramal se encontra fora. Não está recebendo nem fazendo ligações, sejam internas ou externas. Poderiam verificar, por genitleza?\r\nKb não localizado"
|
||||
},
|
||||
"location": {
|
||||
"display_value": "YELLOW - BELEM",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/f7223ae91b6f1050e77eb9121b4bcb33",
|
||||
"value": "f7223ae91b6f1050e77eb9121b4bcb33"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "YELLOW - BELEM",
|
||||
"value": "f7223ae91b6f1050e77eb9121b4bcb33"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "Marcelo Silva Vaz",
|
||||
"value": "919eba291bbc3510598a2021f54bcb06"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140013",
|
||||
"value": "INC0140013"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "11/07/2025 14:46:41",
|
||||
"value": "2025-07-11 17:46:41"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Telefonia Fixa",
|
||||
"value": "Problemas com Telefonia Fixa"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(11) 96786-6325",
|
||||
"value": "(11) 96786-6325"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "marcelo.vaz@d21motors.com.br",
|
||||
"value": "marcelo.vaz@d21motors.com.br"
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "Marcelo Silva Vaz",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/919eba291bbc3510598a2021f54bcb06",
|
||||
"value": "919eba291bbc3510598a2021f54bcb06"
|
||||
},
|
||||
"variables.numero_ramal": {
|
||||
"display_value": "203",
|
||||
"value": "203"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "RAMAL Sem Serviço",
|
||||
"value": "RAMAL Sem Serviço"
|
||||
},
|
||||
"location": {
|
||||
"display_value": "YELLOW - TATUAPE",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/b988f06fdbc909101547140314961969",
|
||||
"value": "b988f06fdbc909101547140314961969"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "YELLOW - TATUAPE",
|
||||
"value": "b988f06fdbc909101547140314961969"
|
||||
}
|
||||
},
|
||||
{
|
||||
"variables.caller_id": {
|
||||
"display_value": "Gabrielle Araujo Barbosa",
|
||||
"value": "556a8ef71be2d01029846538fa4bcbe9"
|
||||
},
|
||||
"number": {
|
||||
"display_value": "INC0140002",
|
||||
"value": "INC0140002"
|
||||
},
|
||||
"opened_at": {
|
||||
"display_value": "11/07/2025 13:45:18",
|
||||
"value": "2025-07-11 16:45:18"
|
||||
},
|
||||
"short_description": {
|
||||
"display_value": "Problemas com Telefonia Fixa",
|
||||
"value": "Problemas com Telefonia Fixa"
|
||||
},
|
||||
"variables.telephone_favorecido_rh": {
|
||||
"display_value": "(21) 96817-2060",
|
||||
"value": "(21) 96817-2060"
|
||||
},
|
||||
"opened_by.email": {
|
||||
"display_value": "guilhermefo@globalweb.com.br",
|
||||
"value": "guilhermefo@globalweb.com.br"
|
||||
},
|
||||
"opened_by": {
|
||||
"display_value": "Guilherme Henrique Fonseca Oliveira",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/sys_user/bf3d28ad872c16d0ab40c8440cbb3599",
|
||||
"value": "bf3d28ad872c16d0ab40c8440cbb3599"
|
||||
},
|
||||
"variables.numero_ramal": {
|
||||
"display_value": "35398723",
|
||||
"value": "35398723"
|
||||
},
|
||||
"description": {
|
||||
"display_value": "Colaboradora entrou em contato informando que seu ramal consta como indisponível, poderiam verificar?\r\n\r\nOBS: Colaboradora informa que a internet no seu computador esta funcionando \r\n\r\nContato:(21) 96817-2060\r\nKb não localizado ",
|
||||
"value": "Colaboradora entrou em contato informando que seu ramal consta como indisponível, poderiam verificar?\r\n\r\nOBS: Colaboradora informa que a internet no seu computador esta funcionando \r\n\r\nContato:(21) 96817-2060\r\nKb não localizado "
|
||||
},
|
||||
"location": {
|
||||
"display_value": "HMB - TIJUCA",
|
||||
"link": "https://caoadev.service-now.com/api/now/table/cmn_location/a322f6e91b6f1050e77eb9121b4bcbee",
|
||||
"value": "a322f6e91b6f1050e77eb9121b4bcbee"
|
||||
},
|
||||
"variables.location": {
|
||||
"display_value": "HMB - TIJUCA",
|
||||
"value": "a322f6e91b6f1050e77eb9121b4bcbee"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
30
src/app.js
30
src/app.js
@ -1,29 +1,3 @@
|
||||
const express = require('express');
|
||||
const bodyParser = require('body-parser');
|
||||
const cors = require('cors');
|
||||
const routes = require('./src/routes/index');
|
||||
const { logger } = require('./utils/logger');
|
||||
const { snService } = require('./controllers/servicenowController');
|
||||
|
||||
const app = express();
|
||||
|
||||
// Middleware setup
|
||||
app.use(cors()); // Enable CORS for all routes
|
||||
app.use(bodyParser.json()); // Parse JSON request bodies
|
||||
app.use(bodyParser.urlencoded({ extended: true })); // Parse URL-encoded request bodies
|
||||
|
||||
// Logger middleware
|
||||
app.use((req, res, next) => {
|
||||
logger.info(`${req.method} ${req.url}`);
|
||||
next();
|
||||
});
|
||||
|
||||
// Routes setup
|
||||
app.use('/api', routes);
|
||||
|
||||
// Error handling middleware
|
||||
app.use((err, req, res, next) => {
|
||||
logger.error(err.message);
|
||||
res.status(500).json({ error: 'Internal Server Error' });
|
||||
});
|
||||
|
||||
module.exports = app;
|
||||
snService();
|
||||
@ -0,0 +1,9 @@
|
||||
const { fetchTicketsFromServiceNow } = require('../services/servicenowService');
|
||||
|
||||
const snService = async () => {
|
||||
await fetchTicketsFromServiceNow();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
snService
|
||||
}
|
||||
@ -1,56 +1,20 @@
|
||||
// src/services/servicenowService.js
|
||||
|
||||
const axios = require('axios');
|
||||
const { logError, logInfo } = require('../utils/logger');
|
||||
const apiConfig = require('../../config/apiConfig');
|
||||
const fs = require('fs');
|
||||
|
||||
// Configurações da API do ServiceNow
|
||||
const serviceNowConfig = {
|
||||
baseURL: process.env.SERVICENOW_BASE_URL,
|
||||
auth: {
|
||||
username: process.env.SERVICENOW_USERNAME,
|
||||
password: process.env.SERVICENOW_PASSWORD,
|
||||
},
|
||||
};
|
||||
|
||||
// Função para buscar um ticket pelo ID
|
||||
const getTicketById = async (ticketId) => {
|
||||
const fetchTicketsFromServiceNow = async () => {
|
||||
try {
|
||||
const response = await axios.get(`/api/now/table/ticket/${ticketId}`, serviceNowConfig);
|
||||
logInfo(`Ticket ${ticketId} fetched successfully.`);
|
||||
return response.data.result;
|
||||
const ticketsResponse = await axios.get(apiConfig.snApiConfig.baseUrl, {
|
||||
auth: apiConfig.snApiConfig.auth
|
||||
});
|
||||
|
||||
// gerar um JSON das respostas da API
|
||||
fs.writeFileSync('servicenow_tickets.json', JSON.stringify(ticketsResponse.data, null, 2));
|
||||
} catch (error) {
|
||||
logError(`Error fetching ticket ${ticketId}: ${error.message}`);
|
||||
throw error;
|
||||
console.log('SERVICE NOW error: ', error.message);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Função para criar um novo ticket no ServiceNow
|
||||
const createTicket = async (ticketData) => {
|
||||
try {
|
||||
const response = await axios.post('/api/now/table/ticket', ticketData, serviceNowConfig);
|
||||
logInfo(`Ticket created successfully with ID: ${response.data.result.sys_id}`);
|
||||
return response.data.result;
|
||||
} catch (error) {
|
||||
logError(`Error creating ticket: ${error.message}`);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
// Função para atualizar um ticket existente
|
||||
const updateTicket = async (ticketId, ticketData) => {
|
||||
try {
|
||||
const response = await axios.put(`/api/now/table/ticket/${ticketId}`, ticketData, serviceNowConfig);
|
||||
logInfo(`Ticket ${ticketId} updated successfully.`);
|
||||
return response.data.result;
|
||||
} catch (error) {
|
||||
logError(`Error updating ticket ${ticketId}: ${error.message}`);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
// Exporta as funções para uso em outros módulos
|
||||
module.exports = {
|
||||
getTicketById,
|
||||
createTicket,
|
||||
updateTicket,
|
||||
};
|
||||
fetchTicketsFromServiceNow
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user