---
schema_version: "1"
id: 955eda828f6d87c6cfcc5a998a8cd6f1838c76840dcab116a5903f7e2265079f
title: Create a Connected App for Near Real-Time Segmentation
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_data_cloud_near_real_time_create_connected_app.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_data_cloud_near_real_time_create_connected_app.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 429fa9980858a38d9e4bf03de1f4f26ab5be9ad8ea7023c0dcb405260ef0d3f9
description: After you install the B2C Commerce data kit, create a segment, and create a data graph, you create a connected app.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Create a Connected App for Near Real-Time Segmentation

After you install the B2C Commerce data kit, create a segment, and create a data graph, you create a connected app.

1. Login to your Salesforce org.
2. From **Setup**, in the Quick Find box, enter External Client App Manager.
3. Click **New External Client App**.
4. Specify an app name and contact email address.
5. Select **Enable OAuth**.
    
    When you select this setting, additional OAuth-related settings are displayed.
6. Enter callback URL as https://login.salesforce.com/services/oauth2/success.
7. Add the following OAuth scopes to the **Selected OAuth Scopes** list:
    
    - Manage Data 360 profile data (cdp\_profile\_api)
    - Manage user data via APIs (api)
    - Perform ANSI SQL queries on Data 360 data (cdp\_query\_api)
    - Perform requests at any time (refresh\_token, offline\_access)
    - Perform segmentation on Data 360 data (cdp\_segment\_api)
8. Select **Enable Client Credentials Flow**.
9. Select **Enable Device Flow**.
10. Select **Require Secret for Web Server Flow**.
11. Select **Require Secret for Refresh Token Flow**.
12. Deselect **Require Proof Key for Code Exchange (PKCE) Extension for Supported Authorization Flows**.
13. Click **Save**.
14. Navigate to **External Client App Manager** and click your app.
15. Click **Edit Policies**.
16. Under Client Credentials Flow, search for and select a user.
    
    You can select any user of the organization that has access to multi-factor authentication (MFA) - email or push notifications.
17. Under Refresh Token policy, choose **Refresh Token is valid until revoked**.
18. For IP Relaxation, select **Relax IP restrictions**.
19. Click **Save**.

#### See Also

- [Configure a Connected App for the OAuth 2.0 Client Credentials Flow](https://help.salesforce.com/s/articleView?id=xcloud.connected_app_client_credentials_setup.htm&type=5&language=en_US)
- [JDBC Driver: Connected App Setup](https://github.com/forcedotcom/Salesforce-CDP-jdbc/#connected-app-setup)
- [Near Real-Time Customer Segmentation with Data 360](https://help.salesforce.com/s/articleView?id=cc.b2c_data_cloud_near_real_time_container.htm&release=264.0.0&type=5 "B2C Commerce storefronts can now leverage customer segments created in Data 360 on a near real-time basis, eliminating the need for batch activation. With up-to-date customer segments, your storefronts can provide timely, personalized, and targeted shopper experiences.")