镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

How to query contact id when contact is archived? #599

Description

@ryan-kim-siteminder

To delete archived contact permanently, we need to use contact id but it seems to me that there is no way we can retrieve contact id if contact is archived. Is there any way I can retrieve contact id to get it used as a prameter for deleting contact permanently? FYI, this requirement is part of PII(Personal Identifiable Information) initiative.

Version info

  • intercom-ruby version: v3.1.4
  • Ruby version:

Expected behavior

There should be a way to retrieve contact id for archived user. So archived users can be deleted permanently.

Actual behavior

I want to use email to search contact id for archived user but intercom api client does not provide that.
Tried to unarchive contact to get the contact id but to no avail because to unarchive contact it needs contact id.

Activity

  1. SeanHealy33 commented on Dec 16, 2022

    @SeanHealy33
    Contributor

    Hello @ryan-kim-siteminder I've looked into this unfortunately our API does not have a way to search for archived contacts yet. The API will return the contact if you've the specific id of the archived contact. I've raised this issue with the Contacts API feature team to implement in future roadmaps.

    We do have a webhook topic contact.archived that you can use to track if a contact is archived for later deletion.

  2. paulmwatson commented on Apr 1, 2025

    @paulmwatson

    Was this ever implemented? Useful to search by email but get back archived contacts if needed.

  3. Startouf commented on May 13, 2025

    @Startouf

    Hello, the gem needs to be patched to allow unarchiving by user_id string and not by "Intercom::Contact“, in the meantime you can unarchive a user this way
    (assuming you have a model User with an intercom_user_id attribute)

    contacts.unarchive(OpenStruct.new(id: user.intercom_user_id))
    

    The current gem implementation calls the REST API using the ID attribute only, so you just have to supply an object that responds to :id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions