{
   "authentication":{
      "type":"oauth2",
      "crmClientId":"3MVG9_I_oWkIqLrkzfDaK8hlNFdHqjRWZ62.9A6C8bCCuZsTmzJVokEhC.xFZq8LjH8aacBs8CNb_lQSHcfMw",
      "crmClientSecret":"7AEBE0AE0AE6386D34348A7D83D56234CCA1406998DF804F1AD0DE6AB1E55E75",
      "crmScopes":"full refresh_token",
      "crmPhoneTest":"551498325332",
      "crmOAuthRefreshToken":"5Aep8618yVsldz6rZP_nN5Ob0S3VSbO5DsHksJseMuG7dYHJQuUnAR.0muSjn_VlVM9YeARnacAGg5s0QsZWxKA",
      "crmOAuthToken":"00D4P000000iyUc!AQEAQPdYbZ9PsW7dEAFfFK2jzVzntHAkJjF5xDPK1bdZPsbFLHH.5Aw1th_DFJrS6XcJeGfRjQmhSBS36i6dIJuFDKjbAl67"
   },
   "crmRest":[
      {
         "authorizationEndpoint":{
            "request":{
               "requestContentType":"empty",
               "requestEncoding":"empty",
               "requestType":"Get",
               "responseType":"empty",
               "url":"https://restoque.my.salesforce.com/services/oauth2/authorize?response_type=code&client_id=crmClientId&code_challenge=bDXEJ0wxr0s369lGxHwewLULiOuyl6Y3W7QZABmn2S4&redirect_uri=crmRedirectURI&scope=crmScopes&code_challenge_method=S256"
            }
         }
      },
      {
         "tokenEndpoint":{
            "request":{
               "requestContentType":"none",
               "requestEncoding":"Json",
               "requestType":"Post",
               "responseType":"Json",
               "url":"https://restoque.my.salesforce.com/services/oauth2/token"
            }
         }
      },
      {
         "createContactRecord":{
            "request":{
               "requestContentType":"application/json",
               "requestEncoding":"Json",
               "requestType":"Post",
               "responseType":"Json",
               "url":"https://restoque.my.salesforce.com/services/data/v61.0/sobjects/Contact"
            },
            "body":{
               "Phone":"crmPhone",
               "LastName":"crmLastName",
               "FirstName":"crmFirstName"
            },
            "response":{
               "id":"id"
            }
         }
      },
      {
         "lookupContactByPhone":{
            "request":{
               "requestContentType":"application/json",
               "requestEncoding":"Json",
               "requestType":"Get",
               "responseType":"Json",
               "url":"https://restoque.my.salesforce.com/services/data/v61.0/query/?q=SELECT+Id,+Name,+PersonMobilePhone+FROM+Account+WHERE+PersonMobilePhone='crmPhone'"
            },
            "response":{
               "phone":"records[0].PersonMobilePhone",
               "id":"records[0].Id",
               "name":"records[0].Name",
               "accountId":"records[0].Id"
            }
         }
      },
      {
         "callJournaling":{
            "request":{
               "requestContentType":"application/json",
               "requestEncoding":"Json",
               "requestType":"Post",
               "responseType":"Json",
               "url":"https://restoque.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"
                  }
               }
            ]
         }
      },
      {
         "chatJournaling":{
            "request":{
               "requestContentType":"application/json",
               "requestEncoding":"Json",
               "requestType":"Post",
               "responseType":"Json",
               "url":"https://restoque.my.salesforce.com/services/data/v61.0/sobjects/Task"
            },
            "chats":[
               {
                  "chatDone":{
                     "WhoId":"crmContactId",
                     "Subject":"WhatsApp Chat",
                     "Description":"Conversation started via WhatsApp. Conversation link: chatLink",
                     "ActivityDate":"YYYY-MM-DD",
                     "Status":"Completed",
                     "Priority":"Normal"
                  }
               }
            ]
         }
      },
      {
         "redirectLink":{
            "request":{
               "url":"https://restoque.my.salesforce.com/lightning/r/Lead/crmContactId/edit?count=1&backgroundContext=%2Flightning%2Fr%2FLead%2F00Qak0000098YFhEAM%2Fview"
            }
         }
      },
      {
         "createCase":{
            "request":{
               "requestContentType":"application/json",
               "requestEncoding":"Json",
               "requestType":"Post",
               "responseType":"Json",
               "url":"https://restoque.my.salesforce.com/services/data/v61.0/sobjects/Case"
            },
            "body":{
               "Subject":"Assunto do Caso teste",
               "Origin":"Telefone",
               "Description":"Descrição detalhada do caso test",
               "Status":"Novo",
               "Priority":"Alta",
               "Categoria__c":"Telefonia",
               "ContactId":"",
               "RecordTypeId":"0124P00000070MzQAI"
            },
            "response":{
               "id":"id"
            }
         }
      }
   ]
}