nvManageConversation

This method allows you to manage a conversation thread in Sales Navigator by archiving or unarchiving it.

typescript
try {
  const workflow = await linkedapi.nvManageConversation.execute({
    threadId: "2-Zjhm...",
    operation: "archive"
  });

  const { errors } = await linkedapi.nvManageConversation.result(workflow.workflowId);

  // The list of possible execution errors is below
  if (errors && errors.length > 0) {
    console.warn('Workflow completed with execution errors:');
    errors.forEach(error => {
      console.warn(` - Type: ${error.type}, Message: ${error.message}`);
    });
  } else {
    console.log('Sales Navigator conversation updated successfully.');
  }
} catch (e) {
  // A list of all critical errors can be found here:
  // https://linkedapi.io/sdks/handling-results-and-errors/#handling-critical-errors
  if (e instanceof LinkedApiError) {
    console.error(`Critical Error - Type: ${e.type}, Message: ${e.message}`);
  } else {
    console.error('An unexpected, non-API error occurred:', e);
  }
}

Params

  • threadId – identifier of the conversation thread to manage, as returned by pollInbox or pollConversations, or read from the address bar of an open conversation — the <id> in linkedin.com/sales/inbox/<id>.
  • operation – operation to apply to the thread: archive or unarchive.

Data

The method doesn't return any data.

Errors

  • noSalesNavigator – your account does not have Sales Navigator subscription.
  • threadNotFound – provided threadId does not match an existing conversation.