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 svmx: retrieve command information.
Command Options/Arguments
Description
Command:
$ sfdx svmx:retrieve [-t <array>] [-p <string>] [-u <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.
-u
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.
sfdx svmx:retrieve -u user@salesforce.com
sfdx svmx:retrieve -u user@salesforce.com -t Expression,Mapping,TechnicalAttribute
sfdx svmx:retrieve -u user@salesforce.com -c configuration.json
svmx:retrieve:assethierarchy
Used to retrieve asset hierarchy configurations.
sfdx svmx:retrieve:assethierarchy -u user@salesforce.com
svmx:retrieve:assettimeline
Used to retrieve asset hierarchy configurations.
sfdx svmx:retrieve:assettimeline -u user@salesforce.com
svmx:retrieve:entitlementrule
Used to retrieve auto-entitlement rules.
sfdx svmx:retrieve:entitlementrule -u user@salesforce.com
svmx:retrieve:esarule
Used to retrieve entitled service assignment rules.
sfdx svmx:retrieve:esarule -u user@salesforce.com
svmx:retrieve:expression
Used to retrieve expressions.
sfdx svmx:retrieve:expression -u user@salesforce.com
svmx:retrieve:mapping
Used to retrieve mappings.
sfdx svmx:retrieve:mapping -u user@salesforce.com -n <DEVELOPER_NAME,...>
svmx:retrieve:parule
Used to retrieve pricebook assignment rules.
sfdx svmx:retrieve:parule -u user@salesforce.com
svmx:retrieve:screen
Used to retrieve screen configurations.
sfdx svmx:retrieve:screen -u user@salesforce.com
svmx:retrieve:transaction
Used to retrieve transactions.
sfdx svmx:retrieve:transaction -u user@salesforce.com
svmx:retrieve:wizard
Used to retrieve wizards.
sfdx svmx:retrieve:wizard -u user@salesforce.com
svmx:retrieve:psc
Used to retrieve PSC configurations.
sfdx svmx:retrieve:psc -u user@salesforce.com
svmx:retrieve:translation
Used to retrieve translations.
sfdx svmx:retrieve:translation -u user@salesforce.com
svmx:retrieve:techattr
Used to retrieve asset technical attributes.
sfdx svmx:retrieve:techattr -u user@salesforce.com
An example of the retrieve command run and the output is displayed in the following image.
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?