{
   "authentication":{
      "type":"oauth2",
      "crmClientId":"3MVG9JJwBBbcN47Kv0Z7EuNd19INI1Bhe7uX_Wz6M0VlMyWJD4xPKTtn_b39bGn6LmdSkKJ.aLNGdV1brj16C",
      "crmClientSecret":"870E8D51A1CA06896D966A3D92ABD885346DAD4428926E965776C479055969E7",
      "crmScopes":"full refresh_token",
      "crmPhoneTest":"5514983253326",
      "crmAccountId":"001ak00000e27uPAAQ"     
   },
   "crmRest":[
      {
         "authorizationEndpoint":{
            "request":{
               "requestContentType":"empty",
               "requestEncoding":"empty",
               "requestType":"Get",
               "responseType":"empty",
               "url":"https://login.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://login.salesforce.com/services/oauth2/token"
            }
         }
      },
      {
         "createContactRecord":{
            "request":{
               "requestContentType":"application/json",
               "requestEncoding":"Json",
               "requestType":"Post",
               "responseType":"Json",
               "url":"https://nocompany-a9-dev-ed.develop.my.salesforce.com/services/data/v61.0/sobjects/Lead"
            },
            "body":{
               "Phone":"crmPhone",
               "LastName":"crmLastName",
               "FirstName":"crmFirstName",
               "Company":"Unknown",
               "LeadSource":"Phone Inquiry",
               "Status":"Working - Contacted"
            },
            "response":{
               "id":"id"
            }
         }
      },
      {
         "lookupContactByPhone":{
            "request":{
               "requestContentType":"application/json",
               "requestEncoding":"Json",
               "requestType":"Get",
               "responseType":"Json",
               "url":"https://nocompany-a9-dev-ed.develop.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://nocompany-a9-dev-ed.develop.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://nocompany-a9-dev-ed.develop.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://nocompany-a9-dev-ed.develop.lightning.force.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://nocompany-a9-dev-ed.develop.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"
           }
         }
       }
   ]
}