# Setup in ServiceNow SPO

For your integration between ServiceNow SPO and Fairmarkit, you will need to complete some configuration in ServiceNow SPO.

### 1. Install plug-ins <a href="#id-1installplugins" id="id-1installplugins"></a>

Install all of the following required plug-ins:

* **ServiceNow IntegrationHub**
  * ServiceNow IntegrationHub Action Step - Rest
  * ServiceNow IntegrationHub Action Step – JSON Build
  * IntegrationHub Designer Core
  * Import Sets REST IntegrationHub Support
* **Source-to-Pay Integration Framework**
  * Finance Common Architecture
  * Common Service Delivery
  * Procurement Case Management
  * Source-to-Pay Workspace
  * Source-to-Pay Common Architecture
  * Sourcing and Purchasing Automation
  * Shopping Hub
* **Centralized Connection and Credential**

### 2. Define business criteria <a href="#id-2definebusinesscriteria" id="id-2definebusinesscriteria"></a>

Using the Decision Builder for the Sourcing-to-Pay Integration Framework, define the business criteria. This defines which service requests will be sent to the integration.

<figure><img src="/files/XYzxiIwpvRyT1Ueio5Rv" alt=""><figcaption></figcaption></figure>

### 3. Create an OAuth Client <a href="#id-3createanoauthclient" id="id-3createanoauthclient"></a>

Create a new OAuth Client, which will be used to allow Fairmarkit to access your entity.

{% stepper %}
{% step %}
Create a new OAuth Client (*System Oauth* - *Application Registry (oauth\_entity\_list)*)
{% endstep %}

{% step %}
Enter the following:

* **Type**: OAuth Client
* **Name**: Fairmakit Client
* **Application**: Fairmarkit (select from the list)
* **Client secret**: (generate some secret or leave blank to generate)
* **Active**: true
  {% endstep %}
  {% endstepper %}

### 4. Create a Fairmarkit user <a href="#id-4createafairmarkituser" id="id-4createafairmarkituser"></a>

Create a Fairmarkit user, which will be used to access Fairmarkit.

{% stepper %}
{% step %}
Create a new user (*System Security* - *Users and Groups* - *Users (sys\_user\_list*)).

* Set a user ID (username)
* The email and name can be blank.
  {% endstep %}

{% step %}
Save the user.
{% endstep %}

{% step %}
Set a password for the user. Make sure to save the password for the next section.
{% endstep %}

{% step %}
Disable *password needs reset*.
{% endstep %}

{% step %}
Set the role for the user to *sn\_shop.procurement\_administrator*. This roles is needed to access the staging tables and modify third-party fields.
{% endstep %}
{% endstepper %}

Share the following information with Fairmarkit:

* ServiceNow SPO hostname
* Credentials (created in steps 3 and 4)
  * Username (user ID)
  * Password
  * Client id
  * Client secret
* Email for default buyer user in Fairmarkit\
  This password is used to generate an access token. All request for quote events on the Fairmarkit side will be created by the account.

### 6. Configure with Fairmarkit <a href="#id-6configurewithfairmarkit" id="id-6configurewithfairmarkit"></a>

Once you share the information in the previous step, the Fairmarkit team will complete the necessary setup in Fairmarkit and give you the following:

* A permanent access token to access the Fairmarkit system from the ServiceNow application
* Fairmarkit accounts:
  * Company account
  * Administrator users (for the provided email)
  * Buyer user (for the provided email)

### 7. Set the access token <a href="#id-7settheaccesstoken" id="id-7settheaccesstoken"></a>

After Fairmarkit provides the access token, you'll need to set it in ServiceNow SPO.

#### Add access token

Complete the following process for each:

* Go to *Connection & Credentials* - *Connection & Credential Aliases*.
* Go to *Connection & Credentials* - *Credential*.&#x20;

{% stepper %}
{% step %}
Click **NEW**.
{% endstep %}

{% step %}
Select *API Key Credentials*.
{% endstep %}

{% step %}
Enter a name for the token.
{% endstep %}

{% step %}
In API Key, enter the token provided by the Fairmarkit team.
{% endstep %}

{% step %}
Save a new token.
{% endstep %}
{% endstepper %}

#### Update alias

Find an alias with the name *FMKT* and ID: *x\_fairm\_fairmarkit.FMKT*.

{% stepper %}
{% step %}
Open this alias.
{% endstep %}

{% step %}
Click to the **New** button on the connection.
{% endstep %}

{% step %}
Enter the name *FMKT connection*.
{% endstep %}

{% step %}
Select the **Credentials** label, and then select the token created in the previous step.
{% endstep %}

{% step %}
Enter the following URLs:

* **Dev integration**: <https://uat.fairmarkit.com/services/servicenow-connector/api/v1>
* **Staging integration**: <https://staging.fairmarkit.com/services/servicenow-connector/api/>
* **Production integration**: <https://app.fairmarkit.com/services/servicenow-connector/api/v1>
  {% endstep %}

{% step %}
Set the flag to *Active*.
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fairmarkit.com/buyers/integrations/servicenow-spo-integration/setup-in-servicenow-spo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
