Digital Experience Cloud Client
Unofficial client for the Sitefinity Digital Experience Cloud.
For additional information, please see the Digital Experience Cloud documentation.
npm install dec-client
Then within your application, you can reference the client with the following:
var DECClient = ;
new DECClient(). Make sure to provide your data center API key, and a source label.
var client =apiKey: 'your-api-key'source: 'your-datasource-label';
Tracking Subject Metadata
Adding Subject Mapping
Sending Sentences to the Digital Experience Cloud
The client allows you to write multiple interactions [sentences] at a time. Once all interactions have been written, you must
flushData() to actually send them to the DEC.
// returns a promiseclient;
You can make a call to the DEC to retrieve information about the subject's Personas, Campaigns, and Lead Scores.
new DECClient(). Make sure to provide your data center API key, a source label, and an authToken.
var client =apiKey: 'your-api-key'source: 'your-datasource-label'authToken: 'appauth your-app-auth-key';
authToken is used by an authorized application to request data from the personalization end-points. You can construct the token by concatenating the "appauth " string with the Access Key of the authorized application, for example: "appauth 94e8b2d2-931e-cd01-b57b-07fa2013cb24".
An Authorized Application can be configured by navigating to the "Authorized applications" in the Administration section of your Data Center.