Skip to main content

Merging conversations

In Parley we have 2 different users: Anonymous users and Registered users. The difference between the 2 is explained in Client API authorization.

It is possible to start the chat as an Anonymous user and continue as a Registered user. This way you will not lose your messages that were sent when you were Anonymous.

Anonymous user

To start a chat as an Anonymous user, you must call the POST /devices endpoint with an x-iris-identification and * without* an authorization header. This will create a new device for you and also create a new User within the Parley system. The messages send to/from this device will be linked to this User. This user can only have 1 device linked to it as there is no information supplied that tells us which user you are. That is where the Registered user flow comes in.

Registered user

To start a chat as a Registered user, you must call the POST /devices endpoint with an x-iris-identification and * with* an authorization header. The authorization header will tell Parley who this user is/will be.

Merging conversations

Now to merge your Anonymous user's conversation with your Registered user, you'll need to supply the same x-iris-identification, in the POST /devices call, as you've used for the Anonymous user. Your Anonymous conversation will then be merged into the new Registered conversation.

Using the authorization header it is also possible to register another device (a new uniqueAppDeviceId inside the x-iris-identification) and get the same chat history back as the previous device. This way you can start a chat on your PC and continue it on your mobile device.

Devices per User

There is no limit on how many devices a User can have. Our recommendation is to use 1 device per platform. A platform can be a device the user is chatting on: PC, Android, iOS, etc.

Going from Registered back to Anonymous

Going back from a Registered user back to an Anonymous user (using the same x-iris-identification) is not supported. If you do this you will get an error back from the api device_not_registered (this error might change in the future)