From de399278d9d12e5d55cee2730766b4b0ac0482a1 Mon Sep 17 00:00:00 2001 From: Da Kong Date: Fri, 3 Jan 2025 12:06:44 +0800 Subject: [PATCH] fix: Bullhorn note get --- src/adapters/bullhorn/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/adapters/bullhorn/index.js b/src/adapters/bullhorn/index.js index 351fbf18..6dd6056f 100644 --- a/src/adapters/bullhorn/index.js +++ b/src/adapters/bullhorn/index.js @@ -388,7 +388,7 @@ async function createContact({ user, authHeader, phoneNumber, newContactName, ne async function createCallLog({ user, contactInfo, authHeader, callLog, note, additionalSubmission, aiNote, transcript }) { const noteActions = additionalSubmission.noteActions ?? ''; const subject = callLog.customSubject ?? `${callLog.direction} Call ${callLog.direction === 'Outbound' ? `to ${contactInfo.name}` : `from ${contactInfo.name}`}`; - let comments = 'Agent notes';; + let comments = 'Agent notes
';; if (user.userSettings?.addCallLogNote?.value ?? true) { comments = upsertCallAgentNote({ body: comments, note }); } comments += 'Call details')[0]?.split('
  • Summary: ')[1]?.split('
  • ')[0] ?? ''; const totalContactCount = getLogRes.data.data.clientContacts.total + getLogRes.data.data.candidates.total; let contact = { firstName: '', @@ -719,7 +720,7 @@ async function getCallLog({ user, callLogId, authHeader }) { } return { callLogInfo: { - subject: getLogRes.data.data.comments.split('
  • Summary: ')[1]?.split('
  • ')[0] ?? '', + subject, note, contactName: `${contact.firstName} ${contact.lastName}` }, @@ -753,7 +754,7 @@ function upsertCallAgentNote({ body, note }) { body = body.replace(noteRegex, `Agent notes
    ${note}

    `); } else { - body += `
    ${note}

    `; + body += `${note}

    `; } return body; }