AffinityScoreDefinition
Parent Type
File Suffix and Directory Location
AffinityScoreDefinition components have the suffix .affinityScoreDefinition and are stored in the affinityScoreDefinitions folder.
Version
AffinityScoreDefinition components are available in API version 63.0 and later.
Special Access Rules
This metadata type is available only if the Fundraising Access license is enabled for the org and the Fundraising admin permission is assigned to users.
Fields
Field Name | Description |
---|---|
affinityScoreDefinitionDesc |
|
affinityScoreDefinitionName |
|
affinityScoreType |
|
masterLabel |
|
numberOfMonths |
|
numberOfRanges |
|
scoreRangeList |
|
sourceFieldApiNameList |
|
sourceObjectApiNameList |
|
targetFieldApiNameList |
|
targetObjectApiName |
|
Declarative Metadata Sample Definition
This example shows a sample of an AffinityScoreDefinition component.
<?xml version="1.0" encoding="UTF-8"?>
<AffinityScoreDefinition
xmlns="http://soap.sforce.com/2006/04/metadata">
<affinityScoreDefinitionDesc>RFM Affinity Score</affinityScoreDefinitionDesc>
<affinityScoreDefinitionName>AffinityScoreDefinition_RFM</affinityScoreDefinitionName>
<affinityScoreType>RFM</affinityScoreType>
<masterLabel>MasterLabel</masterLabel>
<numberOfMonths>12</numberOfMonths>
<numberOfRanges>3</numberOfRanges>
<scoreRangeList>
[
{
"name": "R Ranges",
"direction": "ascending",
"ranges": [30,90,180]
},
{
"name": "F Ranges",
"direction": "descending",
"ranges": [10,15,100]
},
{
"name": "M Ranges",
"direction": "descending",
"ranges": [500,1000,5000]
}
]
</scoreRangeList>
<sourceFieldApiNameList>
[
{
"name": "R Source",
"values":
[
{
"fieldName": "DonorGiftSummary.DaysSinceLastGift",
"fieldWeight": 1
}
]
},
{
"name": "F Source",
"values":
[
{
"fieldName": "DonorGiftSummary.GiftCount",
"fieldWeight": 1
}
]
},
{
"name": "M Source",
"values":
[
{
"fieldName": "DonorGiftSummary.TotalGiftsCount",
"fieldWeight": 1
}
]
}
]
</sourceFieldApiNameList>
<targetFieldApiNameList>
[
{
"name": "R Target",
"values":
[
{
"fieldName": "DonorGiftSummary.RecencyScore",
"fieldWeight": 1
}
]
},
{
"name": "F Target",
"values":
[
{
"fieldName": "DonorGiftSummary.FrequencyScore",
"fieldWeight": 1
}
]
},
{
"name": "M Target",
"values":
[
{
"fieldName": "DonorGiftSummary.MonetaryScore",
"fieldWeight": 1
}
]
}
]
</targetFieldApiNameList>
</AffinityScoreDefinition>
This example shows a sample of the package.xml file that references the previous definition.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>*</members>
<name>AffinityScoreDefinition</name>
</types>
<version>63.0</version>
</Package>
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.