How can I unalias users manually?Updated 11/02/2020

There may be different reasons why you may want to manually remove alias or aliases from selected users. It can be a simple data fix on small set of users needed because of error in external service or a data adjustments caused by business logic change. Removing wrong aliases is crucial to prevent accidental user merges, so such operation is vital for data consistency.

Let's say that we have an existing user with email: who was aliased with abc:123 alias which is not valid anymore, to prevent wrong user merges which can break data flow.

Altering small number users like that can be easily done by REPL connector. Go ahead and install the connector from connectors gallery within your organization.

install hull repl connector

After the connector is installed hit "Code Editor" button at the bottom of the sidebar.

code editor hull repl connector

This will open a code editor where you can write and execute API calls to Hull platform.

empty code editor hull repl connector

To perform the changes mentioned above write the following code:

hull.asUser({ email: "" })
    .unalias({ anonymous_id: "abc:123" });

As soon as you finish writing / paste the code you can see the preview of your changes on the right side of the screen, but still no action was performed. The preview allows you to double check if the changes which will be performed are aligned with your intentions.

unalias preview

Once you are sure that the call is correct hit "Run" button at the top of the screen. This will call the platform right away and in the bottom right section you should see "Call successful" confirming that the platform accepted the change.

unalias call

After the change is processed by the platform you will see result both on user profile and on linked account profile.