Set Up Data Share

If you haven't already done so, contact your Account Representative to enable CXone Mpower Data Share. Tell them whether you have your own Snowflake account or if you need to set up a new CXone Mpower Snowflake account.

Data Share setup differs depending on whether you have your own Snowflake account or if you're using a CXone Mpower Snowflake account. You make this choice prior to setup and you can only change it by working with your Account Representative.

Details about the data schema are only available in the articles shared with you when you purchased your Data Share license.

Set Up Data Share with a CXone Mpower Snowflake Account

Follow these steps if you don't already have your own Snowflake account. If you choose to use a CXone Mpower Snowflake account, you must change your password every 90 days. If you let your password expire, data sharing stops.

Complete each of these tasks in the order given.

Create a CXone Mpower Snowflake Account

  1. Click the app selector icon of app selector and select Admin.

  2. Go to Account Settings > Data Share.

  3. Click Create Account.

  4. In the confirmation window, select Yes, I agree and click Confirm. The account creation process can take up to 45 minutes. You can continue to use CXone Mpower for other tasks while you wait.

  5. Periodically check Notifications White bell icon on blue background indicating notifications in the toolbar on top of the screen. When a new notification appears, verify that your account creation was successful. If your account creation failed, don't try again. Instead, contact CXone Mpower Support.

  6. On the Data Share page, click Generate New Link to set up your Snowflake account password. When the link appears in a pop-up, click Copy URL. Paste the URL in a new browser window or tab. Set your Snowflake password.

  7. From the Data Share page, add the IP addresses and IP address ranges you want to give access to your Snowflake data. If you don't add any IP addresses, you will not be able to access your Snowflake URL.

    CXone Mpower doesn't verify that your entries are real IP addresses. It only verifies that the entry formats are valid. When a user logs in to your CXone Mpower Snowflake account, CXone Mpower verifies that attempts to pull data are coming from one of the IP addresses in your allowlist.

    1. On the Data Share page in CXone Mpower, scroll down to IP Range.
    2. In the text box, type the IP addresses and IP address ranges you want to add to the allowlist in CIDR notation. If you're adding more than one at the same time, separate each entry with a comma.
    3. Click Add.
    4. Once CXone Mpower confirms each IP address and range is a valid format, click Submit to apply them to your CXone Mpower Snowflake account.
  8. From the Data Share page, copy the Access URL. Paste the URL into a new browser tab or window.

  9. Log in to Snowflake. Use the CXone Mpower Snowflake Username and the password you just created.

  10. Once you're logged in, click CXONE_SHARED on the left to begin navigating the CXone Mpower shared data objects.

Manage CXone Mpower Snowflake Account

When you create a Snowflake account through CXone Mpower, you will become dependent on CXone Mpower for some of the maintenance tasks for the account. You will need to contact your Account Representative if you want to: 

  • Create new users in your Snowflake account.

  • Change the warehouse size.

  • Reset your password if you allow it to expire. Password expiration happens 90 days after your most recent password change.

If you are using Data Share with a CXone Mpower Snowflake account and no longer want these dependencies, contact your Account Representative for help arranging your own Snowflake contract.

Manage Data Access Allowlist

Use this section to add IP addresses and IP address ranges to your allowlist. This enhances security by limiting CXone Mpower Snowflake data access to only users logging in from the IP addresses you specify.

CXone Mpower doesn't verify that your entries are real IP addresses. It only verifies that the entry formats are valid. When a user logs in to your CXone Mpower Snowflake account, CXone Mpower verifies that attempts to pull data are coming from one of the IP addresses in your allowlist.

  1. On the Data Share page in CXone Mpower, scroll down to IP Range.
  2. In the text box, type the IP addresses and IP address ranges you want to add to the allowlist in CIDR notation. If you're adding more than one at the same time, separate each entry with a comma.
  3. Click Add.
  4. Once CXone Mpower confirms each IP address and range is a valid format, click Submit to apply them to your CXone Mpower Snowflake account.

Integrate with Storage

Use this section if you want to export data from Data Share into your own storage. This enables you to copy CXone Mpower data from your CXone Mpower Snowflake account to your own AWS S3 bucket. From there, you can download the data to your own data warehouse or BI tool.

  1. On the Data Share page, enter your AWS details for S3 Path and IAM Role.

  2. Click Save.

  3. Create a stage in Snowflake. Update your role with AWS IAM user and external ID as described in the Snowflake documentation. The storage integration name is dl_s3_integration.

    create stage __STAGE_NAME__
    						storage_integration = dl_s3_integration
    					url = '__S3_PATH__';
  4. Create the store procedure. See the Snowflake documentation for help creating the store procedure and creating the copy into stage SQL statement for the store procedure.

    create or replace procedure __STORE_PROCEDURE_NAME__()
    						returns string not null
    						language javascript
    						as
    						$$
    						var sql_command = "";
    						var curDate = new Date().toISOString();
    						var sql_command = sql_command.concat("copy into @__STAGE_NAME__","/path/", curDate,"/"," from cxone_shared.__SCHEMA__.__VIEW_NAME__overwrite=true header=true;");
    						var statement = snowflake.createStatement( {sqlText: sql_command} );
    						var result_set = statement.execute();
    						return sql_command;
    					$$;
  5. Create a task. See the Snowflake documentation to learn about tasks and for help creating the task.

    create task __TASK_NAME__
    						warehouse = dl_export
    						schedule = 'using cron */30 * * * * UTC'    -- Give any required cron expression. for example we have given cron for every 30 mins
    						as
    						call __STORE_PROCEDURE_NAME__();
       
    					alter task __TASK_NAME__ resume;

Set Up Data Share with Your Own Snowflake Account

Use these steps if you already have your own Snowflake account. If you choose to use your own Snowflake account, your account must be hosted on AWS and in the same region as your CXone Mpower environment. Data sharing across regions or cloud environments is not supported.

Complete each of these tasks in the order given.

Connect Your Snowflake Account

  1. Log in to your Snowflake account.

  2. Go to Projects > Worksheets.

  3. Create an SQL worksheet if you haven't already created one.

  4. Run the SQL query, select current_account_locator();. Use ACCOUNTADMIN as the role. The result of this query is your Account Locator.

  5. Copy and save the Account Locator. You will need to enter it later in this task.

  6. In CXone Mpower, click the app selector and select Admin.

  7. Go to Account Settings > Data Share.

  8. Click Create Share.

  9. Enter the Account Locator associated with your Snowflake account.

  10. Click Save.

When your account is connected, a shared object displays on the Data Share page.

Access CXone Mpower Data

  1. Open your Snowflake web interface.
  2. Go to Data Products > Private Sharing. You should see a CXone Mpower share.

You should see all shares available in your account. The Database column shows the name of the database created from the share. You can view and query the objects in the shared CXone Mpower database just as you would any other database in your account.

If creating the share fails, you receive a failure notification in the top right corner of the screen . Contact your Account Representative for assistance.