CRM activity/log ID previously returned by createCallLog.
contactId
CRM contact ID stored with the local call log.
authHeader
Prepared CRM auth header.
proxyConfig
Proxy configuration when applicable.
Return
Field
Description
callLogInfo.subject
Current CRM subject/title.
callLogInfo.note
Current editable note.
callLogInfo.fullBody
Full body/description saved in the CRM. Used by core as the base for composed updates.
callLogInfo.fullLogResponse
Full CRM response. Passed later to updateCallLog as existingCallLogDetails.
callLogInfo.contactName
Optional contact display name.
callLogInfo.dispositions
Optional current disposition values keyed by manifest field.
returnMessage
Optional UI feedback.
extraDataTracking
Optional analytics/tracing data.
Reference
constaxios=require('axios');asyncfunctiongetCallLog({user,callLogId,authHeader}){constpath=require('path');constmockCallLogsPath=path.join(__dirname,'..','mockCallLogs.json');constmockCallLogs=require(mockCallLogsPath);constcallLog=mockCallLogs.find(callLog=>callLog.id===callLogId);constsubject=callLog.subject;constnote=callLog.note?callLog.note.split('- Note: ')[1].split('\n')[0]:'';//-------------------------------------------------------------------------------------//--- CHECK: In extension, for a logged call, click edit to see if info is fetched ----//-------------------------------------------------------------------------------------//--------------------------------------//--- TODO: Add CRM API call here ------//--- TODO: Delete above mock JSON -----//--------------------------------------// const getLogRes = await axios.get(// `https://api.crm.com/activity/${callLogId}`,// {// headers: { 'Authorization': authHeader }// });return{callLogInfo:{subject,note,fullBody:callLog.note,dispositions:{testDispositionId:'test disposition value'}},returnMessage:{message:'Call log fetched.',messageType:'success',ttl:3000}}}module.exports=getCallLog;