DiscoveryStory

Represents the metadata associated with a story used in Einstein Discovery.

A story defines the data and analytical settings that Einstein Discovery uses to generate insights and build predictive models. Story settings include the outcome variable, whether to maximize or minimize the outcome variable, the data to analyze in a CRM Analytics dataset, and other preferences. Story settings tell Einstein Discovery how to conduct the analysis and communicate its results. In Package Manager, this type is listed as “Discovery Story”.

Write operations for DiscoveryStory objects are generally not supported.

Note

Parent Type 

This type extends MetadataWithContent and inherits its fields.

File Suffix and Directory Location 

A DiscoveryStory is stored in the discovery folder. DiscoveryStory have two files:

  • file with .story suffix contains the story’s actual data
  • file named *ModelName*.story-meta.xml suffix contains the story’s metadata

Here is a sample package.xml file:

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <types>
4        <members>Subscriber_Changes</members>
5        <name>DiscoveryStory</name>
6    </types>
7    <version>55.0</version>
8</Package>

Version 

DiscoveryStorys are available in API version 54.0 and later.

Fields 

application 

  • Type: string
  • Required: Yes
  • Description: Required. The CRM Analytics app the story is associated with.

autopilot 

  • Type: DiscoveryStoryAutopilotStatus (enumeration of type string)
  • Required: No
  • Description: Optional. The autopilot status for the story. One of the following strings:
  • Possible values:
    • Enabled
    • Disabled

classificationThreshold 

  • Type: double
  • Required: No
  • Description: Optional. The threshold for classification predictions for the story.

label 

  • Type: string
  • Required: Yes
  • Description: Required. The story label. If you package a story, this label appears in Package Manager.

outcome 

sourceContainer 

  • Type: string
  • Required: Yes
  • Description: Required. The source ID for the story.

sourceType 

  • Type: DiscoveryStorySourceType (enumeration of type string)
  • Required: Yes
  • Description: Required. The source type of the story. One of the following strings:
  • Possible values:
    • AnalyticsDataset
    • LiveDataset
    • Report

validationContainer 

  • Type: string
  • Required: No
  • Description: Optional. The validation ID for the story.

DiscoveryStoryOutcome Type 

Represents the selected outcome of the generated story.

Fields 

failureValue 

  • Type: string
  • Required: No
  • Description: Optional. The value if the story failed.

field 

  • Type: string
  • Required: Yes
  • Description: Required. The field configuration for the story.

goal 

  • Type: DiscoveryStoryOutcomeGoal (enumeration of type string)
  • Required: Yes
  • Description: Required. The story outcome goal. One of the following strings:
  • Possible values:
    • Maximize
    • Minimize
    • None

label 

  • Type: string
  • Required: Yes
  • Description: Required. The story outcome label.

successValue 

  • Type: string
  • Required: No
  • Description: Optional. The value if the story succeeded.

type 

  • Type: DiscoveryStoryOutcomeType (enumeration of type string)
  • Required: Yes
  • Description: Required. The story outcome type. One of the following strings:
  • Possible values:
    • Categorical
    • Count
    • Number
    • Text

Declarative Metadata Sample Definitions 

Here is a sample DiscoveryStory:

1<?xml version="1.0" encoding="UTF-8"?>
2<DiscoverStory xmlns="http://soap.sforce.com/2006/04/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3    <application>MyStoryApp</application>
4    <autopilot>Enabled</autopilot>
5    <classificationThreshold>0.7383</classificationThreshold>
6    <label>SubscriberChanges</label>
7    <outcome>
8        <field>Subscriber</field>
9        <goal>Minimize</goal>
10        <label>SubscriberChangeOutcome</label>
11        <successValue>Success</successValue>
12        <type>Numerical</type>
13    </outcome>
14    <sourceContainer>01X00000000xxxx1AB</sourceContainer>
15    <sourceType>AnalyticsDataset</sourceType>
16</DiscoveryStory>

Wildcard Support in the Manifest File 

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.