Skip to content

Add owner reassignment support to persons/deals/leads/organizations update commands #158

@Aaronontheweb

Description

@Aaronontheweb

Problem

The current pipedrive persons update command (and likely deals/leads/organizations update) does not expose an --owner or --owner-id flag.

This makes it impossible to reassign records via the CLI when team members depart, change roles, or when bulk ownership cleanup is needed. Today, the only workaround is to go into the Pipedrive web UI and reassign records one-by-one, which doesn't scale when a former employee leaves behind dozens or hundreds of records.

Reproduction

pipedrive persons update --help

Current options:

  • --name
  • --email
  • --phone
  • --org-id
  • --address
  • --custom-field

No --owner / --owner-id flag.

Proposed Solution

Add --owner-id <user-id> (or --owner <user-id>) flag to the following update commands:

  • pipedrive persons update
  • pipedrive deals update
  • pipedrive leads update
  • pipedrive organizations update

The Pipedrive API supports updating owner_id on all of these resources, so this should be a thin wrapper.

Bonus: Bulk reassignment

A pipedrive persons reassign --from-owner <user-id> --to-owner <user-id> (and equivalent for deals/leads/orgs) would be very useful for handling team-member departures. Could be implemented as a convenience command that lists + iterates the update endpoint.

Use Case

Team-member offboarding: when someone leaves, all of their open deals, leads, persons, and organizations need to be reassigned to a new owner so they show up in the right rep's daily queues. Currently a manual, error-prone process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions