# Connect your story to Carerix

Source: https://knowledge.intractive.app/en/articles/carerix

As soon as someone fills in a form in your story, the Carerix integration sends their details to your Carerix environment. It can create a candidate from any form in your story, register a full application or create a match on an existing publication.

## What you need first

- An active Intractive account with a story you can edit.
- Permission to set up integrations in the project. You need the admin role in the project to delete an integration.
- A Carerix user with permission to open the **Identity Access** menu, typically an administrator. If you don't have this, ask a Carerix administrator in your organisation.
- Access to the Carerix GraphQL API in your environment.
- At least one published vacancy in Carerix, if you want applicants to be linked to a publication automatically.

## Step 1: Create a client in Carerix

Before Intractive can talk to Carerix, you create a client in Carerix that Intractive uses to identify itself. The connection is made with an OAuth client: a Client ID and a Client secret. Anyone who has that pair can send data to your Carerix environment, so treat the secret like a password and never share it outside your team.

Create a dedicated client for Intractive rather than reusing an existing one. You can then see in Carerix exactly what was given access, and you can revoke Intractive's access later without breaking your other integrations.

These steps follow the Carerix documentation. We recommend reading it as well: [GraphQL API in the Carerix help centre](https://help.carerix.com/en/articles/9482350-graphql-api).

### Open the Identity Access menu

1. Log in to Carerix.
2. In the left-hand menu, go to the **Maintenance** section.
3. Open **Identity Access**.
4. Select the **Clients** tab.

   ![](https://storage.googleapis.com/intractive-knowledge-media/e1cfa25fa69d424f88d98111cbfbbea96c4c5b833836af3f9e3016cc1d9bb9e4.png)

### Create a new client

1. Select **New**.
2. Choose a **confidential client**. Carerix offers a **public client** and a **confidential client**. A confidential client is the right type for a regular integration that posts jobs and processes applications, as Intractive does.

   ![](https://storage.googleapis.com/intractive-knowledge-media/91b62777047177a2b5dd8d7b4138ccaf936186eb3599e7398f83f731461f4120.png)

### Configure the confidential client

Fill in the fields of the client.

| Field | What it is |
| --- | --- |
| **Name** | A name for your client. You can typically choose the name of the service that is going to connect with the GraphQL API through this client. It shows later to whom or what access was given with this client. |
| **Code** | A unique identifier you define yourself. It can be used to query the client via the API. It also acts as a prefix for the client's resources, permissions and scopes if the client is a resource server. Use the format `urn:{vendor}/{unique name}`. |
| **Default scopes** | Scopes define what an application is allowed to call. They are included in the token. If a scope needed for a specific endpoint is missing from the token, the request is rejected with a 403. Every request takes the default scopes into account. For the Intractive integration, add `urn:cx/cx5Wrapper:data:manage`. |
| **Optional Scopes** | Optional scopes appear in a token only if they are explicitly requested from the identity server when the token is obtained. |
| **Active YES/NO** | Indicates whether the client can be used (YES) or not (NO). |
| **Permissions** | Grants granular access (none, owner, office, all) for operations (create, read, update, delete) on entities. Not applicable to CR-prefixed GraphQL queries and mutations. |

![](https://storage.googleapis.com/intractive-knowledge-media/6f194d10f843992df18377a279dc4c18bdc73bf3787f159752f165ce00ae68a5.png)

1. Save the client. Carerix generates a **Client ID** and a **Client Secret**.
2. Copy both. You need them in step 2.\
   \[screenshot: the saved Carerix client with the Client ID and Client secret visible\]

> Warning: the secret is usually only fully visible right after creation. Store it somewhere safe before you leave the page.

### Find your token URL

1. Select **OpenID Configuration**. This opens a page of configuration values for your Carerix environment.
2. Select **Pretty print** in the top-left corner so the values are displayed readably.
3. Look for the **token endpoint** and copy that URL. This is the **Token URL** you paste into Intractive.

   ![](https://storage.googleapis.com/intractive-knowledge-media/ae143e0d77d04e0150bd72cdc1de46ba37ff2cc54d8f1c7cb819f1bacaa8d573.png)

   ![](https://storage.googleapis.com/intractive-knowledge-media/c08502cc87740406c4a96eeb1afbdf0dd9dadca1b619a45fcf0407f79f8a640a.png)

## Step 2: Connect Carerix to Intractive

1. Log in to Intractive at [builder.intractive.app/login](https://builder.intractive.app/login).
2. Open your story.
3. Select **Integrations** in the top bar of the story.
4. Select **Carerix**. The **Connect Carerix** window opens with three fields: **Client ID**, **Client Secret** and **Token URL**.
5. Paste in the Client ID, Client secret and Token URL you copied from Carerix.
6. Select **Test connection** to check the credentials.

   ![](https://storage.googleapis.com/intractive-knowledge-media/b13bca68a2fbaea2af0fb426d1611da37fc61363373643327a959c20a7391eff.png)

   ![](https://storage.googleapis.com/intractive-knowledge-media/af0d47332a8dc007c65feac69a85ce5e33b76660268bdf0874e7d56bae9a6c8b.png)
7. Select **Connect** to save the credentials. The form for your new integration opens and you can start configuring what should happen.

If your project already has a Carerix connection, selecting **Carerix** skips this window and opens the form straight away. To change the credentials, select **Settings** next to **Integration type**, then **Edit** and **Save**. The change applies to every story in the project.

If you see an error message, see "The connection test fails" under "If something goes wrong".

Intractive stores the credentials for the whole project, so every story in the project can use them. They are encrypted. Afterwards Intractive never shows them in full again, only the first few characters so you can recognise them.

## Step 3: Collect candidate details in your story

The integration sends data that your story has collected, so you first need a form and variables to hold the answers.

1. In your story, add a **Form** content block so visitors can leave their details.
2. Add the fields you want to collect. The example in this article has two fields: name and email.
3. Select **Set variables** on each field (**Logic** in the classic editor) to link it to a variable.

   ![](https://storage.googleapis.com/intractive-knowledge-media/1c5fe586e772759bf8680c2cb61a0cea951e6df0b154271e3f0b63769436090d.png)

You can use those variables in two places:

- Inside the story itself, to show an answer back to the visitor later on. Type `{{@variable}}` in any text field. The example has two variables, `name` and `email`. Once the visitor has filled in the form, `{{@name}}` or `{{@email}}` in a later content block displays the value they entered.
- Inside an integration, where the value is passed on to a system like Carerix.

Give your variables clear names, for example `first_name`, `last_name`, `email` and `motivation`. A variable name can only contain lowercase letters, numbers and underscores.

Ask for first name and last name as two separate fields, each with its own variable. Carerix stores a name as first name and last name. If your form only asks for "name", people often type their full name into that one field, and it all lands in one Carerix field. Last name is also a required field in Carerix when a candidate profile is created. If the last name is empty, the candidate can't be created, so make that field mandatory in your form.

## Step 4: Choose what should happen in Carerix

Once the connection is live, you decide what the integration does. You set this per story, so different campaigns can feed different vacancies, use different field mappings and carry their own settings.

### Set the general settings

The general settings come first. They hold the integration name and the trigger conditions, where you find the variables you created in your story. In the example these are `name` and `email`.

1. Enter an integration name.
2. Under the trigger conditions, select the variables the integration should watch. A checkmark appears next to each variable you select.

   ![](https://storage.googleapis.com/intractive-knowledge-media/479d1367dc759d701b327cb781b953d0c0a4442621b5881c2390ffd01eeb8125.png)
3. Turn on **All variables must be set before triggering** if Carerix should only receive a complete set of details.\
   \[screenshot: the trigger conditions with three variables selected and All variables must be set before triggering turned on\]

A trigger condition tells the integration when to fire. When one of the selected variables receives a new value during a visitor's session, the integration fires. With several variables selected, the integration can fire before the form is complete, and more than once.

With **All variables must be set before triggering** on, the integration only fires once every selected variable has a value in the current session. For example, select `first_name`, `last_name` and `email` and turn on **All variables must be set before triggering**. Carerix then receives the candidate only when all three are filled in, last name included.

### Pick an action

From the variables your story collects, you can start three actions. An integration can hold one or more of them. In the integration form, below the **General** section, choose an action from **Select an action**. Each action you add appears as a step, and you can add each type once.

- **Apply (Candidate + Match)**: creates the candidate and immediately links them to the vacancy they applied for. This is the full application flow and the option most customers use.
- **Create Candidate**: creates a candidate profile only, without linking them to a vacancy.
- **Create Match**: creates a match, linking a candidate to a publication.

**Apply (Candidate + Match)** and **Create Candidate** run first, then **Create Match**. If an action fails, the run stops there.

### Apply (Candidate + Match)

This action creates the candidate and the match in one go. In the mapping, you connect each story variable to the matching Carerix field. Whatever you ask for in your story can be sent through to Carerix, and you can add data in Carerix afterwards to complete the candidate profile.

The available fields:

- **Publication ID**
- **Match Source**
- **First Name**
- **Last Name**
- **Email Address**
- **Phone Number**
- **Mobile Number**
- **City**
- **Street**
- **Zip Code**
- **Country**
- **Birth Date**
- **Gender**
- **Initials**
- **Prefix**
- **Candidate Source**
- **Custom field name…**

Beyond this list you can add custom fields, so anything specific to your Carerix setup can be filled from the story as well.

The example maps the publication ID (also called job ID), first name and email address. When someone fills out the form in the story, this triggers the apply step in the integration. A candidate profile is created and directly linked to the job.

You find the publication ID in Carerix under **Jobs**, as the job's number. Every job has a number, so the integration knows where to send the created candidate. In the example the number is 531.

Every field mapping has a **Variable** or **Text** source. Choose **Text** to type a fixed value, such as a publication ID. **Publication ID** starts as **Text**.

![](https://storage.googleapis.com/intractive-knowledge-media/671e982478960f627eac4f9e1f0205d862f8322ddf0d6b9fd4c1b6426f39cc61.png)

The action has two options:

- **Deduplicate**: when enabled, Carerix first checks whether the person submitting already exists as a candidate before creating a new one. If a match is found, the existing candidate is updated with the new information and no second record is created. This helps when the same person goes through multiple stories, or comes back later to apply again. Their history stays together on one candidate profile. When disabled, every submission creates a new candidate in Carerix, even if that person is already in the system.
- **Record consent (AVG/GDPR)**: when enabled, the candidate's consent is recorded in Carerix from the opt-in in your form. The approval date is the moment the form was submitted. Set the **Opt-in type** of your **Form** block to **Opt-in**. The form's **Opt-in consent key** must match the **Consent key** of the action, which is `contact` in both by default.

\[screenshot: the Apply action with Deduplicate and Record consent (AVG/GDPR) turned on\]

### Create Candidate

Use this action when you want the candidate in your database but not linked to a specific vacancy, for example for an open application or a talent pool story. Map your story variables to the Carerix candidate fields in the same way as for **Apply (Candidate + Match)**.

![](https://storage.googleapis.com/intractive-knowledge-media/7a457de3f04f52ef6061b1a427880098fd7defd485e351d1a8921a0c677c5a20.png)

### Create Match

This action creates the match directly in Carerix. It links a candidate to a publication, so they appear in the right pipeline for that vacancy. You map **Job/Publication ID**, **Source** and **Stage** (an index number or the exact stage name). There is also a **Custom Fields** section and a **Set owner from vacancy** option. The candidate is always the one made by the **Create Candidate** action in the same run, so add **Create Candidate** as well. **Create Match** doesn't use the candidate from **Apply (Candidate + Match)**.

![](https://storage.googleapis.com/intractive-knowledge-media/aaab75b158fee6a221598bc18f1a229571c342050db668c932a64d179190c427.png)

### Save the integration

1. Select **Create** for a new integration, or **Save** for an existing one.

> Warning: save before you leave the page. Unsaved changes to your integration steps are lost.

## Step 5: Test your integration

You can check straight away whether the connection is working.

1. Publish your story and open the link. If the story was already published, refresh the story page.
2. Fill in the form as a candidate would.
3. Submit the form.
4. In Intractive, select **Integration activity**. You see which calls were made, what was sent and the response that came back. A call that arrived correctly gets the label **Delivered**. A call that failed gets the label **Failed**. A call that hasn't been delivered yet gets the label **Pending**. Select a call to see what went wrong and where the problem is.

   ![](https://storage.googleapis.com/intractive-knowledge-media/3fc83f1ac2eadac949a8b853f30e48178c30d0a5d0144dc5d73dcc96c9814284.png)
5. Open Carerix and check that the candidate was added. If you used **Apply (Candidate + Match)** or **Create Match**, check that they are linked to the right vacancy.\
   \[screenshot: the new candidate in Carerix, linked to the vacancy from the test\]

Intractive keeps activity records for 29 days.

## If something goes wrong

| What you see | What to check |
| --- | --- |
| The connection test fails | Check that the Client ID, Client secret and Token URL were pasted in full, with no extra spaces. Confirm that **Active YES/NO** is set to YES on the client in Carerix. Check that the Token URL is the token endpoint from **OpenID Configuration**, not the URL of the OpenID Configuration page itself. |
| The request is rejected with a 403 | The scope needed for the endpoint isn't in the token. Check that `urn:cx/cx5Wrapper:data:manage` is set as a default scope on the client, and review the client's permissions for the entities you're writing to. |
| No candidate appears in Carerix | Check your trigger conditions: at least one variable that the form fills in must be selected. Then confirm that the form fields are linked to variables under **Set variables**. Finally, open **Integration activity** to see whether a call was sent at all. |
| Fields arrive empty | The story variable isn't mapped to a Carerix field, or the form field isn't connected to that variable under **Set variables**. |
| The candidate exists but isn't linked to a vacancy | You're using **Create Candidate** where you need **Apply (Candidate + Match)**, or no **Publication ID** is mapped. Switch to **Apply (Candidate + Match)**, or add a **Create Candidate** and a **Create Match** action. |
| A candidate's full name is in one field | Your form asks for a single "name" field. Split it into first name and last name in the story, with separate variables, and map them separately. |

If this doesn't solve it, send us a message in the chat. We'll look at it with you.
