Retrieve Command
The retrieve command extracts Asset 360 configurations from Asset 360 installed Salesforce orgs and saves them in the local file system as JSON files. The JSON files are stored in an organized folder structure, differentiating each configuration type.
Administrators can deploy the retrieved configurations to any Asset 360 installed Salesforce org. This helps migrate the Asset 360 configurations to one or more Salesforce orgs.
The following table provides the retrieve command information.
Command Options/Arguments
Description
Command:
$ sf svmx retrieve [-t <array>] [-p <string>] [-o <string>] [-d] [-c <string>] [--apiversion <string>] [--json]
[--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
-p
Used to specify the path where the root svmx folder is to be created to store the retrieved JSON files.
-t
Used to specify the Asset 360 configuration types to retrieve.
* 
Specify the configuration types in a comma-separated string.
The following configuration type names are supported. Ensure that you enter the names as-is.
Expression - To retrieve expressions
Transaction - To retrieve transactions
ScreenDesigner - To retrieve screens
Wizard - To retrieve wizards
EntitlementRule - To retrieve auto-entitlement rules.
ServiceAssignmentRule - To retrieve entitled service assignment rules
PricebookAssignmentRule - To retrieve pricebook assignment rules
AssetHierarchy - To retrieve asset hierarchy configurations
AssetTimeline - To retrieve asset timeline configurations
ProductServiceCampaign - To retrieve product service campaign configurations
Mapping - To retrieve mappings
Translation - To retrieve translations.
TechnicalAttribute - To retrieve asset technical attributes.
MobileConfig - To retrieve mobile configurations.
FlowSettings - To retrieve flow settings.
-o
Used to specify the org username or the alias of the org from which configurations are retrieved. This value overrides the default org.
-d
Used to specify that the dependent items must be retrieved.
-c
Used to specify the name of the JSON file that contains information as to which configurations must be retrieved.
The following is a sample JSON file:
{"expressions": [
{"developerName":"RO_Ent_rule_12021-10-20T09:58:41.485Z",
"configurationType":"Expression"
},
{
"name" :"A360 - Return Order - Not Closed Nor Canceled",
"developerName":"RORD_Not_Closed_Canceled_Expression",
"configurationType":"Expression"
}
],
"objectMappings": [
{
"name":"A360 - Work Order to Product Request Line Item (Loaner)",
"developerName" :"WORD_PRLI_Loaner_Mapping",
"configurationType":"Mapping"
}
],
"screenDesigners": [
{"name":"A360 - Manage Loaner Return Order with Line Items",
"developerName":"RORD_Manage_Loaner_Line_Items_Screen",
"configurationType":"ScreenDesigner"
}
],
"transactions": [ {"name":"A360 - Manage Work Order Review",
"developerName":"WORD_Manage_Review_Transaction",
"configurationType":"Transaction"
}
],
"wizards": [
],
: [
],
"pricebookAssignmentRules": [
],
"entitledServiceAssignmentRules": [
{"name": "RO_Ent rule 1",
"developerName":"RO_Ent_rule_1",
"configurationType":"EntitledServiceAssignmentRules"
}
],
"pscConfigurations": [
],
"assetTimelines": [
],
"assetHierarchies": [
],
"translations": [
],
"technicalAttributes": [
]
}
--apiversion
Used to specify the Salesforce API version. This overrides the API version used for API requests made by this command.
--json
Used to specify that the output format is JSON.
--loglevel
Used to specify the logging level. The available options are (trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL).
The default logging level is WARN.
The following table lists the available retrieve commands.
Command
Description
Examples
svmx retrieve
Used to retrieve all the available configurations.
sf svmx retrieve -o user@salesforce.com
sf svmx retrieve -o user@salesforce.com -t Expression,Mapping,TechnicalAttribute
sf svmx retrieve -o user@salesforce.com -c configuration.json
svmx retrieve assethierarchy
Used to retrieve asset hierarchy configurations.
sf svmx retrieve assethierarchy -o user@salesforce.com
svmx retrieve ssettimeline
Used to retrieve asset hierarchy configurations.
sf svmx retrieve assettimeline -o user@salesforce.com
svmx retrieve entitlementrule
Used to retrieve auto-entitlement rules.
sf svmx retrieve entitlementrule -o user@salesforce.com
svmx retrieve esarule
Used to retrieve entitled service assignment rules.
sf svmx retrieve esarule -o user@salesforce.com
svmx retrieve expression
Used to retrieve expressions.
sf svmx retrieve expression -o user@salesforce.com
svmx retrieve mapping
Used to retrieve mappings.
sf svmx retrieve mapping -o user@salesforce.com -n <DEVELOPER_NAME,...>
svmx retrieve parule
Used to retrieve pricebook assignment rules.
sf svmx retrieve parule -o user@salesforce.com
svmx retrieve screen
Used to retrieve screen configurations.
sf svmx retrieve screen -o user@salesforce.com
svmx retrieve transaction
Used to retrieve transactions.
sf svmx retrieve transaction -o user@salesforce.com
svmx retrieve wizard
Used to retrieve wizards.
sf svmx retrieve wizard -o user@salesforce.com
svmx retrieve psc
Used to retrieve PSC configurations.
sf svmx retrieve psc -o user@salesforce.com
svmx retrieve translation
Used to retrieve translations.
sf svmx retrieve translation -o user@salesforce.com
svmx retrieve techattr
Used to retrieve asset technical attributes.
sf svmx retrieve techattr -o user@salesforce.com
svmx retrieve mobileconfig
Used to retrieve mobile configrations.
sf svmx retrieve mobileconfig -o user@salesforce.com
svmx retrieve flowsettings
Used to retrieve flow settings.
sf svmx retrieve flowsettings -o user@salesforce.com
The retrieved configurations are saved as JSON files in the specified path. An example of the folder structure of a JSON bundle is displayed in the following image.
A JSON file that contains an entitlement rule configuration is displayed in the following example.
{
"objectAPIName": "Case",
"name": "Case Entitlement - A360",
"matchAccount": true,
"includeRootAsset": true,
"includeParentAsset": false,
"developerName": "CASE_Entitlement",
"coveredBy": "Asset",
"assetAPIName": "AssetId",
"accountAPIName": "AccountId",
"sequence": 1,
"resolutionMethod": "USE-WARRANTY",
"matchContact": false,
"isActive": true,
"expression": {
"type": "Standard Expression",
"objectAPIName": "Case",
"name": "CASE_Entitlement",
"expressionType": "EVER-RULE-CRITERIA",
"expressionDetailList": [
{
"sequence": 1,
"operator": "ne",
"operandType": "Value",
"operand": "Closed",
"fieldType": "PICKLIST",
"fieldAPIName": "Status"
}
],
"developerName": "CASE_Entitlement",
"description": "Case entitlement expression",
"criteria": "Status <> 'Closed'",
"advancedExpression": "1"
},
"description": "Default entitlement rule for Case",
"checkWarranties": true,
"checkContracts": true}
Was this helpful?