{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":21499,"path":"integrate-applications/integration-hub/setup-first-adv.md","title":"Set up the First Advantage spoke","bundle":null,"doc_type":null,"release":"australia","body":"\n# Set up the First Advantage spoke\n\nIntegrate the ServiceNow instance with your First Advantage account using an API key to authenticate ServiceNow requests.\n\n## Before you begin\n\n-   Request an Integration Hub subscription.\n-   Activate the First Advantage spoke.\n-   Role required: admin.\n\n## Create Connection record for the First Advantage spoke\n\nCreate a connection record to integrate your ServiceNow instance and the First Advantage server. Your ServiceNow instance uses this connection record to perform the First Advantage spoke actions.\n\n### Before you begin\n\nRole required: admin.\n\nAcquire the API key from the First Advantage server.\n\n### Procedure\n\n1.  Navigate to **All** &gt; **Process Automation** &gt; **Workflow Studio**.\n\n2.  Select **Integrations**.\n\n3.  Select the **Connections** tab.\n\n4.  In the Search all connections field, enter `First Advantage`.\n\n    Confirm that the **Outbound** tab is selected.\n\n5.  On the FirstAdvantage tile, select **View Details**.\n\n    \\[Omitted image \"first-adv-view-details.png\"\\] Alt text: View Details button on FirstAdvantage alias tile.\n\n6.  Select **Configure**.\n\n7.  Fill the form.\n\n    |Field|Description|\n    |-----|-----------|\n    |Connection Name|Name of the connection. The default and read-only name of the first record is the same as that of the connection alias. You can provide a different name when you create a connection record by clicking **Add Connection**.|\n    |Connection URL|Option to provide the connection URL to the First Advantage server. The URL is [https://rest-ua.fadv.com](https://rest-ua.fadv.com).|\n    |Distribution Email|Option to provide a distribution email ID.|\n    |Version|Option to provide the version of the API.|\n    |API Key|Option to enter the API key that the First Advantage server uses to authenticate access requests.|\n\n    \\[Omitted image \"first-adv-conn-form.png\"\\] Alt text: First Advantage connection form.\n\n8.  Select **Configure Connection**.\n\n    The connection record is configured.\n\n\n## Create First Advantage states in your ServiceNow instance\n\nCreate First Advantage states to be displayed in the **State** list in your ServiceNow instance.\n\n### Before you begin\n\nRole required: admin\n\n### Create the Draft, Ready, and In Progress states\n\nCreate the Draft, Ready, and In Progress states in the Task \\[task\\] table.\n\n#### Before you begin\n\nRole required: admin.\n\n#### Procedure\n\n1.  In the Filter navigator, enter `sys_choice.list`.\n\n    The records in the Choice \\[sys\\_choice\\] table are displayed.\n\n2.  Click **New**.\n\n3.  On the form, fill these values and create three records for the Draft state.\n\n    |Field|Value|\n    |-----|-----|\n    |Table|Task \\[task\\]|\n    |Element|state|\n    |Label|Draft|\n    |Value|137|\n\n    **Note:**\n\n    -   Ensure that you provide the exact numbers in the **Value** field as mentioned here. The spoke flows will not be triggered if there is any change in these numbers.\n    -   Ensure that the record is created in the **Global** application.\n4.  Click **Submit**.\n\n5.  Similarly, create records for the Ready and In Progress states.\n\n    |Field|Value|\n    |-----|-----|\n    |Table|Task \\[task\\]|\n    |Element|state|\n    |Label|Ready|\n    |Value|173|\n\n    |Field|Value|\n    |-----|-----|\n    |Table|Task \\[task\\]|\n    |Element|state|\n    |Label|In Progress|\n    |Value|181|\n\n    **Note:**\n\n    -   Ensure that you provide the exact numbers in the **Value** field as mentioned here. The spoke flows will not be triggered if there is any change in these numbers.\n    -   Ensure that the record is created in the **Global** application.\n\n#### Result\n\nThe Draft, Ready, and In Progress states are created in the Task \\[task\\] table\n\n### Create the Complete and Cancelled states\n\nCreate the Complete and Cancelled states in the First Advantage Task \\[sn\\_fadv\\_spoke\\_first\\_advantage\\_task\\] table.\n\n#### Before you begin\n\nRole required: admin.\n\n#### Procedure\n\n1.  Navigate to **All** &gt; **First Advantage Spoke** &gt; **Order Tasks**.\n\n2.  Click **New**.\n\n    **Note:** Ensure that the record is created in the **First Advantage** application.\n\n3.  Right-click **State** and click **Configure Choices**.\n\n4.  Perform these steps to create the Cancelled state:\n\n    1.  Enter `Cancelled` in **New item text**.\n\n    2.  Enter `149` in **Numeric value**.\n\n        **Note:** Ensure that you provide the exact numbers in the **Numeric value** field as mentioned here. The spoke flows will not be triggered if there is any change in these numbers.\n\n    3.  Click **Add**.\n\n    4.  Click **Save**.\n\n5.  Perform these steps to create the Complete state:\n\n    1.  Enter `Complete` in **New item text**.\n\n    2.  Enter `127` in **Numeric value**.\n\n        **Note:** Ensure that you provide the exact numbers in the **Numeric value** field as mentioned here. The spoke flows will not be triggered if there is any change in these numbers.\n\n    3.  Click **Add**.\n\n    4.  Click **Save**.\n\n\n#### Result\n\nThe Complete and Cancelled states are created in the First Advantage Task \\[sn\\_fadv\\_spoke\\_first\\_advantage\\_task\\] table.\n\n### Create the Complete - Success and Complete - Deal Broken states\n\nCreate the Complete - Success and Complete - Deal Broken states in the First Advantage Employee Task \\[sn\\_fadv\\_spoke\\_first\\_advantage\\_employee\\_task\\_table\\] table.\n\n#### Before you begin\n\nRole required: admin.\n\n#### Procedure\n\n1.  Navigate to **All** &gt; **First Advantage Spoke** &gt; **Employee Task**.\n\n2.  Click **New**.\n\n    **Note:** Ensure that the record is created in the **First Advantage** application.\n\n3.  Right-click **State** and click **Configure Choices**.\n\n4.  Perform these steps to create the Cancelled state:\n\n    1.  Enter `Complete - Success` in **New item text**.\n\n    2.  Enter `161` in **Numeric value**.\n\n        **Note:** Ensure that you provide the exact numbers in the **Numeric value** field as mentioned here. The spoke flows will not be triggered if there is any change in these numbers.\n\n    3.  Click **Add**.\n\n    4.  Click **Save**.\n\n5.  Perform these steps to create the Complete state:\n\n    1.  Enter `Complete - Deal Broken` in **New item text**.\n\n    2.  Enter `117` in **Numeric value**.\n\n        **Note:** Ensure that you provide the exact numbers in the **Numeric value** field as mentioned here. The spoke flows will not be triggered if there is any change in these numbers.\n\n    3.  Click **Add**.\n\n    4.  Click **Save**.\n\n\n#### Result\n\nThe Complete - Success and Complete - Deal Broken states are created in the First Advantage Employee Task \\[sn\\_fadv\\_spoke\\_first\\_advantage\\_employee\\_task\\_table\\] table.\n\n## Set up First Advantage webhooks\n\nReceive invite and order event updates at your ServiceNow instance by setting up the webhooks.\n\n### Before you begin\n\nRole required: admin\n\n### Create authorization key for the First Advantage spoke\n\nCreate a authorization key to authorise requests from Jenkins.\n\n#### Before you begin\n\nRole required: admin\n\n#### Procedure\n\n1.  Navigate to **All** &gt; **System Definition** &gt; **Scripts - Background**.\n\n2.  Enter this command in the **Run script \\(JavaScript executed on server\\)** text field:\n\n    `gs.info(GlideSecureRandomUtil.getSecureRandomString(32));`\n\n3.  Click **Run Script**.\n\n4.  Copy and record the generated value for later use.\n\n    \\[Omitted image \"auth-token.png\"\\] Alt text: Client Secret or Authorization Key\n\n\n### Provide key in your ServiceNow instance\n\nSet up the First Advantage webhook by providing key for the First Advantage webhook client.\n\n#### Before you begin\n\n-   [Create authorization key for the First Advantage spoke](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/integration-hub/setup-first-adv.md) and record the value.\n-   Role required: admin\n\n#### Procedure\n\n1.  Navigate to **All** &gt; **First Advantage Spoke** &gt; **FADV Webhook Client Details**.\n\n2.  Click **New**.\n\n3.  On the form, fill these values.\n\n    |Field|Description|\n    |-----|-----------|\n    |Name|Name to uniquely identify the record.|\n    |Authorization Key|Authorization key you had generated. For more information, see [Create authorization key for the First Advantage spoke](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/integration-hub/setup-first-adv.md).|\n\n4.  Click **Submit**.\n\n\n### Access API endpoints\n\nAccess the API endpoint for the invite and order events and share the required details with First Advantage to set up the webhooks.\n\n#### Before you begin\n\nRole required: admin\n\n#### Procedure\n\n1.  Navigate to **All** &gt; **System Web Services** &gt; **Scripted REST APIs**.\n\n2.  Open the record for the First Advantage spoke, for example, **First Advantage Webhook**.\n\n3.  In the **Resources** tab:\n\n    1.  Open the record for the invite event, for example, **Invite Status**.\n\n    2.  Copy and record the path provided in **Resource path**, for example, `/api/sn_fadv_spoke/fadv/invite_status`.\n\n    3.  Open the record for the order event, for example, **Order Status**.\n\n    4.  Copy and record the path provided in **Resource path**, for example, `/api/sn_fadv_spoke/fadv/order_status`.\n\n\n#### What to do next\n\nContact First Advantage to setup webhooks for your ServiceNow instance. For this, share these details with First Advantage:\n\n-   Custom header in this format: `fadvKey <authorization-key>`.\n\n    **Note:**\n\n    -   Ensure that the custom header is in this format only. The spoke flows will not be triggered if there is any change.\n    -   Provide the same key you had earlier provided in **First Advantage Spoke** &gt; **FADV Webhook Client Details**.\n    -   Use the same case as mentioned here: `fadvKey`.\n-   API endpoint for the invite events in this format: `<ServiceNow-instance-URL>/api/sn_fadv_spoke/fadv/invite_status`\n-   API endpoint for the order events in this format: `<ServiceNow-instance-URL>/api/sn_fadv_spoke/fadv/order_status`\n\n## Synchronise First Advantage accounts and packages with ServiceNow\n\nStore the details of the First Advantage accounts and packages by synchronizing First Advantage accounts and packages with ServiceNow.\n\n### Before you begin\n\nRole required: First Advantage admin\n\n### Procedure\n\n1.  Navigate to **All** &gt; **First Advantage Spoke** &gt; **Accounts**.\n\n2.  Click **New**.\n\n3.  On the form, fill in the values.\n\n    |Field|Description|\n    |-----|-----------|\n    |Primary Account|Option to specify that the account is a primary account. Select the check box.|\n    |Account ID|ID of the primary account.|\n    |Account Name|Name of the primary account.|\n\n4.  Click **Submit**.\n\n    The primary account is created and the record is displayed.\n\n5.  Navigate to **First Advantage Spoke** &gt; **Accounts**.\n\n6.  Click the **Get Accounts** related list.\n\n7.  Navigate to **First Advantage Spoke** &gt; **Packages**.\n\n8.  Click the **Get Packages** related link.\n\n\n### Result\n\nThe First Advantage account and package details are retrieved.\n\n**Note:** Only users with the FADV admin role can synchronize the account and package details. Users with FADV user role can only view the retrieved details.\n\n"}}