Developer Platform
  • Home
  • Getting Started
    • General Information
    • Features Overview
    • Security
  • APPs
    • Public Apps
      • Shopify
      • Salesforce
      • Zendesk
      • Google Analytics
    • Build your App
      • Getting started
      • My Apps
      • App information
      • App Parameters
      • App Plugins
      • Add Webhooks
      • Submit your Apps
      • App security
      • Developer Policy
  • Use Cases
    • Copilots
      • Product Catalog sync through API
      • FAQ sync through API
    • Visitor experience
      • Integrating custom buttons into your site
      • Check availability before escalating to iAdvize
      • Authenticated Messaging
        • Introduction
        • Web client-side implementation
          • Authenticated Messaging overview
          • Brief timeline of the integration process
          • How to enable authenticated mode in the administration portal?
          • How to implement the customer authentication backend (token provider)?
          • How to authenticate with iAdvize in client's website?
          • How to deal with activation success or failure?
          • How to logout?
          • Compatibility with Mobile SDK
          • FAQ
        • Web backend implementation
          • Important information and recommendations
          • Signature and Encryption Detailed Process
          • Technical backend implementation
          • FAQ
      • Cross-domain Conversation Continuity
      • Customize replies with Markdown
    • Agent workspace
      • Custom App example and step-by-step tutorial
        • Get Started
        • Work with the Desk
        • Intent / Trigger
        • JWT
        • References
    • Administration
      • Users
        • SAML SSO Authentication - Implementation Guide
        • Create, update and delete users via API
        • Manage the availability of your users with the iAdvize API
        • Integrate the iAdvize conversation panel into an existing tool
    • Data & Analytics
      • Anonymize a conversation or visitor data
      • Create a custom dashboard
      • Find contact data using GraphQL
      • Retrieve conversations data
      • Retrieve messages exchanged within a conversation
  • Technologies
    • GraphQL API
      • Terminology
      • Reference
      • Authentication
      • Schema lifecycle
      • Error Management
      • Pagination
    • REST API (deprecated)
      • Statistic (deprecated)
      • Group (deprecated)
      • Call meeting (deprecated)
      • Operator (deprecated)
      • Skill (deprecated)
      • Transaction (deprecated)
      • Visitor (deprecated)
    • Webhooks
      • Reference
      • Guides
    • Desk events
      • Reference
    • Web & Mobile SDK
      • Javascript Web SDK
        • Reference
      • Javascript Callbacks
        • Reference
        • Guides
      • Mobile SDK
        • Fourme (latest)
        • Epoisses
        • Dauphin
        • Cantal
        • 🤝Support Policy
        • 🤔Frequently Asked Questions
    • Custom App
    • External Bot
      • Implementation
        • Configuration flow
        • Conversation flow
        • Conversation objects
      • Configuration
      • FAQ
      • Best practices
Powered by GitBook
On this page
  • Description of mutations
  • What does ClosedConversationAnonymize do?
  • What does VisitorAnonymize do?
  • How to retrieve the list of conversations/visitors to be anonymized?
  • Search for conversations containing a specific character string
  • Search for a visitor by email or phone number
  • How to anonymize the content of a conversation?
  • How to anonymize the data of a visitor?

Was this helpful?

  1. Use Cases
  2. Data & Analytics

Anonymize a conversation or visitor data

iAdvize provides two GraphQL mutations to allow you to anonymize a conversation or a visitor. These will be used when you need to delete personal data at the request of the visitor.

PreviousData & AnalyticsNextCreate a custom dashboard

Last updated 8 months ago

Was this helpful?

In this article, we will describe:

  • How to identify conversations and visitors to anonymize

  • How to use GraphQL mutations to start the anonymization process

First of all, it's important to recall what these two mutations do

Description of mutations

What does ClosedConversationAnonymize do?

  • It deletes the messages exchanged during the conversation (including all messages, system messages, and attachments).

  • It also deletes the custom data linked to the conversation.

  • It does not delete the conversation object itself or the statistics associated with it.

What does VisitorAnonymize do?

  • It deletes all the information attached to the visitor, such as name, first name, email, phone number, etc. This could include information provided through custom data, information manually entered by agents from the iAdvize interface, or information provided through our APIs.

How to retrieve the list of conversations/visitors to be anonymized?

If you don't have development skills, that's not a problem. We invite you to use the to design and execute your queries. In this article, you'll find examples of ready-to-use queries and links to load them from Apollo. Don't forget to log in to your iAdvize administrator space beforehand, so that you have the necessary rights to execute graphQL queries.

Search for conversations containing a specific character string

To begin, you will likely need to identify the conversations and the associated visitors in order to request their anonymization. Generally, the need for anonymization follows a visitor’s request, who will provide his name, first name, email to perform a search, but rarely the conversation ID he participated in.

From GraphQL, you can search for the list of conversation IDs that contains a specific string over a given period. From the same query, you can also retrieve the visitor profile ID associated with each conversation. Here is an example of a query:

Operation

query ClosedConversations($interval: Interval!, $filters: ClosedConversationFilters) {
 closedConversations(interval: $interval, filters: $filters) {
   edges {
     node {
       conversation {
         id
         visitor {
           id
         }
       }
     }
   }
 }
}

Variables

{
 "interval": {
   "from": "2021-08-14T00:00:00Z",
   "to": "2024-08-14T00:00:00Z"
 },
 "filters": {
   "messagesSearches": "<your_character_string>"
 }
}

iAdvize keeps conversation data (messages and custom data) for 3 years by default. The retention period may be shorter if requested by the customer. To ensure that your search is exhaustive, we recommend that you carry out your search over the last 3 years from today's date.

Response (example)

{
 "data": {
   "closedConversations": {
     "edges": [
       {
         "node": {
           "conversation": {
             "id": "83b04089-90be-41ad-a0f2-998710170212",
             "visitor": {
               "id": "8a91e839-15f3-48dd-85c7-a7991685baa7"
             }
           }
         }
       },
       {
         "node": {
           "conversation": {
             "id": "711944bd-cb87-49a7-91b0-c2c3a2668f5g",
             "visitor": {
               "id": "f41323c0-e76f-4835-b4e0-572e85d8fe2a"
             }
           }
         }
       }
     ]
   }
 }
}

Retrieve the IDs of the conversations and visitors you want to anonymize this way.

Search for a visitor by email or phone number

If searching the content of conversations doesn't produce any results, you can also search visitor data using an email or phone number.

Operation

query Visitors($projectId: Int!, $email: String) {
  visitors(projectId: $projectId, email: $email) {
    edges {
      node {
        id
      }
    }
  }
}

Variables

{
  "projectId": 6949,
  "email": "test@iadvize.com",
  "phoneNumber": "+33010120304"
}

Response

{
 "data": {
   "visitors": {
     "edges": [
       {
         "node": {
           "id": "2183b42d-464d-4824-abb1-504619724ea9"
         }
       }
     ]
   }
 }
}

How to anonymize the content of a conversation?

Operation

mutation ClosedConversationAnonymize($input: ClosedConversationAnonymizeInputType!) {
 closedConversationAnonymize(input: $input) {
   conversation {
     id
   }
   succeeded
 }
}

Variables

{
 "input": {
   "conversationId": "<your_conversation_id>"
 }
}

Response

{
 "data": {
   "closedConversationAnonymize": {
     "conversation": {
       "id": "83b04089-90be-41ad-a0f2-998710170212"
     },
     "succeeded": true
   }
 }
}

Error

for example, when you try to anonymize a conversation a second time.

{
 "data": {
   "closedConversationAnonymize": null
 },
 "errors": [
   {
     "message": "Conversation 83b04089-90be-41ad-a0f2-998710170212 has been not found during anonymization: it has either been dropped or anonymized",
     "path": [
       "closedConversationAnonymize"
     ],
     "locations": [
       {
         "line": 2,
         "column": 3
       }
     ],
     "extensions": {
       "code": "NOT_FOUND",
       "name": "NOT_FOUND",
       "retryPolicy": "NO_RETRY"
     }
   }
 ]
}

You can use the "succeeded" field to know if the operation was successful. If successful, it will be present with a value of "true." In case of an error, this field is absent, and a JSON "errors" array is returned.

How to anonymize the data of a visitor?

Operation

mutation VisitorAnonymize($visitorAnonymizeInput: VisitorAnonymizeInput!) {
 visitorAnonymize(visitorAnonymizeInput: $visitorAnonymizeInput) {
   visitor {
     id
   }
 }
}

Variables

{
 "visitorAnonymizeInput": {
   "id": "<your_visitor_id>"
 }
}

Response

{
 "data": {
   "visitorAnonymize": {
     "visitor": {
       "id": "74d51373-f091-4d5e-8826-009eeff9e4b3"
     }
   }
 }
}

Error

For example, when you try to anonymize a wrong Visitor ID.

{
 "errors": [
   {
     "extensions": {
       "name": "INVALID_ARGUMENT",
       "retryPolicy": "NO_RETRY"
     },
     "message": "Variable '$visitorAnonymizeInput' expected value of type 'VisitorAnonymizeInput!' but got: {\"id\":\"74d51373-f091-4d5e-8826-009eeff9e4bddfdsfdsf\"}. Reason: 'id' UUID expected (line 1, column 27):\nmutation VisitorAnonymize($visitorAnonymizeInput: VisitorAnonymizeInput!) {\n                          ^",
     "locations": [
       {
         "line": 1,
         "column": 27
       }
     ]
   }
 ]
}

The visitor ID present in GraphQL is not the same as the visitor ID displayed in the iAdvize administration (conversation log). It is therefore necessary to systematically use GraphQL to retrieve the visitor ID to be anonymized starting from the conversation and its ID (query `closedConversations`).

You can also (make sure you are properly connected to your iAdvize administration to be authorized to execute the query).

In this case, you'll need to use the following , which you'll then need to anonymize:

You need to execute the following GraphQL mutation to anonymize a conversation. Here is an accessible from your Apollo interface.

When you anonymize a conversation, we also recommend anonymizing the visitor associated with it. This way, you will delete the personal data contained in both the conversation and the visitor who initiated it. Here is an accessible from your Apollo interface.

Apollo interface
load this query directly from your Apollo interface
Query graphQL to retrieve the id of one or more visitors
example of a GraphQL request
example of graphQL request