-
Notifications
You must be signed in to change notification settings - Fork 214
Expand file tree
/
Copy pathconfig-utils.js
More file actions
27 lines (25 loc) · 853 Bytes
/
config-utils.js
File metadata and controls
27 lines (25 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
* Copyright (c) 2021, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import {getConfig} from '@salesforce/pwa-kit-runtime/utils/ssr-config'
export const getCommerceAgentConfig = () => {
const defaults = {
enabled: 'false',
askAgentOnSearch: 'false',
embeddedServiceName: '',
embeddedServiceEndpoint: '',
scriptSourceUrl: '',
scrt2Url: '',
salesforceOrgId: '',
commerceOrgId: '',
siteId: '',
enableConversationContext: 'false',
conversationContext: [],
enableAgentFromHeader: 'false',
enableAgentFromFloatingButton: 'false'
}
return getConfig().app.commerceAgent ?? defaults
}