In your Talkdesk account, go to (1) Build, (2) Integrations. Click (3) Add integration
Create "Custom Integration"
In your Talkdesk account, when creating a new integration, click Settings and Edit
Need to fill in the title (1), description (2).
Specify URL (3): https://app.saleslens.io/api/access_token
Then select Authorisation Type (4) Http API key.
Api Header Name (5): Authorisation
Key Value (6) insert the value from the API key previously created in Saleslens (SalesLens -> Integration-> Api Integrations & Api Tokens -> Create New https://app.saleslens.io/account/settings/integration/add_token )
Then Click Save (7)
Then open Actions-> Add Action
Specify title (1) and description (2)
URL Settings (3) POST: /call_record/upload
Input scheme specify the following code (4) and publish the Action (5):
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "http://talkdesk.com/accountid/connectionid/salesforce/createcasesl-uri-qs",
"type": "object",
"properties": {
"employeeExternalId": {
"title": "Employee external ID",
"type": "string"
},
"downloadRecordUrl": {
"title": "Record download URL",
"type": "string"
},
"categoryId": {
"title": "Category ID",
"type": "string"
},
"locale": {
"title": "Locale (en, es, etc...)",
"type": "string"
},
"title": {
"title": "Conversation title",
"type": "string"
},
"fileExtension": {
"title": "Record file extension",
"type": "string"
},
"httpHeader": {
"title": "Additional HTTP header for download",
"type": "string"
},
"tags": {
"title": "Conversation tags separated by a comma",
"type": "string"
},
"createdAt": {
"title": "Conversation created date and time",
"type": "string"
},
"email": {
"title": "Contact email",
"type": "string"
},
"phone": {
"title": "Contact phone",
"type": "string"
},
"firstName": {
"title": "Contact first name",
"type": "string"
},
"lastName": {
"title": "Contact last name",
"type": "string"
}
},
"additionalProperties": false
}
Next, in Automations, click Add automation
Specify a name (1), then Configure the automation.
Start the automation In Talkdesk (2), when triggering the event (3) (can be either an incoming call or an outbound call ends), action is the Action that you created in the previous step (4).
Below, select the required data (5) and drag and drop it from the left side to the right side into the required fields. You can use the example below as a basis:
For each sales agent, copy the "agent_id" from TalkDesk to the SalesLens agent settings "EMPLOYEE'S EXTERNAL ID USED IN API REQUESTS". This is how SalesLens will determine which user the call belongs to.
The agent ID can be seen in each user's edit link in the Talkdesk cabinet.