{
  "authentication": {
    "type": "oauth2",
    "crmClientId": "3MVG9JJwBBbcN47Kv0Z7EuNd19FFiitElmedOGAGcSNXcpIwPZBtd1ySG28ezhGVq13n9QzuixoxLfWeKrzwc",
    "crmClientSecret": "334EE185A4DB8A145E5A11F4F90980C5020170820BD5395EF93E16046505936C",
    "crmScopes": "",
    "crmPhoneTest": "5511988334455"
  },
  "crmRest": [
    {
      "authorizationEndpoint": {
        "request": {
          "requestContentType": "empty",
          "requestEncoding": "empty",
          "requestType": "Get",
          "responseType": "empty",
          "url": "https://login.salesforce.com/services/oauth2/authorize?client_id=crmClientId&response_type=code&code_challenge=bDXEJ0wxr0s369lGxHwewLULiOuyl6Y3W7QZABmn2S4&redirect_uri=crmRedirectURI"
        },
        "body": {},
        "response": {}
      }
    },
    {
      "tokenEndpoint": {
        "request": {
          "requestContentType": "none",
          "requestEncoding": "Json",
          "requestType": "Post",
          "responseType": "Json",
          "url": "https://login.salesforce.com/services/oauth2/token"
        },
        "body": {},
        "response": {}
      }
    },
    {
      "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/Contact"
        },
        "body": {
          "Phone": "crmPhone",
          "LastName": "crmLastName",
          "FirstName": "crmFirstName"
        },
        "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+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://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"
            }
          }
        ],
        "response": {}
      }
    }
  ]
}
