Skip to main content
All CollectionsCustom integrations
Send traveller to another Journey
Send traveller to another Journey
Helga Kolbrún Magnúsdóttir avatar
Written by Helga Kolbrún Magnúsdóttir
Updated over 5 months ago

In some cases, you might want to send a traveller to another journey after they've completed a journey.

For example, if the traveller passes the pre-boarding process, you want to send them automatically to the official onboarding process.

To do that, you can set up a custom integration with Journeys.

Go to Settings -> Integrations -> Add integration and add 50skills

You can get our logo here:

Now you go to Settings -> API to get an authentication token for Journeys:

You will get a Client ID and a Client secret -- make sure to copy it somewhere temporarily because when you close this window, you won't be able to see it again.

Now you go back to the integration we just created, select "Authenticate" --> "Bearer token" and add the authentication URL: https://journeys-api.50skills.app/v1/auth/token/

Then add your Client ID and Client secret (from the previous step) and select "Advanced settings" and add "access_token" in the field for Token location:

Press "Test" to make sure the authentication is working.

Next we want to add an endpoint to add a traveller to another journey. If you're interested in viewing the API itself then you can find the documentation here.

And you can use this example request:

{

"journey":"8oz3gXzp",

"name":"Pippin Took",

"phone":"+441234567890"

}

Note that this is only adding a the basic information about the traveller, let's start with this and then below we will cover how you can add more information (for example information from the previous Journey).

To test this, you need to find an ID for the Journey you want to add this traveller to. Just open the Journey you want to add this traveller to and find the Journey ID in the URL - for example here is the Journey ID is "ekza5mzO":

Now add this ID to the test request, save it and test it in the Integration builder - like this:

You should get a success response like this:

And when you go to your Journey - you should see the traveller has appeared there:

Later in this article we'll see how you can automatically "start" the journey for this traveller. Because this function only inserted the traveller to this journey but didn't start the journey.

But first let's look at how you can add information from the previous journey to this traveller when the journey is created.

Adding more information to the traveller from previous Journey

Let's say for example that this is a pre-boarding journey and from that journey you know that the shoe size of the new hire is 39. Now you're automatically moving this person to an onboarding journey and you want the onboarding journey to know the shoe size.

Then the shoe size would need to be a "Journey attribute" in the onboarding journey:

You need to know the ID of this Journey attribute to be able to insert it to the new journey. To find the ID you can use software such as Postman or Insomnia, or just use Journeys. Here we'll show you how to get the ID using Jourenys.

Add a new endpoint to your Journeys integrations.

Find your Journey ID (see above how you find the Journey ID) and test the integration. You should then find in the test response the attribute you are looking for (in this example it's shoe size) and the source for it:

In this case it's: journey_attribute__6V5GzRPbX

Copy that and now go back to edit the endpoint "Add traveller to another journey". You there want to add this to the endpoint:

For example in this case I'm adding:

"journey_attribute__6V5GzRPbX": "39"

Now you should see the new field. Update the label to a more understandable name (in this case "Shoe size") and add some information to test:

You should get a success response:

And now you should see this traveller in your Journey with the shoe size as a journey attribute:

Note that this endpoint will now only work for that specific Journey -- because another journey might not accept shoe size but something else. So you would want to name this endpoint "Add traveller to Onboarding Journey" or something like that.

As you can see, this traveller has been added to the journey but is not automatically started. If you want to automatically start them then here is the guide for that:

Automatically start the journey for the traveller

We will then add a new endpoint for the Journeys integration:

To test it, just open any traveller who has been inserted to a journey and not started and find the Traveller ID in the URL, in this case it's WjZdjoO3k:

Now insert that traveller ID to the integration builder to try out "starting" this journey for this traveller:

You should get a success response:

And when you now open that traveller, you should see that the journey has started:

Using lists to select a journey from

The last thing we recommend, is to use a list to have an overview of the Journeys that a traveller can be created in. The list for "journeys" should have value as the Journey ID and the label as the name of the journey:

Now go to the integration builder and change the type of the "journey" filed to a select, using the new Journeys list:

Using the endpoints in a Journey

Now you want your Journey to use these functions, first you add the action "add traveller to another Journey":

Here I chose the "Onboarding Journey" from a list and I'm manually inserting the shoe size - the shoe size could also come from a previous form etc.

If you want the traveller to be automatically started after being inserted to a journey, you add the action "Start Journey for a traveller":

You see here how I map the ID from the previous action into this action.

Now you can run this journey and see how a traveller going through to this journey will automatically be added to another Journey 🚀

Did this answer your question?