@salesforce/plugin-data 4.0.9 → 4.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +25 -25
  2. package/oclif.manifest.json +753 -753
  3. package/package.json +5 -5
@@ -775,14 +775,18 @@
775
775
  "record:create:data"
776
776
  ]
777
777
  },
778
- "data:export:bulk": {
779
- "aliases": [],
778
+ "data:get:record": {
779
+ "aliases": [
780
+ "force:data:record:get"
781
+ ],
780
782
  "args": {},
781
- "description": "You can use this command to export millions of records from an org, either to migrate data or to back it up.\n\nUse a SOQL query to specify the fields of a standard or custom object that you want to export. Specify the SOQL query either at the command line with the --query flag or read it from a file with the --query-file flag; you can't specify both flags. The --output-file flag is required, which means you can only write the records to a file, in either CSV or JSON format. \n\nBulk exports can take a while, depending on how many records are returned by the SOQL query. If the command times out, or you specified the --async flag, the command displays the job ID. To see the status and get the results of the job, run \"sf data export resume\" and pass the job ID to the --job-id flag.\n\nIMPORTANT: This command uses Bulk API 2.0, which limits the type of SOQL queries you can run. For example, you can't use aggregate functions such as count(). For the complete list of limitations, see the \"SOQL Considerations\" section in the \"Bulk API 2.0 and Bulk API Developer Guide\" (https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/queries.htm).",
783
+ "deprecateAliases": true,
784
+ "description": "Specify the record you want to retrieve with either its ID or with a list of field-value pairs that identify the record. If your list of fields identifies more than one record, the command fails; the error displays how many records were found.\n\nWhen specifying field-value pairs, use the format <fieldName>=<value>. Enclose all field-value pairs in one set of double quotation marks, delimited by spaces. Enclose values that contain spaces in single quotes.\n\nThe command displays all the record's fields and their values, one field per terminal line. Fields with no values are displayed as \"null\".\n\nThis command retrieves a record from Salesforce objects by default. Use the --use-tooling-api flag to retrieve from a Tooling API object.",
782
785
  "examples": [
783
- "Export the Id, Name, and Account.Name fields of the Contact object into a CSV-formatted file; if the export doesn't complete in 10 minutes, the command ends and displays a job ID. Use the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --query \"SELECT Id, Name, Account.Name FROM Contact\" --output-file export-accounts.csv --wait 10 --target-org my-scratch",
784
- "Similar to previous example, but use the default org, export the records into a JSON-formatted file, and include records that have been soft deleted:\n<%= config.bin %> <%= command.id %> --query \"SELECT Id, Name, Account.Name FROM Contact\" --output-file export-accounts.json --result-format json --wait 10 --all-rows",
785
- "Export asynchronously; the command immediately returns a job ID that you then pass to the \"sf data export resume\" command:\n<%= config.bin %> <%= command.id %> --query \"SELECT Id, Name, Account.Name FROM Contact\" --output-file export-accounts.json --result-format json --async"
786
+ "Retrieve and display a record from Account with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 00180XX",
787
+ "Retrieve a record from Account whose name equals \"Acme\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name=Acme\"",
788
+ "Retrieve a record from Account identified with two field values, one that contains a space; the command uses the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name='Universal Containers' Phone='(123) 456-7890'\" --target-org myscratch",
789
+ "Retrieve a record from the Tooling API object TraceFlag with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --use-tooling-api --sobject TraceFlag --record-id 7tf8c"
786
790
  ],
787
791
  "flags": {
788
792
  "json": {
@@ -801,7 +805,12 @@
801
805
  "type": "option"
802
806
  },
803
807
  "target-org": {
808
+ "aliases": [
809
+ "targetusername",
810
+ "u"
811
+ ],
804
812
  "char": "o",
813
+ "deprecateAliases": true,
805
814
  "name": "target-org",
806
815
  "noCacheDefault": true,
807
816
  "required": true,
@@ -811,163 +820,141 @@
811
820
  "type": "option"
812
821
  },
813
822
  "api-version": {
823
+ "aliases": [
824
+ "apiversion"
825
+ ],
826
+ "deprecateAliases": true,
814
827
  "description": "Override the api version used for api requests made by this command",
815
828
  "name": "api-version",
816
829
  "hasDynamicHelp": false,
817
830
  "multiple": false,
818
831
  "type": "option"
819
832
  },
820
- "wait": {
821
- "char": "w",
822
- "exclusive": [
823
- "async"
824
- ],
825
- "name": "wait",
826
- "summary": "Time to wait for the command to finish, in minutes.",
827
- "hasDynamicHelp": true,
828
- "helpValue": "<minutes>",
829
- "multiple": false,
830
- "type": "option"
831
- },
832
- "async": {
833
- "exclusive": [
834
- "wait"
835
- ],
836
- "name": "async",
837
- "summary": "Don't wait for the job to complete.",
838
- "allowNo": false,
839
- "type": "boolean"
840
- },
841
- "query": {
842
- "char": "q",
843
- "exclusive": [
844
- "query-file"
845
- ],
846
- "name": "query",
847
- "summary": "SOQL query to execute.",
833
+ "loglevel": {
834
+ "deprecated": {
835
+ "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
836
+ },
837
+ "hidden": true,
838
+ "name": "loglevel",
848
839
  "hasDynamicHelp": false,
849
840
  "multiple": false,
850
841
  "type": "option"
851
842
  },
852
- "query-file": {
853
- "exclusive": [
854
- "query"
843
+ "sobject": {
844
+ "aliases": [
845
+ "sobjecttype"
855
846
  ],
856
- "name": "query-file",
857
- "summary": "File that contains the SOQL query.",
858
- "hasDynamicHelp": false,
859
- "multiple": false,
860
- "type": "option"
861
- },
862
- "all-rows": {
863
- "name": "all-rows",
864
- "summary": "Include records that have been soft-deleted due to a merge or delete. By default, deleted records are not returned.",
865
- "allowNo": false,
866
- "type": "boolean"
867
- },
868
- "output-file": {
869
- "name": "output-file",
847
+ "char": "s",
848
+ "deprecateAliases": true,
849
+ "name": "sobject",
870
850
  "required": true,
871
- "summary": "File where records are written.",
851
+ "summary": "API name of the Salesforce or Tooling API object that you're retrieving a record from.",
872
852
  "hasDynamicHelp": false,
873
853
  "multiple": false,
874
854
  "type": "option"
875
855
  },
876
- "result-format": {
877
- "char": "r",
878
- "name": "result-format",
879
- "required": true,
880
- "summary": "Format to write the results.",
881
- "default": "csv",
856
+ "record-id": {
857
+ "aliases": [
858
+ "sobjectid"
859
+ ],
860
+ "char": "i",
861
+ "deprecateAliases": true,
862
+ "name": "record-id",
863
+ "summary": "ID of the record you’re retrieving.",
882
864
  "hasDynamicHelp": false,
883
865
  "multiple": false,
884
- "options": [
885
- "csv",
886
- "json"
887
- ],
888
866
  "type": "option"
889
867
  },
890
- "column-delimiter": {
891
- "name": "column-delimiter",
892
- "relationships": [
893
- {
894
- "type": "some",
895
- "flags": [
896
- {
897
- "name": "result-format"
898
- }
899
- ]
900
- }
901
- ],
902
- "summary": "Column delimiter to be used when writing CSV output. Default is COMMA.",
868
+ "where": {
869
+ "char": "w",
870
+ "name": "where",
871
+ "summary": "List of <fieldName>=<value> pairs that identify the record you want to display.",
903
872
  "hasDynamicHelp": false,
904
873
  "multiple": false,
905
- "options": [
906
- "BACKQUOTE",
907
- "CARET",
908
- "COMMA",
909
- "PIPE",
910
- "SEMICOLON",
911
- "TAB"
912
- ],
913
874
  "type": "option"
914
875
  },
915
- "line-ending": {
916
- "name": "line-ending",
917
- "relationships": [
918
- {
919
- "type": "some",
920
- "flags": [
921
- {
922
- "name": "result-format"
923
- }
924
- ]
925
- }
926
- ],
927
- "summary": "Line ending to be used when writing CSV output. Default value on Windows is is `CRLF`; on macOS and Linux it's `LR`.",
928
- "hasDynamicHelp": false,
929
- "multiple": false,
930
- "options": [
931
- "LF",
932
- "CRLF"
876
+ "use-tooling-api": {
877
+ "aliases": [
878
+ "usetoolingapi"
933
879
  ],
934
- "type": "option"
880
+ "char": "t",
881
+ "deprecateAliases": true,
882
+ "name": "use-tooling-api",
883
+ "summary": "Use Tooling API so you can retrieve a record from a Tooling API object.",
884
+ "allowNo": false,
885
+ "type": "boolean"
886
+ },
887
+ "perflog": {
888
+ "deprecated": {
889
+ "version": "57"
890
+ },
891
+ "description": "Gets data on API performance metrics from the server. The data is stored in $HOME/.sfdx/apiPerformanceLog.json.",
892
+ "hidden": true,
893
+ "name": "perflog",
894
+ "summary": "Get API performance data.",
895
+ "allowNo": false,
896
+ "type": "boolean"
935
897
  }
936
898
  },
937
899
  "hasDynamicHelp": true,
938
900
  "hiddenAliases": [],
939
- "id": "data:export:bulk",
901
+ "id": "data:get:record",
940
902
  "pluginAlias": "@salesforce/plugin-data",
941
903
  "pluginName": "@salesforce/plugin-data",
942
904
  "pluginType": "core",
943
905
  "strict": true,
944
- "summary": "Bulk export records from an org into a file using a SOQL query. Uses Bulk API 2.0.",
906
+ "summary": "Retrieve and display a single record of a Salesforce or Tooling API object.",
945
907
  "enableJsonFlag": true,
946
908
  "isESM": true,
947
909
  "relativePath": [
948
910
  "lib",
949
911
  "commands",
950
912
  "data",
951
- "export",
952
- "bulk.js"
913
+ "get",
914
+ "record.js"
915
+ ],
916
+ "aliasPermutations": [
917
+ "force:data:record:get",
918
+ "data:force:record:get",
919
+ "data:record:force:get",
920
+ "data:record:get:force",
921
+ "force:record:data:get",
922
+ "record:force:data:get",
923
+ "record:data:force:get",
924
+ "record:data:get:force",
925
+ "force:record:get:data",
926
+ "record:force:get:data",
927
+ "record:get:force:data",
928
+ "record:get:data:force",
929
+ "force:data:get:record",
930
+ "data:force:get:record",
931
+ "data:get:force:record",
932
+ "data:get:record:force",
933
+ "force:get:data:record",
934
+ "get:force:data:record",
935
+ "get:data:force:record",
936
+ "get:data:record:force",
937
+ "force:get:record:data",
938
+ "get:force:record:data",
939
+ "get:record:force:data",
940
+ "get:record:data:force"
953
941
  ],
954
- "aliasPermutations": [],
955
942
  "permutations": [
956
- "data:export:bulk",
957
- "export:data:bulk",
958
- "export:bulk:data",
959
- "data:bulk:export",
960
- "bulk:data:export",
961
- "bulk:export:data"
943
+ "data:get:record",
944
+ "get:data:record",
945
+ "get:record:data",
946
+ "data:record:get",
947
+ "record:data:get",
948
+ "record:get:data"
962
949
  ]
963
950
  },
964
- "data:export:resume": {
951
+ "data:import:bulk": {
965
952
  "aliases": [],
966
953
  "args": {},
967
- "description": "When the original \"data export bulk\" command either times out or is run with the --async flag, it displays a job ID. To see the status and get the results of the bulk export, run this command by either passing it the job ID or using the --use-most-recent flag to specify the most recent bulk export job.",
954
+ "description": "You can use this command to import millions of records into the object from a file in comma-separated values (CSV) format.\n\nAll the records in the CSV file must be for the same Salesforce object. Specify the object with the `--sobject` flag.\n\nBulk imports can take a while, depending on how many records are in the CSV file. If the command times out, or you specified the --async flag, the command displays the job ID. To see the status and get the results of the job, run \"sf data import resume\" and pass the job ID to the --job-id flag.\n\nFor information and examples about how to prepare your CSV files, see \"Prepare Data to Ingest\" in the \"Bulk API 2.0 and Bulk API Developer Guide\" (https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_prepare_data.htm).",
968
955
  "examples": [
969
- "Resume a bulk export job run on your default org by specifying a job ID:\nsf <%= command.id %> --job-id 750xx000000005sAAA",
970
- "Resume the most recently-run bulk export job for an org with alias my-scratch:\nsf data export resume --use-most-recent --target-org my-scratch"
956
+ "Import Account records from a CSV-formatted file into an org with alias \"my-scratch\"; if the import doesn't complete in 10 minutes, the command ends and displays a job ID:\n<%= config.bin %> <%= command.id %> --file accounts.csv --sobject Account --wait 10 --target-org my-scratch",
957
+ "Import asynchronously and use the default org; the command immediately returns a job ID that you then pass to the \"sf data import resume\" command:\n<%= config.bin %> <%= command.id %> --file accounts.csv --sobject Account --async"
971
958
  ],
972
959
  "flags": {
973
960
  "json": {
@@ -985,19 +972,33 @@
985
972
  "multiple": false,
986
973
  "type": "option"
987
974
  },
988
- "job-id": {
989
- "char": "i",
990
- "name": "job-id",
991
- "summary": "Job ID of the bulk export.",
975
+ "async": {
976
+ "char": "a",
977
+ "exclusive": [
978
+ "wait"
979
+ ],
980
+ "name": "async",
981
+ "summary": "Don't wait for the command to complete.",
982
+ "allowNo": false,
983
+ "type": "boolean"
984
+ },
985
+ "file": {
986
+ "char": "f",
987
+ "name": "file",
988
+ "required": true,
989
+ "summary": "CSV file that contains the Salesforce object records you want to import.",
992
990
  "hasDynamicHelp": false,
993
991
  "multiple": false,
994
992
  "type": "option"
995
993
  },
996
- "use-most-recent": {
997
- "name": "use-most-recent",
998
- "summary": "Use the job ID of the bulk export job that was most recently run.",
999
- "allowNo": false,
1000
- "type": "boolean"
994
+ "sobject": {
995
+ "char": "s",
996
+ "name": "sobject",
997
+ "required": true,
998
+ "summary": "API name of the Salesforce object, either standard or custom, into which you're importing records.",
999
+ "hasDynamicHelp": false,
1000
+ "multiple": false,
1001
+ "type": "option"
1001
1002
  },
1002
1003
  "api-version": {
1003
1004
  "description": "Override the api version used for api requests made by this command",
@@ -1005,46 +1006,92 @@
1005
1006
  "hasDynamicHelp": false,
1006
1007
  "multiple": false,
1007
1008
  "type": "option"
1008
- }
1009
- },
1010
- "hasDynamicHelp": false,
1009
+ },
1010
+ "wait": {
1011
+ "char": "w",
1012
+ "exclusive": [
1013
+ "async"
1014
+ ],
1015
+ "name": "wait",
1016
+ "summary": "Time to wait for the command to finish, in minutes.",
1017
+ "hasDynamicHelp": true,
1018
+ "multiple": false,
1019
+ "type": "option"
1020
+ },
1021
+ "target-org": {
1022
+ "char": "o",
1023
+ "name": "target-org",
1024
+ "noCacheDefault": true,
1025
+ "required": true,
1026
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1027
+ "hasDynamicHelp": true,
1028
+ "multiple": false,
1029
+ "type": "option"
1030
+ },
1031
+ "line-ending": {
1032
+ "dependsOn": [
1033
+ "file"
1034
+ ],
1035
+ "name": "line-ending",
1036
+ "summary": "Line ending used in the CSV file. Default value on Windows is `CRLF`; on macOS and Linux it's `LF`.",
1037
+ "hasDynamicHelp": false,
1038
+ "multiple": false,
1039
+ "options": [
1040
+ "CRLF",
1041
+ "LF"
1042
+ ],
1043
+ "type": "option"
1044
+ },
1045
+ "column-delimiter": {
1046
+ "name": "column-delimiter",
1047
+ "summary": "Column delimiter used in the CSV file.",
1048
+ "hasDynamicHelp": false,
1049
+ "multiple": false,
1050
+ "options": [
1051
+ "BACKQUOTE",
1052
+ "CARET",
1053
+ "COMMA",
1054
+ "PIPE",
1055
+ "SEMICOLON",
1056
+ "TAB"
1057
+ ],
1058
+ "type": "option"
1059
+ }
1060
+ },
1061
+ "hasDynamicHelp": true,
1011
1062
  "hiddenAliases": [],
1012
- "id": "data:export:resume",
1063
+ "id": "data:import:bulk",
1013
1064
  "pluginAlias": "@salesforce/plugin-data",
1014
1065
  "pluginName": "@salesforce/plugin-data",
1015
1066
  "pluginType": "core",
1016
1067
  "strict": true,
1017
- "summary": "Resume a bulk export job that you previously started. Uses Bulk API 2.0.",
1068
+ "summary": "Bulk import records into a Salesforce object from a CSV file. Uses Bulk API 2.0.",
1018
1069
  "enableJsonFlag": true,
1019
1070
  "isESM": true,
1020
1071
  "relativePath": [
1021
1072
  "lib",
1022
1073
  "commands",
1023
1074
  "data",
1024
- "export",
1025
- "resume.js"
1075
+ "import",
1076
+ "bulk.js"
1026
1077
  ],
1027
1078
  "aliasPermutations": [],
1028
1079
  "permutations": [
1029
- "data:export:resume",
1030
- "export:data:resume",
1031
- "export:resume:data",
1032
- "data:resume:export",
1033
- "resume:data:export",
1034
- "resume:export:data"
1080
+ "data:import:bulk",
1081
+ "import:data:bulk",
1082
+ "import:bulk:data",
1083
+ "data:bulk:import",
1084
+ "bulk:data:import",
1085
+ "bulk:import:data"
1035
1086
  ]
1036
1087
  },
1037
- "data:export:tree": {
1038
- "aliases": [
1039
- "force:data:tree:export"
1040
- ],
1088
+ "data:import:resume": {
1089
+ "aliases": [],
1041
1090
  "args": {},
1042
- "deprecateAliases": true,
1043
- "description": "Specify a SOQL query, either directly at the command line or read from a file, to retrieve the data you want to export. The exported data is written to JSON files in sObject tree format, which is a collection of nested, parent-child records with a single root record. Use these JSON files to import data into an org with the \"<%= config.bin %> data import tree\" command.\n\nIf your SOQL query references multiple objects, the command generates a single JSON file by default. You can specify the --plan flag to generate separate JSON files for each object and a plan definition file that aggregates them. You then specify just this plan definition file when you import the data into an org.\n\nThe SOQL query can return a maximum of 2,000 records. For more information, see the REST API Developer Guide. (https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_sobject_tree.htm).",
1091
+ "description": "When the original \"sf data import bulk\" command either times out or is run with the --async flag, it displays a job ID. To see the status and get the results of the bulk import, run this command by either passing it the job ID or using the --use-most-recent flag to specify the most recent bulk import job.",
1044
1092
  "examples": [
1045
- "Export records retrieved with the specified SOQL query into a single JSON file in the current directory; the command uses your default org:\n<%= config.bin %> <%= command.id %> --query \"SELECT Id, Name, (SELECT Name, Address__c FROM Properties__r) FROM Broker__c\"",
1046
- "Export data using a SOQL query in the \"query.txt\" file and generate JSON files for each object and a plan that aggregates them:\n<%= config.bin %> <%= command.id %> --query query.txt --plan",
1047
- "Prepend \"export-demo\" before each generated file and generate the files in the \"export-out\" directory; run the command on the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --query query.txt --plan --prefix export-demo --output-dir export-out --target-org my-scratch"
1093
+ "Resume a bulk import job to your default org using an ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
1094
+ "Resume the most recently run bulk import job for an org with alias my-scratch:\n<%= config.bin %> <%= command.id %> --use-most-recent --target-org my-scratch"
1048
1095
  ],
1049
1096
  "flags": {
1050
1097
  "json": {
@@ -1062,143 +1109,67 @@
1062
1109
  "multiple": false,
1063
1110
  "type": "option"
1064
1111
  },
1065
- "target-org": {
1066
- "aliases": [
1067
- "targetusername",
1068
- "u"
1069
- ],
1070
- "char": "o",
1071
- "deprecateAliases": true,
1072
- "name": "target-org",
1073
- "noCacheDefault": true,
1074
- "required": true,
1075
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1076
- "hasDynamicHelp": true,
1077
- "multiple": false,
1078
- "type": "option"
1079
- },
1080
- "api-version": {
1081
- "aliases": [
1082
- "apiversion"
1083
- ],
1084
- "deprecateAliases": true,
1085
- "description": "Override the api version used for api requests made by this command",
1086
- "name": "api-version",
1087
- "hasDynamicHelp": false,
1088
- "multiple": false,
1089
- "type": "option"
1090
- },
1091
- "loglevel": {
1092
- "deprecated": {
1093
- "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
1094
- },
1095
- "hidden": true,
1096
- "name": "loglevel",
1097
- "hasDynamicHelp": false,
1098
- "multiple": false,
1099
- "type": "option"
1100
- },
1101
- "query": {
1102
- "char": "q",
1103
- "name": "query",
1104
- "required": true,
1105
- "summary": "SOQL query, or filepath of a file that contains the query, to retrieve records.",
1106
- "hasDynamicHelp": false,
1107
- "multiple": true,
1108
- "type": "option"
1109
- },
1110
- "plan": {
1111
- "char": "p",
1112
- "name": "plan",
1113
- "summary": "Generate multiple sObject tree files and a plan definition file for aggregated import.",
1112
+ "use-most-recent": {
1113
+ "name": "use-most-recent",
1114
+ "summary": "Use the job ID of the bulk import job that was most recently run.",
1114
1115
  "allowNo": false,
1115
1116
  "type": "boolean"
1116
1117
  },
1117
- "prefix": {
1118
- "char": "x",
1119
- "name": "prefix",
1120
- "summary": "Prefix of generated files.",
1118
+ "job-id": {
1119
+ "char": "i",
1120
+ "name": "job-id",
1121
+ "summary": "Job ID of the bulk import.",
1121
1122
  "hasDynamicHelp": false,
1122
1123
  "multiple": false,
1123
1124
  "type": "option"
1124
1125
  },
1125
- "output-dir": {
1126
- "aliases": [
1127
- "outputdir"
1128
- ],
1129
- "char": "d",
1130
- "deprecateAliases": true,
1131
- "name": "output-dir",
1132
- "summary": "Directory in which to generate the JSON files; default is current directory.",
1133
- "hasDynamicHelp": false,
1126
+ "wait": {
1127
+ "char": "w",
1128
+ "name": "wait",
1129
+ "summary": "Time to wait for the command to finish, in minutes.",
1130
+ "default": "5 minutes",
1131
+ "hasDynamicHelp": true,
1134
1132
  "multiple": false,
1135
1133
  "type": "option"
1136
1134
  }
1137
1135
  },
1138
1136
  "hasDynamicHelp": true,
1139
1137
  "hiddenAliases": [],
1140
- "id": "data:export:tree",
1138
+ "id": "data:import:resume",
1141
1139
  "pluginAlias": "@salesforce/plugin-data",
1142
1140
  "pluginName": "@salesforce/plugin-data",
1143
1141
  "pluginType": "core",
1144
1142
  "strict": true,
1145
- "summary": "Export data from an org into one or more JSON files.",
1143
+ "summary": "Resume a bulk import job that you previously started. Uses Bulk API 2.0.",
1146
1144
  "enableJsonFlag": true,
1147
1145
  "isESM": true,
1148
1146
  "relativePath": [
1149
1147
  "lib",
1150
1148
  "commands",
1151
1149
  "data",
1152
- "export",
1153
- "tree.js"
1154
- ],
1155
- "aliasPermutations": [
1156
- "force:data:tree:export",
1157
- "data:force:tree:export",
1158
- "data:tree:force:export",
1159
- "data:tree:export:force",
1160
- "force:tree:data:export",
1161
- "tree:force:data:export",
1162
- "tree:data:force:export",
1163
- "tree:data:export:force",
1164
- "force:tree:export:data",
1165
- "tree:force:export:data",
1166
- "tree:export:force:data",
1167
- "tree:export:data:force",
1168
- "force:data:export:tree",
1169
- "data:force:export:tree",
1170
- "data:export:force:tree",
1171
- "data:export:tree:force",
1172
- "force:export:data:tree",
1173
- "export:force:data:tree",
1174
- "export:data:force:tree",
1175
- "export:data:tree:force",
1176
- "force:export:tree:data",
1177
- "export:force:tree:data",
1178
- "export:tree:force:data",
1179
- "export:tree:data:force"
1150
+ "import",
1151
+ "resume.js"
1180
1152
  ],
1153
+ "aliasPermutations": [],
1181
1154
  "permutations": [
1182
- "data:export:tree",
1183
- "export:data:tree",
1184
- "export:tree:data",
1185
- "data:tree:export",
1186
- "tree:data:export",
1187
- "tree:export:data"
1155
+ "data:import:resume",
1156
+ "import:data:resume",
1157
+ "import:resume:data",
1158
+ "data:resume:import",
1159
+ "resume:data:import",
1160
+ "resume:import:data"
1188
1161
  ]
1189
1162
  },
1190
- "data:get:record": {
1163
+ "data:import:tree": {
1191
1164
  "aliases": [
1192
- "force:data:record:get"
1165
+ "force:data:tree:import"
1193
1166
  ],
1194
1167
  "args": {},
1195
1168
  "deprecateAliases": true,
1196
- "description": "Specify the record you want to retrieve with either its ID or with a list of field-value pairs that identify the record. If your list of fields identifies more than one record, the command fails; the error displays how many records were found.\n\nWhen specifying field-value pairs, use the format <fieldName>=<value>. Enclose all field-value pairs in one set of double quotation marks, delimited by spaces. Enclose values that contain spaces in single quotes.\n\nThe command displays all the record's fields and their values, one field per terminal line. Fields with no values are displayed as \"null\".\n\nThis command retrieves a record from Salesforce objects by default. Use the --use-tooling-api flag to retrieve from a Tooling API object.",
1169
+ "description": "The JSON files that contain the data are in sObject tree format, which is a collection of nested, parent-child records with a single root record. Use the \"<%= config.bin %> data export tree\" command to generate these JSON files.\n\nIf you used the --plan flag when exporting the data to generate a plan definition file, use the --plan flag to reference the file when you import. If you're not using a plan, use the --files flag to list the files. If you specify multiple JSON files that depend on each other in a parent-child relationship, be sure you list them in the correct order.",
1197
1170
  "examples": [
1198
- "Retrieve and display a record from Account with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 00180XX",
1199
- "Retrieve a record from Account whose name equals \"Acme\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name=Acme\"",
1200
- "Retrieve a record from Account identified with two field values, one that contains a space; the command uses the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name='Universal Containers' Phone='(123) 456-7890'\" --target-org myscratch",
1201
- "Retrieve a record from the Tooling API object TraceFlag with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --use-tooling-api --sobject TraceFlag --record-id 7tf8c"
1171
+ "Import the records contained in two JSON files into the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --files Contact.json,Account.json --target-org my-scratch",
1172
+ "Import records using a plan definition file into your default org:\n<%= config.bin %> <%= command.id %> --plan Account-Contact-plan.json"
1202
1173
  ],
1203
1174
  "flags": {
1204
1175
  "json": {
@@ -1252,121 +1223,89 @@
1252
1223
  "multiple": false,
1253
1224
  "type": "option"
1254
1225
  },
1255
- "sobject": {
1256
- "aliases": [
1257
- "sobjecttype"
1258
- ],
1259
- "char": "s",
1260
- "deprecateAliases": true,
1261
- "name": "sobject",
1262
- "required": true,
1263
- "summary": "API name of the Salesforce or Tooling API object that you're retrieving a record from.",
1264
- "hasDynamicHelp": false,
1265
- "multiple": false,
1266
- "type": "option"
1267
- },
1268
- "record-id": {
1226
+ "files": {
1269
1227
  "aliases": [
1270
- "sobjectid"
1228
+ "sobjecttreefiles"
1271
1229
  ],
1272
- "char": "i",
1230
+ "char": "f",
1273
1231
  "deprecateAliases": true,
1274
- "name": "record-id",
1275
- "summary": "ID of the record you’re retrieving.",
1232
+ "name": "files",
1233
+ "summary": "Comma-separated and in-order JSON files that contain the records, in sObject tree format, that you want to insert.",
1234
+ "delimiter": ",",
1276
1235
  "hasDynamicHelp": false,
1277
- "multiple": false,
1236
+ "multiple": true,
1278
1237
  "type": "option"
1279
1238
  },
1280
- "where": {
1281
- "char": "w",
1282
- "name": "where",
1283
- "summary": "List of <fieldName>=<value> pairs that identify the record you want to display.",
1239
+ "plan": {
1240
+ "char": "p",
1241
+ "description": "Unlike when you use the `--files` flag, the files listed in the plan definition file **can** contain more then 200 records. When the CLI executes the import, it automatically batches the records to comply with the 200 record limit set by the API.\n\nThe order in which you list the files in the plan definition file matters. Specifically, records with lookups to records in another file should be listed AFTER that file. For example, let's say you're loading Account and Contact records, and the contacts have references to those accounts. Be sure you list the Accounts file before the Contacts file.\n\nThe plan definition file has the following schema:\n\n- items(object) - SObject Type: Definition of records to be insert per SObject Type\n - sobject(string) - Name of SObject: Child file references must have SObject roots of this type\n - files(array) - Files: An array of files paths to load",
1242
+ "name": "plan",
1243
+ "summary": "Plan definition file to insert multiple data files.",
1284
1244
  "hasDynamicHelp": false,
1285
1245
  "multiple": false,
1286
1246
  "type": "option"
1287
- },
1288
- "use-tooling-api": {
1289
- "aliases": [
1290
- "usetoolingapi"
1291
- ],
1292
- "char": "t",
1293
- "deprecateAliases": true,
1294
- "name": "use-tooling-api",
1295
- "summary": "Use Tooling API so you can retrieve a record from a Tooling API object.",
1296
- "allowNo": false,
1297
- "type": "boolean"
1298
- },
1299
- "perflog": {
1300
- "deprecated": {
1301
- "version": "57"
1302
- },
1303
- "description": "Gets data on API performance metrics from the server. The data is stored in $HOME/.sfdx/apiPerformanceLog.json.",
1304
- "hidden": true,
1305
- "name": "perflog",
1306
- "summary": "Get API performance data.",
1307
- "allowNo": false,
1308
- "type": "boolean"
1309
1247
  }
1310
1248
  },
1311
1249
  "hasDynamicHelp": true,
1312
1250
  "hiddenAliases": [],
1313
- "id": "data:get:record",
1251
+ "id": "data:import:tree",
1314
1252
  "pluginAlias": "@salesforce/plugin-data",
1315
1253
  "pluginName": "@salesforce/plugin-data",
1316
1254
  "pluginType": "core",
1317
1255
  "strict": true,
1318
- "summary": "Retrieve and display a single record of a Salesforce or Tooling API object.",
1256
+ "summary": "Import data from one or more JSON files into an org.",
1319
1257
  "enableJsonFlag": true,
1320
1258
  "isESM": true,
1321
1259
  "relativePath": [
1322
1260
  "lib",
1323
1261
  "commands",
1324
1262
  "data",
1325
- "get",
1326
- "record.js"
1263
+ "import",
1264
+ "tree.js"
1327
1265
  ],
1328
1266
  "aliasPermutations": [
1329
- "force:data:record:get",
1330
- "data:force:record:get",
1331
- "data:record:force:get",
1332
- "data:record:get:force",
1333
- "force:record:data:get",
1334
- "record:force:data:get",
1335
- "record:data:force:get",
1336
- "record:data:get:force",
1337
- "force:record:get:data",
1338
- "record:force:get:data",
1339
- "record:get:force:data",
1340
- "record:get:data:force",
1341
- "force:data:get:record",
1342
- "data:force:get:record",
1343
- "data:get:force:record",
1344
- "data:get:record:force",
1345
- "force:get:data:record",
1346
- "get:force:data:record",
1347
- "get:data:force:record",
1348
- "get:data:record:force",
1349
- "force:get:record:data",
1350
- "get:force:record:data",
1351
- "get:record:force:data",
1352
- "get:record:data:force"
1267
+ "force:data:tree:import",
1268
+ "data:force:tree:import",
1269
+ "data:tree:force:import",
1270
+ "data:tree:import:force",
1271
+ "force:tree:data:import",
1272
+ "tree:force:data:import",
1273
+ "tree:data:force:import",
1274
+ "tree:data:import:force",
1275
+ "force:tree:import:data",
1276
+ "tree:force:import:data",
1277
+ "tree:import:force:data",
1278
+ "tree:import:data:force",
1279
+ "force:data:import:tree",
1280
+ "data:force:import:tree",
1281
+ "data:import:force:tree",
1282
+ "data:import:tree:force",
1283
+ "force:import:data:tree",
1284
+ "import:force:data:tree",
1285
+ "import:data:force:tree",
1286
+ "import:data:tree:force",
1287
+ "force:import:tree:data",
1288
+ "import:force:tree:data",
1289
+ "import:tree:force:data",
1290
+ "import:tree:data:force"
1353
1291
  ],
1354
1292
  "permutations": [
1355
- "data:get:record",
1356
- "get:data:record",
1357
- "get:record:data",
1358
- "data:record:get",
1359
- "record:data:get",
1360
- "record:get:data"
1293
+ "data:import:tree",
1294
+ "import:data:tree",
1295
+ "import:tree:data",
1296
+ "data:tree:import",
1297
+ "tree:data:import",
1298
+ "tree:import:data"
1361
1299
  ]
1362
1300
  },
1363
- "data:delete:bulk": {
1301
+ "data:export:bulk": {
1364
1302
  "aliases": [],
1365
1303
  "args": {},
1366
- "description": "The CSV file must have only one column (\"Id\") and then the list of record IDs you want to delete, one ID per line.\n\nWhen you execute this command, it starts a job, displays the ID, and then immediately returns control of the terminal to you by default. If you prefer to wait, set the --wait flag to the number of minutes; if it times out, the command outputs the IDs. Use the job ID to check the status of the job with the \"<%= config.bin %> data delete resume\" command.",
1304
+ "description": "You can use this command to export millions of records from an org, either to migrate data or to back it up.\n\nUse a SOQL query to specify the fields of a standard or custom object that you want to export. Specify the SOQL query either at the command line with the --query flag or read it from a file with the --query-file flag; you can't specify both flags. The --output-file flag is required, which means you can only write the records to a file, in either CSV or JSON format. \n\nBulk exports can take a while, depending on how many records are returned by the SOQL query. If the command times out, or you specified the --async flag, the command displays the job ID. To see the status and get the results of the job, run \"sf data export resume\" and pass the job ID to the --job-id flag.\n\nIMPORTANT: This command uses Bulk API 2.0, which limits the type of SOQL queries you can run. For example, you can't use aggregate functions such as count(). For the complete list of limitations, see the \"SOQL Considerations\" section in the \"Bulk API 2.0 and Bulk API Developer Guide\" (https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/queries.htm).",
1367
1305
  "examples": [
1368
- "Bulk delete Account records from your default org using the list of IDs in the \"files/delete.csv\" file:\n<%= config.bin %> <%= command.id %> --sobject Account --file files/delete.csv",
1369
- "Bulk delete records from a custom object in an org with alias my-scratch and wait 5 minutes for the command to complete:\n<%= config.bin %> <%= command.id %> --sobject MyObject__c --file files/delete.csv --wait 5 --target-org my-scratch"
1306
+ "Export the Id, Name, and Account.Name fields of the Contact object into a CSV-formatted file; if the export doesn't complete in 10 minutes, the command ends and displays a job ID. Use the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --query \"SELECT Id, Name, Account.Name FROM Contact\" --output-file export-accounts.csv --wait 10 --target-org my-scratch",
1307
+ "Similar to previous example, but use the default org, export the records into a JSON-formatted file, and include records that have been soft deleted:\n<%= config.bin %> <%= command.id %> --query \"SELECT Id, Name, Account.Name FROM Contact\" --output-file export-accounts.json --result-format json --wait 10 --all-rows",
1308
+ "Export asynchronously; the command immediately returns a job ID that you then pass to the \"sf data export resume\" command:\n<%= config.bin %> <%= command.id %> --query \"SELECT Id, Name, Account.Name FROM Contact\" --output-file export-accounts.json --result-format json --async"
1370
1309
  ],
1371
1310
  "flags": {
1372
1311
  "json": {
@@ -1385,12 +1324,7 @@
1385
1324
  "type": "option"
1386
1325
  },
1387
1326
  "target-org": {
1388
- "aliases": [
1389
- "targetusername",
1390
- "u"
1391
- ],
1392
1327
  "char": "o",
1393
- "deprecateAliases": true,
1394
1328
  "name": "target-org",
1395
1329
  "noCacheDefault": true,
1396
1330
  "required": true,
@@ -1400,144 +1334,163 @@
1400
1334
  "type": "option"
1401
1335
  },
1402
1336
  "api-version": {
1403
- "aliases": [
1404
- "apiversion"
1405
- ],
1406
- "deprecateAliases": true,
1407
1337
  "description": "Override the api version used for api requests made by this command",
1408
1338
  "name": "api-version",
1409
1339
  "hasDynamicHelp": false,
1410
1340
  "multiple": false,
1411
1341
  "type": "option"
1412
1342
  },
1413
- "loglevel": {
1414
- "deprecated": {
1415
- "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
1416
- },
1417
- "hidden": true,
1418
- "name": "loglevel",
1419
- "hasDynamicHelp": false,
1420
- "multiple": false,
1421
- "type": "option"
1422
- },
1423
- "file": {
1424
- "aliases": [
1425
- "csvfile"
1426
- ],
1427
- "char": "f",
1428
- "deprecateAliases": true,
1429
- "name": "file",
1430
- "required": true,
1431
- "summary": "CSV file that contains the IDs of the records to update or delete.",
1432
- "hasDynamicHelp": false,
1433
- "multiple": false,
1434
- "type": "option"
1435
- },
1436
- "sobject": {
1437
- "aliases": [
1438
- "sobjecttype"
1439
- ],
1440
- "char": "s",
1441
- "deprecateAliases": true,
1442
- "name": "sobject",
1443
- "required": true,
1444
- "summary": "API name of the Salesforce object, either standard or custom, that you want to update or delete records from.",
1445
- "hasDynamicHelp": false,
1446
- "multiple": false,
1447
- "type": "option"
1448
- },
1449
1343
  "wait": {
1450
1344
  "char": "w",
1451
1345
  "exclusive": [
1452
1346
  "async"
1453
1347
  ],
1454
1348
  "name": "wait",
1455
- "summary": "Number of minutes to wait for the command to complete before displaying the results.",
1456
- "default": "0 minutes",
1349
+ "summary": "Time to wait for the command to finish, in minutes.",
1457
1350
  "hasDynamicHelp": true,
1351
+ "helpValue": "<minutes>",
1458
1352
  "multiple": false,
1459
1353
  "type": "option"
1460
1354
  },
1461
1355
  "async": {
1462
- "char": "a",
1463
1356
  "exclusive": [
1464
1357
  "wait"
1465
1358
  ],
1466
1359
  "name": "async",
1467
- "summary": "Run the command asynchronously.",
1360
+ "summary": "Don't wait for the job to complete.",
1468
1361
  "allowNo": false,
1469
1362
  "type": "boolean"
1470
1363
  },
1471
- "verbose": {
1472
- "deprecated": {
1473
- "message": "The --verbose flag is deprecated and will be removed after March 2025, use \"sf data bulk results\" to get job results instead."
1474
- },
1475
- "name": "verbose",
1476
- "summary": "Print verbose output of failed records if result is available.",
1364
+ "query": {
1365
+ "char": "q",
1366
+ "exclusive": [
1367
+ "query-file"
1368
+ ],
1369
+ "name": "query",
1370
+ "summary": "SOQL query to execute.",
1371
+ "hasDynamicHelp": false,
1372
+ "multiple": false,
1373
+ "type": "option"
1374
+ },
1375
+ "query-file": {
1376
+ "exclusive": [
1377
+ "query"
1378
+ ],
1379
+ "name": "query-file",
1380
+ "summary": "File that contains the SOQL query.",
1381
+ "hasDynamicHelp": false,
1382
+ "multiple": false,
1383
+ "type": "option"
1384
+ },
1385
+ "all-rows": {
1386
+ "name": "all-rows",
1387
+ "summary": "Include records that have been soft-deleted due to a merge or delete. By default, deleted records are not returned.",
1477
1388
  "allowNo": false,
1478
1389
  "type": "boolean"
1479
1390
  },
1480
- "line-ending": {
1481
- "dependsOn": [
1482
- "file"
1391
+ "output-file": {
1392
+ "name": "output-file",
1393
+ "required": true,
1394
+ "summary": "File where records are written.",
1395
+ "hasDynamicHelp": false,
1396
+ "multiple": false,
1397
+ "type": "option"
1398
+ },
1399
+ "result-format": {
1400
+ "char": "r",
1401
+ "name": "result-format",
1402
+ "required": true,
1403
+ "summary": "Format to write the results.",
1404
+ "default": "csv",
1405
+ "hasDynamicHelp": false,
1406
+ "multiple": false,
1407
+ "options": [
1408
+ "csv",
1409
+ "json"
1483
1410
  ],
1484
- "name": "line-ending",
1485
- "summary": "Line ending used in the CSV file. Default value on Windows is `CRLF`; on macOS and Linux it's `LF`.",
1411
+ "type": "option"
1412
+ },
1413
+ "column-delimiter": {
1414
+ "name": "column-delimiter",
1415
+ "relationships": [
1416
+ {
1417
+ "type": "some",
1418
+ "flags": [
1419
+ {
1420
+ "name": "result-format"
1421
+ }
1422
+ ]
1423
+ }
1424
+ ],
1425
+ "summary": "Column delimiter to be used when writing CSV output. Default is COMMA.",
1486
1426
  "hasDynamicHelp": false,
1487
1427
  "multiple": false,
1488
1428
  "options": [
1489
- "CRLF",
1490
- "LF"
1429
+ "BACKQUOTE",
1430
+ "CARET",
1431
+ "COMMA",
1432
+ "PIPE",
1433
+ "SEMICOLON",
1434
+ "TAB"
1491
1435
  ],
1492
1436
  "type": "option"
1493
1437
  },
1494
- "hard-delete": {
1495
- "description": "You must have the \"Bulk API Hard Delete\" system permission to use this flag. The permission is disabled by default and can be enabled only by a system administrator.",
1496
- "name": "hard-delete",
1497
- "summary": "Mark the records as immediately eligible for deletion by your org. If you don't specify this flag, the deleted records go into the Recycle Bin.",
1498
- "allowNo": false,
1499
- "type": "boolean"
1438
+ "line-ending": {
1439
+ "name": "line-ending",
1440
+ "relationships": [
1441
+ {
1442
+ "type": "some",
1443
+ "flags": [
1444
+ {
1445
+ "name": "result-format"
1446
+ }
1447
+ ]
1448
+ }
1449
+ ],
1450
+ "summary": "Line ending to be used when writing CSV output. Default value on Windows is is `CRLF`; on macOS and Linux it's `LR`.",
1451
+ "hasDynamicHelp": false,
1452
+ "multiple": false,
1453
+ "options": [
1454
+ "LF",
1455
+ "CRLF"
1456
+ ],
1457
+ "type": "option"
1500
1458
  }
1501
1459
  },
1502
1460
  "hasDynamicHelp": true,
1503
1461
  "hiddenAliases": [],
1504
- "id": "data:delete:bulk",
1462
+ "id": "data:export:bulk",
1505
1463
  "pluginAlias": "@salesforce/plugin-data",
1506
1464
  "pluginName": "@salesforce/plugin-data",
1507
1465
  "pluginType": "core",
1508
1466
  "strict": true,
1509
- "summary": "Bulk delete records from an org using a CSV file. Uses Bulk API 2.0.",
1467
+ "summary": "Bulk export records from an org into a file using a SOQL query. Uses Bulk API 2.0.",
1510
1468
  "enableJsonFlag": true,
1511
1469
  "isESM": true,
1512
1470
  "relativePath": [
1513
1471
  "lib",
1514
1472
  "commands",
1515
1473
  "data",
1516
- "delete",
1474
+ "export",
1517
1475
  "bulk.js"
1518
1476
  ],
1519
1477
  "aliasPermutations": [],
1520
1478
  "permutations": [
1521
- "data:delete:bulk",
1522
- "delete:data:bulk",
1523
- "delete:bulk:data",
1524
- "data:bulk:delete",
1525
- "bulk:data:delete",
1526
- "bulk:delete:data"
1479
+ "data:export:bulk",
1480
+ "export:data:bulk",
1481
+ "export:bulk:data",
1482
+ "data:bulk:export",
1483
+ "bulk:data:export",
1484
+ "bulk:export:data"
1527
1485
  ]
1528
1486
  },
1529
- "data:delete:record": {
1530
- "aliases": [
1531
- "force:data:record:delete"
1532
- ],
1487
+ "data:export:resume": {
1488
+ "aliases": [],
1533
1489
  "args": {},
1534
- "deprecateAliases": true,
1535
- "description": "Specify the record you want to delete with either its ID or with a list of field-value pairs that identify the record. If your list of fields identifies more than one record, the delete fails; the error displays how many records were found.\n\nWhen specifying field-value pairs, use the format <fieldName>=<value>. Enclose all field-value pairs in one set of double quotation marks, delimited by spaces. Enclose values that contain spaces in single quotes.\n\nThis command deletes a record from Salesforce objects by default. Use the --use-tooling-api flag to delete from a Tooling API object.",
1490
+ "description": "When the original \"data export bulk\" command either times out or is run with the --async flag, it displays a job ID. To see the status and get the results of the bulk export, run this command by either passing it the job ID or using the --use-most-recent flag to specify the most recent bulk export job.",
1536
1491
  "examples": [
1537
- "Delete a record from Account with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 00180XX",
1538
- "Delete a record from Account whose name equals \"Acme\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name=Acme\"",
1539
- "Delete a record from Account identified with two field values, one that contains a space; the command uses the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name='Universal Containers' Phone='(123) 456-7890'\" --target-org myscratch",
1540
- "Delete a record from the Tooling API object TraceFlag with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --use-tooling-api --sobject TraceFlag --record-id 7tf8c"
1492
+ "Resume a bulk export job run on your default org by specifying a job ID:\nsf <%= command.id %> --job-id 750xx000000005sAAA",
1493
+ "Resume the most recently-run bulk export job for an org with alias my-scratch:\nsf data export resume --use-most-recent --target-org my-scratch"
1541
1494
  ],
1542
1495
  "flags": {
1543
1496
  "json": {
@@ -1555,158 +1508,66 @@
1555
1508
  "multiple": false,
1556
1509
  "type": "option"
1557
1510
  },
1558
- "target-org": {
1559
- "aliases": [
1560
- "targetusername",
1561
- "u"
1562
- ],
1563
- "char": "o",
1564
- "deprecateAliases": true,
1565
- "name": "target-org",
1566
- "noCacheDefault": true,
1567
- "required": true,
1568
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1569
- "hasDynamicHelp": true,
1511
+ "job-id": {
1512
+ "char": "i",
1513
+ "name": "job-id",
1514
+ "summary": "Job ID of the bulk export.",
1515
+ "hasDynamicHelp": false,
1570
1516
  "multiple": false,
1571
1517
  "type": "option"
1572
1518
  },
1519
+ "use-most-recent": {
1520
+ "name": "use-most-recent",
1521
+ "summary": "Use the job ID of the bulk export job that was most recently run.",
1522
+ "allowNo": false,
1523
+ "type": "boolean"
1524
+ },
1573
1525
  "api-version": {
1574
- "aliases": [
1575
- "apiversion"
1576
- ],
1577
- "deprecateAliases": true,
1578
1526
  "description": "Override the api version used for api requests made by this command",
1579
1527
  "name": "api-version",
1580
1528
  "hasDynamicHelp": false,
1581
1529
  "multiple": false,
1582
1530
  "type": "option"
1583
- },
1584
- "loglevel": {
1585
- "deprecated": {
1586
- "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
1587
- },
1588
- "hidden": true,
1589
- "name": "loglevel",
1590
- "hasDynamicHelp": false,
1591
- "multiple": false,
1592
- "type": "option"
1593
- },
1594
- "sobject": {
1595
- "aliases": [
1596
- "sobjecttype"
1597
- ],
1598
- "char": "s",
1599
- "deprecateAliases": true,
1600
- "name": "sobject",
1601
- "required": true,
1602
- "summary": "API name of the Salesforce or Tooling API object that you're deleting a record from.",
1603
- "hasDynamicHelp": false,
1604
- "multiple": false,
1605
- "type": "option"
1606
- },
1607
- "record-id": {
1608
- "aliases": [
1609
- "sobjectid"
1610
- ],
1611
- "char": "i",
1612
- "deprecateAliases": true,
1613
- "name": "record-id",
1614
- "summary": "ID of the record you’re deleting.",
1615
- "hasDynamicHelp": false,
1616
- "multiple": false,
1617
- "type": "option"
1618
- },
1619
- "where": {
1620
- "char": "w",
1621
- "name": "where",
1622
- "summary": "List of <fieldName>=<value> pairs that identify the record you want to delete.",
1623
- "hasDynamicHelp": false,
1624
- "multiple": false,
1625
- "type": "option"
1626
- },
1627
- "use-tooling-api": {
1628
- "aliases": [
1629
- "usetoolingapi"
1630
- ],
1631
- "char": "t",
1632
- "deprecateAliases": true,
1633
- "name": "use-tooling-api",
1634
- "summary": "Use Tooling API so you can delete a record from a Tooling API object.",
1635
- "allowNo": false,
1636
- "type": "boolean"
1637
- },
1638
- "perflog": {
1639
- "deprecated": {
1640
- "version": "57"
1641
- },
1642
- "description": "Gets data on API performance metrics from the server. The data is stored in $HOME/.sfdx/apiPerformanceLog.json.",
1643
- "hidden": true,
1644
- "name": "perflog",
1645
- "summary": "Get API performance data.",
1646
- "allowNo": false,
1647
- "type": "boolean"
1648
1531
  }
1649
1532
  },
1650
- "hasDynamicHelp": true,
1533
+ "hasDynamicHelp": false,
1651
1534
  "hiddenAliases": [],
1652
- "id": "data:delete:record",
1535
+ "id": "data:export:resume",
1653
1536
  "pluginAlias": "@salesforce/plugin-data",
1654
1537
  "pluginName": "@salesforce/plugin-data",
1655
1538
  "pluginType": "core",
1656
1539
  "strict": true,
1657
- "summary": "Deletes a single record from a Salesforce or Tooling API object.",
1540
+ "summary": "Resume a bulk export job that you previously started. Uses Bulk API 2.0.",
1658
1541
  "enableJsonFlag": true,
1659
1542
  "isESM": true,
1660
1543
  "relativePath": [
1661
1544
  "lib",
1662
1545
  "commands",
1663
1546
  "data",
1664
- "delete",
1665
- "record.js"
1666
- ],
1667
- "aliasPermutations": [
1668
- "force:data:record:delete",
1669
- "data:force:record:delete",
1670
- "data:record:force:delete",
1671
- "data:record:delete:force",
1672
- "force:record:data:delete",
1673
- "record:force:data:delete",
1674
- "record:data:force:delete",
1675
- "record:data:delete:force",
1676
- "force:record:delete:data",
1677
- "record:force:delete:data",
1678
- "record:delete:force:data",
1679
- "record:delete:data:force",
1680
- "force:data:delete:record",
1681
- "data:force:delete:record",
1682
- "data:delete:force:record",
1683
- "data:delete:record:force",
1684
- "force:delete:data:record",
1685
- "delete:force:data:record",
1686
- "delete:data:force:record",
1687
- "delete:data:record:force",
1688
- "force:delete:record:data",
1689
- "delete:force:record:data",
1690
- "delete:record:force:data",
1691
- "delete:record:data:force"
1547
+ "export",
1548
+ "resume.js"
1692
1549
  ],
1550
+ "aliasPermutations": [],
1693
1551
  "permutations": [
1694
- "data:delete:record",
1695
- "delete:data:record",
1696
- "delete:record:data",
1697
- "data:record:delete",
1698
- "record:data:delete",
1699
- "record:delete:data"
1552
+ "data:export:resume",
1553
+ "export:data:resume",
1554
+ "export:resume:data",
1555
+ "data:resume:export",
1556
+ "resume:data:export",
1557
+ "resume:export:data"
1700
1558
  ]
1701
1559
  },
1702
- "data:delete:resume": {
1703
- "aliases": [],
1560
+ "data:export:tree": {
1561
+ "aliases": [
1562
+ "force:data:tree:export"
1563
+ ],
1704
1564
  "args": {},
1705
1565
  "deprecateAliases": true,
1706
- "description": "The command uses the job ID returned by the \"<%= config.bin %> data delete bulk\" command or the most recently-run bulk delete job.",
1566
+ "description": "Specify a SOQL query, either directly at the command line or read from a file, to retrieve the data you want to export. The exported data is written to JSON files in sObject tree format, which is a collection of nested, parent-child records with a single root record. Use these JSON files to import data into an org with the \"<%= config.bin %> data import tree\" command.\n\nIf your SOQL query references multiple objects, the command generates a single JSON file by default. You can specify the --plan flag to generate separate JSON files for each object and a plan definition file that aggregates them. You then specify just this plan definition file when you import the data into an org.\n\nThe SOQL query can return a maximum of 2,000 records. For more information, see the REST API Developer Guide. (https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_sobject_tree.htm).",
1707
1567
  "examples": [
1708
- "Resume a bulk delete job from your default org using an ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
1709
- "Resume the most recently run bulk delete job for an org with alias my-scratch:\n<%= config.bin %> <%= command.id %> --use-most-recent --target-org my-scratch"
1568
+ "Export records retrieved with the specified SOQL query into a single JSON file in the current directory; the command uses your default org:\n<%= config.bin %> <%= command.id %> --query \"SELECT Id, Name, (SELECT Name, Address__c FROM Properties__r) FROM Broker__c\"",
1569
+ "Export data using a SOQL query in the \"query.txt\" file and generate JSON files for each object and a plan that aggregates them:\n<%= config.bin %> <%= command.id %> --query query.txt --plan",
1570
+ "Prepend \"export-demo\" before each generated file and generate the files in the \"export-out\" directory; run the command on the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --query query.txt --plan --prefix export-demo --output-dir export-out --target-org my-scratch"
1710
1571
  ],
1711
1572
  "flags": {
1712
1573
  "json": {
@@ -1719,55 +1580,31 @@
1719
1580
  "flags-dir": {
1720
1581
  "helpGroup": "GLOBAL",
1721
1582
  "name": "flags-dir",
1722
- "summary": "Import flag values from a directory.",
1723
- "hasDynamicHelp": false,
1724
- "multiple": false,
1725
- "type": "option"
1726
- },
1727
- "target-org": {
1728
- "aliases": [
1729
- "targetusername",
1730
- "u"
1731
- ],
1732
- "char": "o",
1733
- "deprecateAliases": true,
1734
- "name": "target-org",
1735
- "noCacheDefault": true,
1736
- "summary": "Username or alias of the target org. Not required if the \"target-org\" configuration variable is already set.",
1737
- "hasDynamicHelp": true,
1738
- "multiple": false,
1739
- "type": "option"
1740
- },
1741
- "job-id": {
1742
- "aliases": [
1743
- "jobid"
1744
- ],
1745
- "char": "i",
1746
- "deprecateAliases": true,
1747
- "name": "job-id",
1748
- "summary": "ID of the job you want to resume.",
1749
- "hasDynamicHelp": false,
1750
- "multiple": false,
1751
- "type": "option"
1752
- },
1753
- "use-most-recent": {
1754
- "exclusive": [
1755
- "job-id"
1756
- ],
1757
- "name": "use-most-recent",
1758
- "summary": "Use the ID of the most recently-run bulk job.",
1759
- "allowNo": false,
1760
- "type": "boolean"
1583
+ "summary": "Import flag values from a directory.",
1584
+ "hasDynamicHelp": false,
1585
+ "multiple": false,
1586
+ "type": "option"
1761
1587
  },
1762
- "wait": {
1763
- "name": "wait",
1764
- "summary": "Number of minutes to wait for the command to complete before displaying the results.",
1765
- "default": "5 minutes",
1588
+ "target-org": {
1589
+ "aliases": [
1590
+ "targetusername",
1591
+ "u"
1592
+ ],
1593
+ "char": "o",
1594
+ "deprecateAliases": true,
1595
+ "name": "target-org",
1596
+ "noCacheDefault": true,
1597
+ "required": true,
1598
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1766
1599
  "hasDynamicHelp": true,
1767
1600
  "multiple": false,
1768
1601
  "type": "option"
1769
1602
  },
1770
1603
  "api-version": {
1604
+ "aliases": [
1605
+ "apiversion"
1606
+ ],
1607
+ "deprecateAliases": true,
1771
1608
  "description": "Override the api version used for api requests made by this command",
1772
1609
  "name": "api-version",
1773
1610
  "hasDynamicHelp": false,
@@ -1783,42 +1620,103 @@
1783
1620
  "hasDynamicHelp": false,
1784
1621
  "multiple": false,
1785
1622
  "type": "option"
1623
+ },
1624
+ "query": {
1625
+ "char": "q",
1626
+ "name": "query",
1627
+ "required": true,
1628
+ "summary": "SOQL query, or filepath of a file that contains the query, to retrieve records.",
1629
+ "hasDynamicHelp": false,
1630
+ "multiple": true,
1631
+ "type": "option"
1632
+ },
1633
+ "plan": {
1634
+ "char": "p",
1635
+ "name": "plan",
1636
+ "summary": "Generate multiple sObject tree files and a plan definition file for aggregated import.",
1637
+ "allowNo": false,
1638
+ "type": "boolean"
1639
+ },
1640
+ "prefix": {
1641
+ "char": "x",
1642
+ "name": "prefix",
1643
+ "summary": "Prefix of generated files.",
1644
+ "hasDynamicHelp": false,
1645
+ "multiple": false,
1646
+ "type": "option"
1647
+ },
1648
+ "output-dir": {
1649
+ "aliases": [
1650
+ "outputdir"
1651
+ ],
1652
+ "char": "d",
1653
+ "deprecateAliases": true,
1654
+ "name": "output-dir",
1655
+ "summary": "Directory in which to generate the JSON files; default is current directory.",
1656
+ "hasDynamicHelp": false,
1657
+ "multiple": false,
1658
+ "type": "option"
1786
1659
  }
1787
1660
  },
1788
1661
  "hasDynamicHelp": true,
1789
1662
  "hiddenAliases": [],
1790
- "id": "data:delete:resume",
1663
+ "id": "data:export:tree",
1791
1664
  "pluginAlias": "@salesforce/plugin-data",
1792
1665
  "pluginName": "@salesforce/plugin-data",
1793
1666
  "pluginType": "core",
1794
1667
  "strict": true,
1795
- "summary": "Resume a bulk delete job that you previously started. Uses Bulk API 2.0.",
1668
+ "summary": "Export data from an org into one or more JSON files.",
1796
1669
  "enableJsonFlag": true,
1797
1670
  "isESM": true,
1798
1671
  "relativePath": [
1799
1672
  "lib",
1800
1673
  "commands",
1801
1674
  "data",
1802
- "delete",
1803
- "resume.js"
1675
+ "export",
1676
+ "tree.js"
1677
+ ],
1678
+ "aliasPermutations": [
1679
+ "force:data:tree:export",
1680
+ "data:force:tree:export",
1681
+ "data:tree:force:export",
1682
+ "data:tree:export:force",
1683
+ "force:tree:data:export",
1684
+ "tree:force:data:export",
1685
+ "tree:data:force:export",
1686
+ "tree:data:export:force",
1687
+ "force:tree:export:data",
1688
+ "tree:force:export:data",
1689
+ "tree:export:force:data",
1690
+ "tree:export:data:force",
1691
+ "force:data:export:tree",
1692
+ "data:force:export:tree",
1693
+ "data:export:force:tree",
1694
+ "data:export:tree:force",
1695
+ "force:export:data:tree",
1696
+ "export:force:data:tree",
1697
+ "export:data:force:tree",
1698
+ "export:data:tree:force",
1699
+ "force:export:tree:data",
1700
+ "export:force:tree:data",
1701
+ "export:tree:force:data",
1702
+ "export:tree:data:force"
1804
1703
  ],
1805
- "aliasPermutations": [],
1806
1704
  "permutations": [
1807
- "data:delete:resume",
1808
- "delete:data:resume",
1809
- "delete:resume:data",
1810
- "data:resume:delete",
1811
- "resume:data:delete",
1812
- "resume:delete:data"
1705
+ "data:export:tree",
1706
+ "export:data:tree",
1707
+ "export:tree:data",
1708
+ "data:tree:export",
1709
+ "tree:data:export",
1710
+ "tree:export:data"
1813
1711
  ]
1814
1712
  },
1815
- "data:import:bulk": {
1713
+ "data:delete:bulk": {
1816
1714
  "aliases": [],
1817
1715
  "args": {},
1818
- "description": "You can use this command to import millions of records into the object from a file in comma-separated values (CSV) format.\n\nAll the records in the CSV file must be for the same Salesforce object. Specify the object with the `--sobject` flag.\n\nBulk imports can take a while, depending on how many records are in the CSV file. If the command times out, or you specified the --async flag, the command displays the job ID. To see the status and get the results of the job, run \"sf data import resume\" and pass the job ID to the --job-id flag.\n\nFor information and examples about how to prepare your CSV files, see \"Prepare Data to Ingest\" in the \"Bulk API 2.0 and Bulk API Developer Guide\" (https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_prepare_data.htm).",
1716
+ "description": "The CSV file must have only one column (\"Id\") and then the list of record IDs you want to delete, one ID per line.\n\nWhen you execute this command, it starts a job, displays the ID, and then immediately returns control of the terminal to you by default. If you prefer to wait, set the --wait flag to the number of minutes; if it times out, the command outputs the IDs. Use the job ID to check the status of the job with the \"<%= config.bin %> data delete resume\" command.",
1819
1717
  "examples": [
1820
- "Import Account records from a CSV-formatted file into an org with alias \"my-scratch\"; if the import doesn't complete in 10 minutes, the command ends and displays a job ID:\n<%= config.bin %> <%= command.id %> --file accounts.csv --sobject Account --wait 10 --target-org my-scratch",
1821
- "Import asynchronously and use the default org; the command immediately returns a job ID that you then pass to the \"sf data import resume\" command:\n<%= config.bin %> <%= command.id %> --file accounts.csv --sobject Account --async"
1718
+ "Bulk delete Account records from your default org using the list of IDs in the \"files/delete.csv\" file:\n<%= config.bin %> <%= command.id %> --sobject Account --file files/delete.csv",
1719
+ "Bulk delete records from a custom object in an org with alias my-scratch and wait 5 minutes for the command to complete:\n<%= config.bin %> <%= command.id %> --sobject MyObject__c --file files/delete.csv --wait 5 --target-org my-scratch"
1822
1720
  ],
1823
1721
  "flags": {
1824
1722
  "json": {
@@ -1836,37 +1734,64 @@
1836
1734
  "multiple": false,
1837
1735
  "type": "option"
1838
1736
  },
1839
- "async": {
1840
- "char": "a",
1841
- "exclusive": [
1842
- "wait"
1737
+ "target-org": {
1738
+ "aliases": [
1739
+ "targetusername",
1740
+ "u"
1843
1741
  ],
1844
- "name": "async",
1845
- "summary": "Don't wait for the command to complete.",
1846
- "allowNo": false,
1847
- "type": "boolean"
1742
+ "char": "o",
1743
+ "deprecateAliases": true,
1744
+ "name": "target-org",
1745
+ "noCacheDefault": true,
1746
+ "required": true,
1747
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1748
+ "hasDynamicHelp": true,
1749
+ "multiple": false,
1750
+ "type": "option"
1751
+ },
1752
+ "api-version": {
1753
+ "aliases": [
1754
+ "apiversion"
1755
+ ],
1756
+ "deprecateAliases": true,
1757
+ "description": "Override the api version used for api requests made by this command",
1758
+ "name": "api-version",
1759
+ "hasDynamicHelp": false,
1760
+ "multiple": false,
1761
+ "type": "option"
1762
+ },
1763
+ "loglevel": {
1764
+ "deprecated": {
1765
+ "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
1766
+ },
1767
+ "hidden": true,
1768
+ "name": "loglevel",
1769
+ "hasDynamicHelp": false,
1770
+ "multiple": false,
1771
+ "type": "option"
1848
1772
  },
1849
1773
  "file": {
1774
+ "aliases": [
1775
+ "csvfile"
1776
+ ],
1850
1777
  "char": "f",
1778
+ "deprecateAliases": true,
1851
1779
  "name": "file",
1852
1780
  "required": true,
1853
- "summary": "CSV file that contains the Salesforce object records you want to import.",
1781
+ "summary": "CSV file that contains the IDs of the records to update or delete.",
1854
1782
  "hasDynamicHelp": false,
1855
1783
  "multiple": false,
1856
1784
  "type": "option"
1857
1785
  },
1858
1786
  "sobject": {
1787
+ "aliases": [
1788
+ "sobjecttype"
1789
+ ],
1859
1790
  "char": "s",
1791
+ "deprecateAliases": true,
1860
1792
  "name": "sobject",
1861
1793
  "required": true,
1862
- "summary": "API name of the Salesforce object, either standard or custom, into which you're importing records.",
1863
- "hasDynamicHelp": false,
1864
- "multiple": false,
1865
- "type": "option"
1866
- },
1867
- "api-version": {
1868
- "description": "Override the api version used for api requests made by this command",
1869
- "name": "api-version",
1794
+ "summary": "API name of the Salesforce object, either standard or custom, that you want to update or delete records from.",
1870
1795
  "hasDynamicHelp": false,
1871
1796
  "multiple": false,
1872
1797
  "type": "option"
@@ -1877,20 +1802,30 @@
1877
1802
  "async"
1878
1803
  ],
1879
1804
  "name": "wait",
1880
- "summary": "Time to wait for the command to finish, in minutes.",
1805
+ "summary": "Number of minutes to wait for the command to complete before displaying the results.",
1806
+ "default": "0 minutes",
1881
1807
  "hasDynamicHelp": true,
1882
1808
  "multiple": false,
1883
1809
  "type": "option"
1884
1810
  },
1885
- "target-org": {
1886
- "char": "o",
1887
- "name": "target-org",
1888
- "noCacheDefault": true,
1889
- "required": true,
1890
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1891
- "hasDynamicHelp": true,
1892
- "multiple": false,
1893
- "type": "option"
1811
+ "async": {
1812
+ "char": "a",
1813
+ "exclusive": [
1814
+ "wait"
1815
+ ],
1816
+ "name": "async",
1817
+ "summary": "Run the command asynchronously.",
1818
+ "allowNo": false,
1819
+ "type": "boolean"
1820
+ },
1821
+ "verbose": {
1822
+ "deprecated": {
1823
+ "message": "The --verbose flag is deprecated and will be removed after March 2025, use \"sf data bulk results\" to get job results instead."
1824
+ },
1825
+ "name": "verbose",
1826
+ "summary": "Print verbose output of failed records if result is available.",
1827
+ "allowNo": false,
1828
+ "type": "boolean"
1894
1829
  },
1895
1830
  "line-ending": {
1896
1831
  "dependsOn": [
@@ -1906,56 +1841,53 @@
1906
1841
  ],
1907
1842
  "type": "option"
1908
1843
  },
1909
- "column-delimiter": {
1910
- "name": "column-delimiter",
1911
- "summary": "Column delimiter used in the CSV file.",
1912
- "hasDynamicHelp": false,
1913
- "multiple": false,
1914
- "options": [
1915
- "BACKQUOTE",
1916
- "CARET",
1917
- "COMMA",
1918
- "PIPE",
1919
- "SEMICOLON",
1920
- "TAB"
1921
- ],
1922
- "type": "option"
1844
+ "hard-delete": {
1845
+ "description": "You must have the \"Bulk API Hard Delete\" system permission to use this flag. The permission is disabled by default and can be enabled only by a system administrator.",
1846
+ "name": "hard-delete",
1847
+ "summary": "Mark the records as immediately eligible for deletion by your org. If you don't specify this flag, the deleted records go into the Recycle Bin.",
1848
+ "allowNo": false,
1849
+ "type": "boolean"
1923
1850
  }
1924
1851
  },
1925
1852
  "hasDynamicHelp": true,
1926
1853
  "hiddenAliases": [],
1927
- "id": "data:import:bulk",
1854
+ "id": "data:delete:bulk",
1928
1855
  "pluginAlias": "@salesforce/plugin-data",
1929
1856
  "pluginName": "@salesforce/plugin-data",
1930
1857
  "pluginType": "core",
1931
1858
  "strict": true,
1932
- "summary": "Bulk import records into a Salesforce object from a CSV file. Uses Bulk API 2.0.",
1859
+ "summary": "Bulk delete records from an org using a CSV file. Uses Bulk API 2.0.",
1933
1860
  "enableJsonFlag": true,
1934
1861
  "isESM": true,
1935
1862
  "relativePath": [
1936
1863
  "lib",
1937
1864
  "commands",
1938
1865
  "data",
1939
- "import",
1866
+ "delete",
1940
1867
  "bulk.js"
1941
1868
  ],
1942
1869
  "aliasPermutations": [],
1943
1870
  "permutations": [
1944
- "data:import:bulk",
1945
- "import:data:bulk",
1946
- "import:bulk:data",
1947
- "data:bulk:import",
1948
- "bulk:data:import",
1949
- "bulk:import:data"
1871
+ "data:delete:bulk",
1872
+ "delete:data:bulk",
1873
+ "delete:bulk:data",
1874
+ "data:bulk:delete",
1875
+ "bulk:data:delete",
1876
+ "bulk:delete:data"
1950
1877
  ]
1951
1878
  },
1952
- "data:import:resume": {
1953
- "aliases": [],
1879
+ "data:delete:record": {
1880
+ "aliases": [
1881
+ "force:data:record:delete"
1882
+ ],
1954
1883
  "args": {},
1955
- "description": "When the original \"sf data import bulk\" command either times out or is run with the --async flag, it displays a job ID. To see the status and get the results of the bulk import, run this command by either passing it the job ID or using the --use-most-recent flag to specify the most recent bulk import job.",
1884
+ "deprecateAliases": true,
1885
+ "description": "Specify the record you want to delete with either its ID or with a list of field-value pairs that identify the record. If your list of fields identifies more than one record, the delete fails; the error displays how many records were found.\n\nWhen specifying field-value pairs, use the format <fieldName>=<value>. Enclose all field-value pairs in one set of double quotation marks, delimited by spaces. Enclose values that contain spaces in single quotes.\n\nThis command deletes a record from Salesforce objects by default. Use the --use-tooling-api flag to delete from a Tooling API object.",
1956
1886
  "examples": [
1957
- "Resume a bulk import job to your default org using an ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
1958
- "Resume the most recently run bulk import job for an org with alias my-scratch:\n<%= config.bin %> <%= command.id %> --use-most-recent --target-org my-scratch"
1887
+ "Delete a record from Account with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 00180XX",
1888
+ "Delete a record from Account whose name equals \"Acme\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name=Acme\"",
1889
+ "Delete a record from Account identified with two field values, one that contains a space; the command uses the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name='Universal Containers' Phone='(123) 456-7890'\" --target-org myscratch",
1890
+ "Delete a record from the Tooling API object TraceFlag with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --use-tooling-api --sobject TraceFlag --record-id 7tf8c"
1959
1891
  ],
1960
1892
  "flags": {
1961
1893
  "json": {
@@ -1973,67 +1905,158 @@
1973
1905
  "multiple": false,
1974
1906
  "type": "option"
1975
1907
  },
1976
- "use-most-recent": {
1977
- "name": "use-most-recent",
1978
- "summary": "Use the job ID of the bulk import job that was most recently run.",
1979
- "allowNo": false,
1980
- "type": "boolean"
1908
+ "target-org": {
1909
+ "aliases": [
1910
+ "targetusername",
1911
+ "u"
1912
+ ],
1913
+ "char": "o",
1914
+ "deprecateAliases": true,
1915
+ "name": "target-org",
1916
+ "noCacheDefault": true,
1917
+ "required": true,
1918
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1919
+ "hasDynamicHelp": true,
1920
+ "multiple": false,
1921
+ "type": "option"
1981
1922
  },
1982
- "job-id": {
1923
+ "api-version": {
1924
+ "aliases": [
1925
+ "apiversion"
1926
+ ],
1927
+ "deprecateAliases": true,
1928
+ "description": "Override the api version used for api requests made by this command",
1929
+ "name": "api-version",
1930
+ "hasDynamicHelp": false,
1931
+ "multiple": false,
1932
+ "type": "option"
1933
+ },
1934
+ "loglevel": {
1935
+ "deprecated": {
1936
+ "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
1937
+ },
1938
+ "hidden": true,
1939
+ "name": "loglevel",
1940
+ "hasDynamicHelp": false,
1941
+ "multiple": false,
1942
+ "type": "option"
1943
+ },
1944
+ "sobject": {
1945
+ "aliases": [
1946
+ "sobjecttype"
1947
+ ],
1948
+ "char": "s",
1949
+ "deprecateAliases": true,
1950
+ "name": "sobject",
1951
+ "required": true,
1952
+ "summary": "API name of the Salesforce or Tooling API object that you're deleting a record from.",
1953
+ "hasDynamicHelp": false,
1954
+ "multiple": false,
1955
+ "type": "option"
1956
+ },
1957
+ "record-id": {
1958
+ "aliases": [
1959
+ "sobjectid"
1960
+ ],
1983
1961
  "char": "i",
1984
- "name": "job-id",
1985
- "summary": "Job ID of the bulk import.",
1962
+ "deprecateAliases": true,
1963
+ "name": "record-id",
1964
+ "summary": "ID of the record you’re deleting.",
1986
1965
  "hasDynamicHelp": false,
1987
1966
  "multiple": false,
1988
1967
  "type": "option"
1989
1968
  },
1990
- "wait": {
1969
+ "where": {
1991
1970
  "char": "w",
1992
- "name": "wait",
1993
- "summary": "Time to wait for the command to finish, in minutes.",
1994
- "default": "5 minutes",
1995
- "hasDynamicHelp": true,
1971
+ "name": "where",
1972
+ "summary": "List of <fieldName>=<value> pairs that identify the record you want to delete.",
1973
+ "hasDynamicHelp": false,
1996
1974
  "multiple": false,
1997
1975
  "type": "option"
1976
+ },
1977
+ "use-tooling-api": {
1978
+ "aliases": [
1979
+ "usetoolingapi"
1980
+ ],
1981
+ "char": "t",
1982
+ "deprecateAliases": true,
1983
+ "name": "use-tooling-api",
1984
+ "summary": "Use Tooling API so you can delete a record from a Tooling API object.",
1985
+ "allowNo": false,
1986
+ "type": "boolean"
1987
+ },
1988
+ "perflog": {
1989
+ "deprecated": {
1990
+ "version": "57"
1991
+ },
1992
+ "description": "Gets data on API performance metrics from the server. The data is stored in $HOME/.sfdx/apiPerformanceLog.json.",
1993
+ "hidden": true,
1994
+ "name": "perflog",
1995
+ "summary": "Get API performance data.",
1996
+ "allowNo": false,
1997
+ "type": "boolean"
1998
1998
  }
1999
1999
  },
2000
2000
  "hasDynamicHelp": true,
2001
2001
  "hiddenAliases": [],
2002
- "id": "data:import:resume",
2002
+ "id": "data:delete:record",
2003
2003
  "pluginAlias": "@salesforce/plugin-data",
2004
2004
  "pluginName": "@salesforce/plugin-data",
2005
2005
  "pluginType": "core",
2006
2006
  "strict": true,
2007
- "summary": "Resume a bulk import job that you previously started. Uses Bulk API 2.0.",
2007
+ "summary": "Deletes a single record from a Salesforce or Tooling API object.",
2008
2008
  "enableJsonFlag": true,
2009
2009
  "isESM": true,
2010
2010
  "relativePath": [
2011
2011
  "lib",
2012
2012
  "commands",
2013
2013
  "data",
2014
- "import",
2015
- "resume.js"
2014
+ "delete",
2015
+ "record.js"
2016
+ ],
2017
+ "aliasPermutations": [
2018
+ "force:data:record:delete",
2019
+ "data:force:record:delete",
2020
+ "data:record:force:delete",
2021
+ "data:record:delete:force",
2022
+ "force:record:data:delete",
2023
+ "record:force:data:delete",
2024
+ "record:data:force:delete",
2025
+ "record:data:delete:force",
2026
+ "force:record:delete:data",
2027
+ "record:force:delete:data",
2028
+ "record:delete:force:data",
2029
+ "record:delete:data:force",
2030
+ "force:data:delete:record",
2031
+ "data:force:delete:record",
2032
+ "data:delete:force:record",
2033
+ "data:delete:record:force",
2034
+ "force:delete:data:record",
2035
+ "delete:force:data:record",
2036
+ "delete:data:force:record",
2037
+ "delete:data:record:force",
2038
+ "force:delete:record:data",
2039
+ "delete:force:record:data",
2040
+ "delete:record:force:data",
2041
+ "delete:record:data:force"
2016
2042
  ],
2017
- "aliasPermutations": [],
2018
2043
  "permutations": [
2019
- "data:import:resume",
2020
- "import:data:resume",
2021
- "import:resume:data",
2022
- "data:resume:import",
2023
- "resume:data:import",
2024
- "resume:import:data"
2044
+ "data:delete:record",
2045
+ "delete:data:record",
2046
+ "delete:record:data",
2047
+ "data:record:delete",
2048
+ "record:data:delete",
2049
+ "record:delete:data"
2025
2050
  ]
2026
2051
  },
2027
- "data:import:tree": {
2028
- "aliases": [
2029
- "force:data:tree:import"
2030
- ],
2052
+ "data:delete:resume": {
2053
+ "aliases": [],
2031
2054
  "args": {},
2032
2055
  "deprecateAliases": true,
2033
- "description": "The JSON files that contain the data are in sObject tree format, which is a collection of nested, parent-child records with a single root record. Use the \"<%= config.bin %> data export tree\" command to generate these JSON files.\n\nIf you used the --plan flag when exporting the data to generate a plan definition file, use the --plan flag to reference the file when you import. If you're not using a plan, use the --files flag to list the files. If you specify multiple JSON files that depend on each other in a parent-child relationship, be sure you list them in the correct order.",
2056
+ "description": "The command uses the job ID returned by the \"<%= config.bin %> data delete bulk\" command or the most recently-run bulk delete job.",
2034
2057
  "examples": [
2035
- "Import the records contained in two JSON files into the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --files Contact.json,Account.json --target-org my-scratch",
2036
- "Import records using a plan definition file into your default org:\n<%= config.bin %> <%= command.id %> --plan Account-Contact-plan.json"
2058
+ "Resume a bulk delete job from your default org using an ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
2059
+ "Resume the most recently run bulk delete job for an org with alias my-scratch:\n<%= config.bin %> <%= command.id %> --use-most-recent --target-org my-scratch"
2037
2060
  ],
2038
2061
  "flags": {
2039
2062
  "json": {
@@ -2060,17 +2083,41 @@
2060
2083
  "deprecateAliases": true,
2061
2084
  "name": "target-org",
2062
2085
  "noCacheDefault": true,
2063
- "required": true,
2064
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
2086
+ "summary": "Username or alias of the target org. Not required if the \"target-org\" configuration variable is already set.",
2065
2087
  "hasDynamicHelp": true,
2066
2088
  "multiple": false,
2067
2089
  "type": "option"
2068
2090
  },
2069
- "api-version": {
2091
+ "job-id": {
2070
2092
  "aliases": [
2071
- "apiversion"
2093
+ "jobid"
2072
2094
  ],
2095
+ "char": "i",
2073
2096
  "deprecateAliases": true,
2097
+ "name": "job-id",
2098
+ "summary": "ID of the job you want to resume.",
2099
+ "hasDynamicHelp": false,
2100
+ "multiple": false,
2101
+ "type": "option"
2102
+ },
2103
+ "use-most-recent": {
2104
+ "exclusive": [
2105
+ "job-id"
2106
+ ],
2107
+ "name": "use-most-recent",
2108
+ "summary": "Use the ID of the most recently-run bulk job.",
2109
+ "allowNo": false,
2110
+ "type": "boolean"
2111
+ },
2112
+ "wait": {
2113
+ "name": "wait",
2114
+ "summary": "Number of minutes to wait for the command to complete before displaying the results.",
2115
+ "default": "5 minutes",
2116
+ "hasDynamicHelp": true,
2117
+ "multiple": false,
2118
+ "type": "option"
2119
+ },
2120
+ "api-version": {
2074
2121
  "description": "Override the api version used for api requests made by this command",
2075
2122
  "name": "api-version",
2076
2123
  "hasDynamicHelp": false,
@@ -2086,80 +2133,33 @@
2086
2133
  "hasDynamicHelp": false,
2087
2134
  "multiple": false,
2088
2135
  "type": "option"
2089
- },
2090
- "files": {
2091
- "aliases": [
2092
- "sobjecttreefiles"
2093
- ],
2094
- "char": "f",
2095
- "deprecateAliases": true,
2096
- "name": "files",
2097
- "summary": "Comma-separated and in-order JSON files that contain the records, in sObject tree format, that you want to insert.",
2098
- "delimiter": ",",
2099
- "hasDynamicHelp": false,
2100
- "multiple": true,
2101
- "type": "option"
2102
- },
2103
- "plan": {
2104
- "char": "p",
2105
- "description": "Unlike when you use the `--files` flag, the files listed in the plan definition file **can** contain more then 200 records. When the CLI executes the import, it automatically batches the records to comply with the 200 record limit set by the API.\n\nThe order in which you list the files in the plan definition file matters. Specifically, records with lookups to records in another file should be listed AFTER that file. For example, let's say you're loading Account and Contact records, and the contacts have references to those accounts. Be sure you list the Accounts file before the Contacts file.\n\nThe plan definition file has the following schema:\n\n- items(object) - SObject Type: Definition of records to be insert per SObject Type\n - sobject(string) - Name of SObject: Child file references must have SObject roots of this type\n - files(array) - Files: An array of files paths to load",
2106
- "name": "plan",
2107
- "summary": "Plan definition file to insert multiple data files.",
2108
- "hasDynamicHelp": false,
2109
- "multiple": false,
2110
- "type": "option"
2111
2136
  }
2112
2137
  },
2113
2138
  "hasDynamicHelp": true,
2114
2139
  "hiddenAliases": [],
2115
- "id": "data:import:tree",
2140
+ "id": "data:delete:resume",
2116
2141
  "pluginAlias": "@salesforce/plugin-data",
2117
2142
  "pluginName": "@salesforce/plugin-data",
2118
2143
  "pluginType": "core",
2119
2144
  "strict": true,
2120
- "summary": "Import data from one or more JSON files into an org.",
2145
+ "summary": "Resume a bulk delete job that you previously started. Uses Bulk API 2.0.",
2121
2146
  "enableJsonFlag": true,
2122
2147
  "isESM": true,
2123
2148
  "relativePath": [
2124
2149
  "lib",
2125
2150
  "commands",
2126
2151
  "data",
2127
- "import",
2128
- "tree.js"
2129
- ],
2130
- "aliasPermutations": [
2131
- "force:data:tree:import",
2132
- "data:force:tree:import",
2133
- "data:tree:force:import",
2134
- "data:tree:import:force",
2135
- "force:tree:data:import",
2136
- "tree:force:data:import",
2137
- "tree:data:force:import",
2138
- "tree:data:import:force",
2139
- "force:tree:import:data",
2140
- "tree:force:import:data",
2141
- "tree:import:force:data",
2142
- "tree:import:data:force",
2143
- "force:data:import:tree",
2144
- "data:force:import:tree",
2145
- "data:import:force:tree",
2146
- "data:import:tree:force",
2147
- "force:import:data:tree",
2148
- "import:force:data:tree",
2149
- "import:data:force:tree",
2150
- "import:data:tree:force",
2151
- "force:import:tree:data",
2152
- "import:force:tree:data",
2153
- "import:tree:force:data",
2154
- "import:tree:data:force"
2152
+ "delete",
2153
+ "resume.js"
2155
2154
  ],
2155
+ "aliasPermutations": [],
2156
2156
  "permutations": [
2157
- "data:import:tree",
2158
- "import:data:tree",
2159
- "import:tree:data",
2160
- "data:tree:import",
2161
- "tree:data:import",
2162
- "tree:import:data"
2157
+ "data:delete:resume",
2158
+ "delete:data:resume",
2159
+ "delete:resume:data",
2160
+ "data:resume:delete",
2161
+ "resume:data:delete",
2162
+ "resume:delete:data"
2163
2163
  ]
2164
2164
  },
2165
2165
  "data:query:resume": {
@@ -3535,5 +3535,5 @@
3535
3535
  ]
3536
3536
  }
3537
3537
  },
3538
- "version": "4.0.9"
3538
+ "version": "4.0.10"
3539
3539
  }