From 844593749be39ba120c9d3bbd225945761d81c96 Mon Sep 17 00:00:00 2001 From: adriano Date: Thu, 26 Jun 2025 17:55:02 -0300 Subject: [PATCH] chore: new templates file to test --- ...esforce_berlitz_sandbox_contact_14288.json | 154 ++++++++++++++ ...salesforce_berlitz_sandbox_lead_14288.json | 201 ++++++++++++++++++ 2 files changed, 355 insertions(+) create mode 100644 backend/Templates-test/TEMPLATES-DEFAULT/salesforce_berlitz_sandbox_contact_14288.json create mode 100644 backend/Templates-test/TEMPLATES-DEFAULT/salesforce_berlitz_sandbox_lead_14288.json diff --git a/backend/Templates-test/TEMPLATES-DEFAULT/salesforce_berlitz_sandbox_contact_14288.json b/backend/Templates-test/TEMPLATES-DEFAULT/salesforce_berlitz_sandbox_contact_14288.json new file mode 100644 index 0000000..e151de0 --- /dev/null +++ b/backend/Templates-test/TEMPLATES-DEFAULT/salesforce_berlitz_sandbox_contact_14288.json @@ -0,0 +1,154 @@ +{ + "authentication": { + "type": "oauth2", + "crmClientId": "3MVG97ZwUE6kNctcTD24tyRZJXLWfClkMmmH5wvnTw8b6EW92uMPeaYOpyyWyzjx_klDcVt7F2nF2jbluycT4", + "crmClientSecret": "FBA2860ECEAC86A3CED77841A0BD6B26AFD3E7F202C0241D534716B90E8C12AD", + "crmScopes": "full refresh_token", + "crmPhoneTest": "5511988334455" + }, + "crmRest": [ + { + "authorizationEndpoint": { + "request": { + "requestContentType": "empty", + "requestEncoding": "empty", + "requestType": "Get", + "responseType": "empty", + "url": "https://berlitz--blzlatam.sandbox.my.salesforce.com/services/oauth2/authorize?response_type=code&client_id=crmClientId&code_challenge=bDXEJ0wxr0s369lGxHwewLULiOuyl6Y3W7QZABmn2S4&redirect_uri=crmRedirectURI&scope=crmScopes&code_challenge_method=S256" + }, + "body": {}, + "response": {} + } + }, + { + "tokenEndpoint": { + "request": { + "requestContentType": "none", + "requestEncoding": "Json", + "requestType": "Post", + "responseType": "Json", + "url": "https://berlitz--blzlatam.sandbox.my.salesforce.com/services/oauth2/token" + }, + "body": {}, + "response": {} + } + }, + { + "createContactRecord": { + "request": { + "requestContentType": "application/json", + "requestEncoding": "Json", + "requestType": "Post", + "responseType": "Json", + "url": "https://berlitz--blzlatam.sandbox.my.salesforce.com/services/data/v61.0/sobjects/Contact" + }, + "body": { + "Phone": "crmPhone", + "LastName": "crmLastName", + "FirstName": "crmFirstName", + "Time_Zone__c": "America/Sao_Paulo" + }, + "response": { + "id": "id" + } + } + }, + { + "lookupContactByPhone": { + "request": { + "requestContentType": "application/json", + "requestEncoding": "Json", + "requestType": "Get", + "responseType": "Json", + "url": "https://berlitz--blzlatam.sandbox.my.salesforce.com/services/data/v61.0/query/?q=SELECT+Id,+Phone+FROM+Contact+WHERE+Phone='crmPhone'" + }, + "response": { + "phone": "records[0].Phone", + "id": "records[0].Id" + } + } + }, + { + "callJournaling": { + "request": { + "requestContentType": "application/json", + "requestEncoding": "Json", + "requestType": "Post", + "responseType": "Json", + "url": "https://berlitz--blzlatam.sandbox.my.salesforce.com/services/data/v61.0/sobjects/Task" + }, + "calls": [ + { + "inboundAnsweredCall": { + "Subject": "Call Journal", + "WhoId": "crmContactId", + "Description": "Ligação recebida", + "Status": "Completed", + "Priority": "Normal", + "CallType": "Outbound", + "CallDurationInSeconds": { + "_prop": "crmCallDuration", + "_type": "number", + "_format": "seconds" + }, + "ActivityDate": "YYYY-MM-DD", + "TaskSubtype": "Call" + } + }, + { + "inboundMissedCall": { + "Subject": "Call Journal", + "WhoId": "crmContactId", + "Description": "Ligação recebida perdida", + "Status": "Completed", + "Priority": "Normal", + "CallType": "Outbound", + "CallDurationInSeconds": { + "_prop": "crmCallDuration", + "_type": "number", + "_format": "seconds" + }, + "ActivityDate": "YYYY-MM-DD", + "TaskSubtype": "Call" + } + }, + { + "outboundAnsweredCall": { + "Subject": "Call Journal", + "WhoId": "crmContactId", + "Description": "Ligação realizada", + "Status": "Completed", + "Priority": "Normal", + "CallType": "Outbound", + "CallDurationInSeconds": { + "_prop": "crmCallDuration", + "_type": "number", + "_format": "seconds" + }, + "ActivityDate": "YYYY-MM-DD", + "TaskSubtype": "Call" + } + }, + { + "outboundUnansweredCall": { + "Subject": "Call Journal", + "WhoId": "crmContactId", + "Description": "Ligação realizada nao atendida", + "Status": "Completed", + "Priority": "Normal", + "CallType": "Outbound", + "CallDurationInSeconds": { + "_prop": "crmCallDuration", + "_type": "number", + "_format": "seconds" + }, + "ActivityDate": "YYYY-MM-DD", + "TaskSubtype": "Call" + } + } + ], + "response": {} + } + } + ] +} diff --git a/backend/Templates-test/TEMPLATES-DEFAULT/salesforce_berlitz_sandbox_lead_14288.json b/backend/Templates-test/TEMPLATES-DEFAULT/salesforce_berlitz_sandbox_lead_14288.json new file mode 100644 index 0000000..28887d8 --- /dev/null +++ b/backend/Templates-test/TEMPLATES-DEFAULT/salesforce_berlitz_sandbox_lead_14288.json @@ -0,0 +1,201 @@ +{ + "authentication": { + "type": "oauth2", + "crmClientId": "3MVG97ZwUE6kNctcTD24tyRZJXLWfClkMmmH5wvnTw8b6EW92uMPeaYOpyyWyzjx_klDcVt7F2nF2jbluycT4", + "crmClientSecret": "FBA2860ECEAC86A3CED77841A0BD6B26AFD3E7F202C0241D534716B90E8C12AD", + "crmScopes": "full refresh_token", + "crmPhoneTest": "5517988335455" + }, + "crmRest": [ + { + "authorizationEndpoint": { + "request": { + "requestContentType": "empty", + "requestEncoding": "empty", + "requestType": "Get", + "responseType": "empty", + "url": "https://berlitz--blzlatam.sandbox.my.salesforce.com/services/oauth2/authorize?response_type=code&client_id=crmClientId&code_challenge=bDXEJ0wxr0s369lGxHwewLULiOuyl6Y3W7QZABmn2S4&redirect_uri=crmRedirectURI&scope=crmScopes&code_challenge_method=S256" + }, + "body": {}, + "response": {} + } + }, + { + "tokenEndpoint": { + "request": { + "requestContentType": "none", + "requestEncoding": "Json", + "requestType": "Post", + "responseType": "Json", + "url": "https://berlitz--blzlatam.sandbox.my.salesforce.com/services/oauth2/token" + }, + "body": {}, + "response": {} + } + }, + { + "createContactRecord": { + "request": { + "requestContentType": "application/json", + "requestEncoding": "Json", + "requestType": "Post", + "responseType": "Json", + "url": "https://berlitz--blzlatam.sandbox.my.salesforce.com/services/data/v61.0/sobjects/Lead" + }, + "body": { + "Phone": "crmPhone", + "LastName": "crmLastName", + "FirstName": "crmFirstName", + "LeadSource": "WhatsApp", + "Country_Segmentation__c": "Brazil", + "CurrencyIsoCode": "BRL", + "RecordTypeId": "0120b000000OhSqAAK" + }, + "response": { + "id": "id" + } + } + }, + { + "lookupContactByPhone": { + "request": { + "requestContentType": "application/json", + "requestEncoding": "Json", + "requestType": "Get", + "responseType": "Json", + "url": "https://berlitz--blzlatam.sandbox.my.salesforce.com/services/data/v61.0/query/?q=SELECT+Id,Phone+FROM+Lead+WHERE+Phone='crmPhone'" + }, + "response": { + "phone": "records[0].Phone", + "id": "records[0].Id" + } + } + }, + { + "callJournaling": { + "request": { + "requestContentType": "application/json", + "requestEncoding": "Json", + "requestType": "Post", + "responseType": "Json", + "url": "https://berlitz--blzlatam.sandbox.my.salesforce.com/services/data/v61.0/sobjects/Task" + }, + "calls": [ + { + "inboundAnsweredCall": { + "Subject": "Call Journal", + "WhoId": "crmContactId", + "Description": "Ligação recebida", + "Status": "Completed", + "Priority": "Normal", + "CallType": "Outbound", + "CallDurationInSeconds": { + "_prop": "crmCallDuration", + "_type": "number", + "_format": "seconds" + }, + "ActivityDate": "YYYY-MM-DD", + "TaskSubtype": "Call" + } + }, + { + "inboundMissedCall": { + "Subject": "Call Journal", + "WhoId": "crmContactId", + "Description": "Ligação recebida perdida", + "Status": "Completed", + "Priority": "Normal", + "CallType": "Outbound", + "CallDurationInSeconds": { + "_prop": "crmCallDuration", + "_type": "number", + "_format": "seconds" + }, + "ActivityDate": "YYYY-MM-DD", + "TaskSubtype": "Call" + } + }, + { + "outboundAnsweredCall": { + "Subject": "Call Journal", + "WhoId": "crmContactId", + "Description": "Ligação realizada", + "Status": "Completed", + "Priority": "Normal", + "CallType": "Outbound", + "CallDurationInSeconds": { + "_prop": "crmCallDuration", + "_type": "number", + "_format": "seconds" + }, + "ActivityDate": "YYYY-MM-DD", + "TaskSubtype": "Call" + } + }, + { + "outboundUnansweredCall": { + "Subject": "Call Journal", + "WhoId": "crmContactId", + "Description": "Ligação realizada nao atendida", + "Status": "Completed", + "Priority": "Normal", + "CallType": "Outbound", + "CallDurationInSeconds": { + "_prop": "crmCallDuration", + "_type": "number", + "_format": "seconds" + }, + "ActivityDate": "YYYY-MM-DD", + "TaskSubtype": "Call" + } + } + ], + "response": {} + } + }, + { + "chatJournaling": { + "request": { + "requestContentType": "application/json", + "requestEncoding": "Json", + "requestType": "Post", + "responseType": "Json", + "url": "https://berlitz--blzlatam.sandbox.my.salesforce.com/services/data/v61.0/sobjects/Task" + }, + "chats": [ + { + "chatDone": { + "WhoId": "crmContactId", + "Subject": "Other", + "Description": "Conversation started via WhatsApp. Conversation link: chatLink", + "ActivityDate": "YYYY-MM-DD", + "Status": "Completed", + "Priority": "Normal" + } + } + ] + } + }, + { + "createCase": { + "request": { + "requestContentType": "application/json", + "requestEncoding": "Json", + "requestType": "Post", + "responseType": "Json", + "url": "https://berlitz--blzlatam.sandbox.my.salesforce.com/services/data/v61.0/sobjects/Case" + }, + "body": { + "Subject": "Assunto do Caso teste", + "Description": "Descrição detalhada do caso test", + "Status": "Novo", + "Priority": "Alta", + "Departamento__c": "Financeiro" + }, + "response": { + "id": "id" + } + } + } + ] +} \ No newline at end of file