> For the complete documentation index, see [llms.txt](https://docs.fairmarkit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fairmarkit.com/buyers/integrations/servicenow-spo-integration/setup-in-servicenow-spo.md).

# 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="https://1711751134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F95QWDcOsKn95Me8sE2RP%2Fuploads%2FcpGvLLmMPaxAFJbVrkwL%2Fsn-rules_thumb_0_0.png?alt=media&amp;token=0452a690-77df-4afc-b229-aca9d2d5c70a" 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
