Manage Connections

Content on this page is for a product or feature in controlled release (CR). If you are not part of the CR group and would like more information, contact your CXone Account Representative.

Integration Hub connections allow you to set up integrations to third-party web services to use in CXone.

Create a Connection Template

A connection template defines the basic information about an integration. Templates are used to create connections, where you can configure specific requests and other information.

Connection templates cannot be modified after creation. If you need to change any details, including the headers, you must create a new template.

  1. In CXone, click the app selector and select Automation & AIIntegration Hub.
  2. Click Add Template.
  3. On the Details tab, enter a Name for the template.
  4. Enter the name of the Application you're connecting to. This could be an application, platform, or web service.
  5. Select REST as the Integration Method, Currently, REST is the only supported method.
  6. Select an option for Authentication Type.

  7. Enter a Description of the template. Other users can see it when they select this template from the connection library.
  8. Attach an icon by dragging and dropping an image or by clicking Browse files. This icon is displayed for this template in the connection library and under My Connections for all connections created from this template.
  9. On the Configuration tab, select the methods (verbs) that you want to be available for use with this template. Not all web services support all REST verbs.
  10. To define custom authentication headers for this template, click Add Custom Header. This option is only available if you enabled authentication for the template. To define a header: 
    1. Enter the header name in the field that appears.
    2. Click Add Custom Header to add more custom headers.
    3. Select Required? for any headers that must be used in connections created from this template.
    4. Click the X to delete a header.
  11. Double-check all settings. You cannot edit a template after you save it.
  12. Do one of the following: 
    • Click Save to add the template to the connection library.
    • Click Save + My Connections to add the template to the connection library and create a connection from it. After the connection is created, you can configure it by adding authentication details, secrets, or requests. Your request can include any or all of these configurations.

Create a Connection from a Template

Connections allow you to create requests and add authentication details. Connections appear under My Connections in Integration Hub.

You create connections from connection templates. The connection library shows all the connection templates that exist in your CXone system. If there isn't a template that matches what you need to do, you can create one.

  1. In CXone, click the app selector and select Automation & AIIntegration Hub.
  2. Locate a template in the connection library. The library is on the right side of the page. If you're viewing a connection or template, click the X in the upper right corner of the page. This closes it so you can see the connection library.

  3. Click My Connection on the template properties page to create a connection based on the template.

  4. If you're using an mTLS self-signed certificate, fill in the following fields:

    • Client Certificate
    • Client Private Key
    • Key Passphrase

    These fields will only appear if you use OAuth 2.0 as your authentication type. You should enter the Client Certificate and Client Private Key together. If your Client Private Key is encrypted, you must enter a Key Passphrase. mTLS certificates will only work if your authentication URL is in HTTPS. Validation of these fields will occur after the connection is saved. You can reference these fields in the Secrets tab.

  5. Enter a name for the connection and click Save.

  6. Click the new connection in the list on the left side of the page.

  7. On the Configuration tab, configure a Timeout in milliseconds. The timeout applies to all request configured in the connection, including authentication.

  8. Configure authentication and requests as needed. Your connection can include one or the other, or both.

  9. Configure secrets if you have information you want to be encrypted for use in the connection.

Configure Authentication Details

You can configure authentication details on the Authentication tab in your connection. This tab is visible only when authentication is enabled in the template used for this connection.

  1. In CXone, click the app selector and select Automation & AIIntegration Hub.
  2. Click the connection you want to work with from My Connections on the left side of the page.

  3. On the Authentication tab, enter the URL used for the authentication request. The URL cannot be dynamic, but you can reference secrets in it.

  4. Select the REST Method (verb) used in the authentication request. The available verbs are defined by the template used for this connection.

  5. Under Headers, enter the appropriate value in each field. Fields with an asterisk ( * ) are required. These fields are defined in the template used for this connection.

  6. To add a custom header to this connection:

    1. Click Add Custom Header.

    2. Enter a Header Name and Header Value.

  7. To add a query parameter to the authentication request:
    1. Click Add Query Parameter.
    2. For each query parameter you add, enter a Query Parameter Name and Query Parameter Value.
  8. Select a Media Type and enter the Body content. The media type affects the format of the body content. It should match the type required by the authorization server you're using.

  9. Click Save.

Add Secrets to a Connection

Integration Hub secrets allow you to have certain information encrypted in a connection. This provides an added layer of security when using sensitive information such as passwords in Studio scripts.

Secrets are not reversible. When you click away from the Secret Value field, the content is encrypted and replaced with masking asterisks ( * ). There is no way to retrieve the value you entered into the field after it's masked.

  1. In CXone, click the app selector and select Automation & AIIntegration Hub.
  2. Click the connection you want to work with from My Connections on the left side of the page.

  3. On the Secrets tab, click Add Secret.

  4. Enter a Secret Name that identifies what the secret contains. The name will be used like a variable when you want to use the secret in the connection. Names can contain spaces or special characters.

  5. Enter the Secret Value. This is the information that will be encrypted. Before you click away from this field, verify that the information is correct. 

  6. Click Save.

Use Secrets in a Connection

Secrets are used like variables. You enter the formatted name of the secret in place of the value it holds. When the connection is used, the system replaces the secret name with its encrypted value.

You can use secrets in manual or Studio requests. In authentication details, you can use secrets in headers, query parameters, and body content.

Use a Secret in Authentication Details or a Manual Request

  1. In CXone, click the app selector and select Automation & AIIntegration Hub.
  2. Click the connection you want to work with from My Connections on the left side of the page.

  3. Click the tab where you want to use a secret. Secrets can be used on the Authentication and Requests tabs.

  4. Enter the secret in the place where you want the secret value to be, following the guidelines:

    • Enclose the name in double brackets. For example, [[ secretName ]].
    • Use the name exactly as entered in the Secret Name field on the Secrets tab.
    • Secrets can only be used with the connection where they were created.

Use a Secret in a Studio Request

To use secrets in a Studio script, the script must have a CONNECTAuth or CONNECTREQUEST action. The action must link the script to the connection containing the secret.

  1. In Studio, open the script you want to use the secret in.

  2. Double-click the Snippet action you want to add the secret to.

  3. In the Snippet editor window, add the secret in the place where you want the secret value to be used, following these guidelines:

    • Enclose the name in double brackets. For example, [[ secretName ]].
    • Use the name exactly as entered in the Secret Name field on the Secrets tab.
    • Enclose the brackets and secret name in double quotes ( " ). For example, "[[ secretName ]]". If the secret is part of a string, such as a URL, the entire string must be enclosed in double quotes, not just the secret. For example, "[[ secretName ]]/location/anotherlocation/".
    • Secrets can only be used with the connection where they were created. The connection must be specified in the script with a CONNECTAuth or CONNECTREQUEST action.

    Examples: 

    • ASSIGN requestPayload.body = "[[client_id]]"

    • ASSIGN URL = "[[INSTANCEURI]]/INCONTACTAPI/SERBICES/V26.0/AGENTS"

Create a Manual Request

Requests are how you obtain the information you need from the web service your integration connects to. You can use manual requests in Studio scripts or execute them from Integration Hub.

If your request requires path parameters or variable substitution in the URL, headers, or parameters, you must create a Studio request. Manual requests don't support these options.

  1. In CXone, click the app selector and select Automation & AIIntegration Hub.
  2. Click the connection you want to work with from My Connections on the left side of the page.

  3. On the Requests tab, click Add Request.

  4. Enter a Request Name.

  5. Select Manual as the Trigger.

  6. Enter the URL for this request.

  7. Click the Method (verb) for this request.

  8. Under Headers, add any headers that are required for your request:

    1. Click Add Header.

    2. Enter a Header Name and Header Value.

  9. Under Query Parameters, add any query parameters that are required for your request: 
    1. Click Add Query Parameter.
    2. Enter a Query Parameter Name and a Query Parameter Value.
  10. Select a Media Type and enter the Body content. The media type affects the format of the body content. It should match the type required by the web service you're connecting to.

  11. If you want to change this request's active status, click Active at the top of the page. The text changes to Inactive.
  12. Click Confirm.
  13. On the Requests tab, click Test for the request you just added. Integration Hub attempts the request. A window appears and displays the results of the test.
  14. Click Edit and make changes to the request or click Save.

Create a Studio Request

Studio request is helpful when you have API requests that cannot be created in Integration Hub but you want to be able to use Integration Hub for authentication and secrets.

  1. In CXone, click the app selector and select Automation & AIIntegration Hub.
  2. Click the connection you want to work with from My Connections on the left side of the page.

  3. On the Requests tab, click Add Request.

  4. Enter a Request Name.

  5. Select Studio as the Trigger.

  6. Select and copy the example request payload from the Add Request page if you want to use the example to build the JSON in your script.

  7. Click Confirm.

    Studio requests cannot be tested from Integration Hub. You must test them in Studio by running the script with a trace.

  8. Click Save.
  9. Launch Studio and log in.
  10. Open an existing script or create a new one.
  11. Add a Snippet action to your script and double-click it to open the Snippet editor window.
  12. Build a dynamic object in the Snippet editor window and convert it to JSON. The object you create must contain members that hold the headers, query parameters, and body content required for the request.

    Use the example payload you copied from Integration Hub in an earlier step as a guide when you create your object. The example payload is: 

    {
     "URL": "[[INSTANCEURI]]/INCONTACTAPI/SERBICES/V26.0/AGENTS",
     "HTTPMETHOD": "POST",
     "HEADERS": {
    	"CONTENT-TYPE": "APPLICATION/JSON",
    	"AUTHORIZATION": "BEARER[[BEARERTOKEN]]"
    	},
     "QUERYPARAMETERS": {
    	"ANI": "[[ANI]]",
    	"ACCOUNTID": "123456"
    	},
     "BODY": {
    	"ANI": "[[ANI]]",
    	"ACCOUNTID": "123456",
    	"ACCOUNTNAME": "TESTACCOUNT"
    	}
    }
    		

    A dynamic object created using the example payload as a guide is:

    DYNAMIC requestPayload 
    ASSIGN requestPayload.URL = "[[INSTANCEURI]]/INCONTACTAPI/SERBICES/V26.0/AGENTS"
    ASSIGN requestPayload.HTTPMETHOD = "POST"
    ASSIGN requestPayload.HEADERS.CONTENTHYPHENPLACEHOLDERTYPE = "APPLICATION/JSON"
    ASSIGN requestPayload.HEADERS.AUTHORIZATION = "BEARER[[BEARERTOKEN]]"
    ASSIGN requestPayload.QUERYPARAMETERS.ANI = "[[ANI]]"
    ASSIGN requestPayload.QUERYPARAMETERS.ACCOUNTID = "123456"
    ASSIGN requestPayload.BODY.ANI = "[[ANI]]"
    ASSIGN requestPayload.BODY.ACCOUNTID = "123456"
    ASSIGN requestPayload.BODY.ACCOUNTNAME = "TESTACCOUNT"
    ASSIGN requestPayloadJSON = requestPayload.asjson()
    ASSIGN requestPayloadJSON = requestPayloadJSON.replace("HYPHENPLACEHOLDER", "-")

    The last line of the preceding example uses the replace() function to insert the hyphen ( - ) character into the CONTENT-TYPE key name. In Studio, variable names cannot include special characters such as hyphens, so this approach is used as a workaround.

  13. Configure the script to use the request.

Change a Request's State

Each Integration Hub connection can have up to 50 requests. There is no restriction on how many requests can be active at a time. Requests are active by default.

  1. In CXone, click the app selector and select Automation & AIIntegration Hub.
  2. Click the connection you want to work with from My Connections on the left side of the page.

  3. On the Requests tab, click the request you want to work with.

  4. Click Inactive or Active at the top of the page to change the state.