@salesforce/plugin-data 4.0.86 → 4.0.87

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 +24 -24
  2. package/oclif.manifest.json +755 -755
  3. package/package.json +3 -3
@@ -735,13 +735,13 @@
735
735
  "record:create:data"
736
736
  ]
737
737
  },
738
- "data:delete:bulk": {
738
+ "data:export:bulk": {
739
739
  "aliases": [],
740
740
  "args": {},
741
- "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.",
741
+ "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, 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).",
742
742
  "examples": [
743
- "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",
744
- "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"
743
+ "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",
744
+ "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"
745
745
  ],
746
746
  "flags": {
747
747
  "json": {
@@ -760,12 +760,7 @@
760
760
  "type": "option"
761
761
  },
762
762
  "target-org": {
763
- "aliases": [
764
- "targetusername",
765
- "u"
766
- ],
767
763
  "char": "o",
768
- "deprecateAliases": true,
769
764
  "name": "target-org",
770
765
  "noCacheDefault": true,
771
766
  "required": true,
@@ -775,122 +770,228 @@
775
770
  "type": "option"
776
771
  },
777
772
  "api-version": {
778
- "aliases": [
779
- "apiversion"
780
- ],
781
- "deprecateAliases": true,
782
773
  "description": "Override the api version used for api requests made by this command",
783
774
  "name": "api-version",
784
775
  "hasDynamicHelp": false,
785
776
  "multiple": false,
786
777
  "type": "option"
787
778
  },
788
- "loglevel": {
789
- "deprecated": {
790
- "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."
791
- },
792
- "hidden": true,
793
- "name": "loglevel",
779
+ "wait": {
780
+ "char": "w",
781
+ "name": "wait",
782
+ "summary": "Time to wait for the command to finish, in minutes.",
783
+ "hasDynamicHelp": true,
784
+ "helpValue": "<minutes>",
785
+ "multiple": false,
786
+ "type": "option"
787
+ },
788
+ "query": {
789
+ "char": "q",
790
+ "exclusive": [
791
+ "query-file"
792
+ ],
793
+ "name": "query",
794
+ "summary": "SOQL query to execute.",
794
795
  "hasDynamicHelp": false,
795
796
  "multiple": false,
796
797
  "type": "option"
797
798
  },
798
- "file": {
799
- "aliases": [
800
- "csvfile"
799
+ "query-file": {
800
+ "exclusive": [
801
+ "query"
801
802
  ],
802
- "char": "f",
803
- "deprecateAliases": true,
804
- "name": "file",
803
+ "name": "query-file",
804
+ "summary": "File that contains the SOQL query.",
805
+ "hasDynamicHelp": false,
806
+ "multiple": false,
807
+ "type": "option"
808
+ },
809
+ "all-rows": {
810
+ "name": "all-rows",
811
+ "summary": "Include records that have been soft-deleted due to a merge or delete. By default, deleted records are not returned.",
812
+ "allowNo": false,
813
+ "type": "boolean"
814
+ },
815
+ "output-file": {
816
+ "name": "output-file",
805
817
  "required": true,
806
- "summary": "CSV file that contains the IDs of the records to update or delete.",
818
+ "summary": "File where records are written.",
807
819
  "hasDynamicHelp": false,
808
820
  "multiple": false,
809
821
  "type": "option"
810
822
  },
811
- "sobject": {
812
- "aliases": [
813
- "sobjecttype"
814
- ],
815
- "char": "s",
816
- "deprecateAliases": true,
817
- "name": "sobject",
823
+ "result-format": {
824
+ "char": "r",
825
+ "name": "result-format",
818
826
  "required": true,
819
- "summary": "API name of the Salesforce object, either standard or custom, that you want to update or delete records from.",
827
+ "summary": "Format to write the results.",
828
+ "default": "csv",
820
829
  "hasDynamicHelp": false,
821
830
  "multiple": false,
831
+ "options": [
832
+ "csv",
833
+ "json"
834
+ ],
822
835
  "type": "option"
823
836
  },
824
- "wait": {
825
- "char": "w",
826
- "name": "wait",
827
- "summary": "Number of minutes to wait for the command to complete before displaying the results.",
828
- "default": "0 minutes",
829
- "hasDynamicHelp": true,
837
+ "column-delimiter": {
838
+ "name": "column-delimiter",
839
+ "relationships": [
840
+ {
841
+ "type": "some",
842
+ "flags": [
843
+ {
844
+ "name": "result-format"
845
+ }
846
+ ]
847
+ }
848
+ ],
849
+ "summary": "Column delimiter to be used when writing CSV output. Default is COMMA.",
850
+ "hasDynamicHelp": false,
830
851
  "multiple": false,
852
+ "options": [
853
+ "BACKQUOTE",
854
+ "CARET",
855
+ "COMMA",
856
+ "PIPE",
857
+ "SEMICOLON",
858
+ "TAB"
859
+ ],
831
860
  "type": "option"
832
861
  },
833
862
  "line-ending": {
834
- "dependsOn": [
835
- "file"
836
- ],
837
863
  "name": "line-ending",
838
- "summary": "Line ending used in the CSV file. Default value on Windows is `CRLF`; on macOS and Linux it's `LF`.",
864
+ "relationships": [
865
+ {
866
+ "type": "some",
867
+ "flags": [
868
+ {
869
+ "name": "result-format"
870
+ }
871
+ ]
872
+ }
873
+ ],
874
+ "summary": "Line ending to be used when writing CSV output. Default value on Windows is is `CRLF`; on macOS and Linux it's `LR`.",
839
875
  "hasDynamicHelp": false,
840
876
  "multiple": false,
841
877
  "options": [
842
- "CRLF",
843
- "LF"
878
+ "LF",
879
+ "CRLF"
844
880
  ],
845
881
  "type": "option"
882
+ }
883
+ },
884
+ "hasDynamicHelp": true,
885
+ "hiddenAliases": [],
886
+ "id": "data:export:bulk",
887
+ "pluginAlias": "@salesforce/plugin-data",
888
+ "pluginName": "@salesforce/plugin-data",
889
+ "pluginType": "core",
890
+ "strict": true,
891
+ "summary": "Bulk export records from an org into a file using a SOQL query. Uses Bulk API 2.0.",
892
+ "enableJsonFlag": true,
893
+ "isESM": true,
894
+ "relativePath": [
895
+ "lib",
896
+ "commands",
897
+ "data",
898
+ "export",
899
+ "bulk.js"
900
+ ],
901
+ "aliasPermutations": [],
902
+ "permutations": [
903
+ "data:export:bulk",
904
+ "export:data:bulk",
905
+ "export:bulk:data",
906
+ "data:bulk:export",
907
+ "bulk:data:export",
908
+ "bulk:export:data"
909
+ ]
910
+ },
911
+ "data:export:resume": {
912
+ "aliases": [],
913
+ "args": {},
914
+ "description": "When the original \"data export bulk\" command times out, 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.\n\nUsing either `--job-id` or `--use-most-recent` will properly resolve to the correct org where the bulk job was started based on the cached data by \"data export bulk\".",
915
+ "examples": [
916
+ "Resume a bulk export job run by specifying a job ID:\nsf <%= command.id %> --job-id 750xx000000005sAAA",
917
+ "Resume the most recently-run bulk export job:\nsf data export resume --use-most-recent"
918
+ ],
919
+ "flags": {
920
+ "json": {
921
+ "description": "Format output as json.",
922
+ "helpGroup": "GLOBAL",
923
+ "name": "json",
924
+ "allowNo": false,
925
+ "type": "boolean"
846
926
  },
847
- "hard-delete": {
848
- "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.",
849
- "name": "hard-delete",
850
- "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.",
927
+ "flags-dir": {
928
+ "helpGroup": "GLOBAL",
929
+ "name": "flags-dir",
930
+ "summary": "Import flag values from a directory.",
931
+ "hasDynamicHelp": false,
932
+ "multiple": false,
933
+ "type": "option"
934
+ },
935
+ "job-id": {
936
+ "char": "i",
937
+ "name": "job-id",
938
+ "summary": "Job ID of the bulk export.",
939
+ "hasDynamicHelp": false,
940
+ "multiple": false,
941
+ "type": "option"
942
+ },
943
+ "use-most-recent": {
944
+ "name": "use-most-recent",
945
+ "summary": "Use the job ID of the bulk export job that was most recently run.",
851
946
  "allowNo": false,
852
947
  "type": "boolean"
948
+ },
949
+ "api-version": {
950
+ "description": "Override the api version used for api requests made by this command",
951
+ "name": "api-version",
952
+ "hasDynamicHelp": false,
953
+ "multiple": false,
954
+ "type": "option"
853
955
  }
854
956
  },
855
- "hasDynamicHelp": true,
957
+ "hasDynamicHelp": false,
856
958
  "hiddenAliases": [],
857
- "id": "data:delete:bulk",
959
+ "id": "data:export:resume",
858
960
  "pluginAlias": "@salesforce/plugin-data",
859
961
  "pluginName": "@salesforce/plugin-data",
860
962
  "pluginType": "core",
861
963
  "strict": true,
862
- "summary": "Bulk delete records from an org using a CSV file. Uses Bulk API 2.0.",
964
+ "summary": "Resume a bulk export job that you previously started. Uses Bulk API 2.0.",
863
965
  "enableJsonFlag": true,
864
966
  "isESM": true,
865
967
  "relativePath": [
866
968
  "lib",
867
969
  "commands",
868
970
  "data",
869
- "delete",
870
- "bulk.js"
971
+ "export",
972
+ "resume.js"
871
973
  ],
872
974
  "aliasPermutations": [],
873
975
  "permutations": [
874
- "data:delete:bulk",
875
- "delete:data:bulk",
876
- "delete:bulk:data",
877
- "data:bulk:delete",
878
- "bulk:data:delete",
879
- "bulk:delete:data"
976
+ "data:export:resume",
977
+ "export:data:resume",
978
+ "export:resume:data",
979
+ "data:resume:export",
980
+ "resume:data:export",
981
+ "resume:export:data"
880
982
  ]
881
983
  },
882
- "data:delete:record": {
984
+ "data:export:tree": {
883
985
  "aliases": [
884
- "force:data:record:delete"
986
+ "force:data:tree:export"
885
987
  ],
886
988
  "args": {},
887
989
  "deprecateAliases": true,
888
- "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.",
990
+ "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).",
889
991
  "examples": [
890
- "Delete a record from Account with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 00180XX",
891
- "Delete a record from Account whose name equals \"Acme\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name=Acme\"",
892
- "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",
893
- "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"
992
+ "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\"",
993
+ "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",
994
+ "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"
894
995
  ],
895
996
  "flags": {
896
997
  "json": {
@@ -944,122 +1045,102 @@
944
1045
  "multiple": false,
945
1046
  "type": "option"
946
1047
  },
947
- "sobject": {
948
- "aliases": [
949
- "sobjecttype"
950
- ],
951
- "char": "s",
952
- "deprecateAliases": true,
953
- "name": "sobject",
1048
+ "query": {
1049
+ "char": "q",
1050
+ "name": "query",
954
1051
  "required": true,
955
- "summary": "API name of the Salesforce or Tooling API object that you're deleting a record from.",
1052
+ "summary": "SOQL query, or filepath of a file that contains the query, to retrieve records.",
956
1053
  "hasDynamicHelp": false,
957
- "multiple": false,
1054
+ "multiple": true,
958
1055
  "type": "option"
959
1056
  },
960
- "record-id": {
961
- "aliases": [
962
- "sobjectid"
963
- ],
964
- "char": "i",
965
- "deprecateAliases": true,
966
- "name": "record-id",
967
- "summary": "ID of the record you’re deleting.",
968
- "hasDynamicHelp": false,
969
- "multiple": false,
970
- "type": "option"
1057
+ "plan": {
1058
+ "char": "p",
1059
+ "name": "plan",
1060
+ "summary": "Generate multiple sObject tree files and a plan definition file for aggregated import.",
1061
+ "allowNo": false,
1062
+ "type": "boolean"
971
1063
  },
972
- "where": {
973
- "char": "w",
974
- "name": "where",
975
- "summary": "List of <fieldName>=<value> pairs that identify the record you want to delete.",
1064
+ "prefix": {
1065
+ "char": "x",
1066
+ "name": "prefix",
1067
+ "summary": "Prefix of generated files.",
976
1068
  "hasDynamicHelp": false,
977
1069
  "multiple": false,
978
1070
  "type": "option"
979
1071
  },
980
- "use-tooling-api": {
1072
+ "output-dir": {
981
1073
  "aliases": [
982
- "usetoolingapi"
1074
+ "outputdir"
983
1075
  ],
984
- "char": "t",
1076
+ "char": "d",
985
1077
  "deprecateAliases": true,
986
- "name": "use-tooling-api",
987
- "summary": "Use Tooling API so you can delete a record from a Tooling API object.",
988
- "allowNo": false,
989
- "type": "boolean"
990
- },
991
- "perflog": {
992
- "deprecated": {
993
- "version": "57"
994
- },
995
- "description": "Gets data on API performance metrics from the server. The data is stored in $HOME/.sfdx/apiPerformanceLog.json.",
996
- "hidden": true,
997
- "name": "perflog",
998
- "summary": "Get API performance data.",
999
- "allowNo": false,
1000
- "type": "boolean"
1078
+ "name": "output-dir",
1079
+ "summary": "Directory in which to generate the JSON files; default is current directory.",
1080
+ "hasDynamicHelp": false,
1081
+ "multiple": false,
1082
+ "type": "option"
1001
1083
  }
1002
1084
  },
1003
1085
  "hasDynamicHelp": true,
1004
1086
  "hiddenAliases": [],
1005
- "id": "data:delete:record",
1087
+ "id": "data:export:tree",
1006
1088
  "pluginAlias": "@salesforce/plugin-data",
1007
1089
  "pluginName": "@salesforce/plugin-data",
1008
1090
  "pluginType": "core",
1009
1091
  "strict": true,
1010
- "summary": "Deletes a single record from a Salesforce or Tooling API object.",
1092
+ "summary": "Export data from an org into one or more JSON files.",
1011
1093
  "enableJsonFlag": true,
1012
1094
  "isESM": true,
1013
1095
  "relativePath": [
1014
1096
  "lib",
1015
1097
  "commands",
1016
1098
  "data",
1017
- "delete",
1018
- "record.js"
1099
+ "export",
1100
+ "tree.js"
1019
1101
  ],
1020
1102
  "aliasPermutations": [
1021
- "force:data:record:delete",
1022
- "data:force:record:delete",
1023
- "data:record:force:delete",
1024
- "data:record:delete:force",
1025
- "force:record:data:delete",
1026
- "record:force:data:delete",
1027
- "record:data:force:delete",
1028
- "record:data:delete:force",
1029
- "force:record:delete:data",
1030
- "record:force:delete:data",
1031
- "record:delete:force:data",
1032
- "record:delete:data:force",
1033
- "force:data:delete:record",
1034
- "data:force:delete:record",
1035
- "data:delete:force:record",
1036
- "data:delete:record:force",
1037
- "force:delete:data:record",
1038
- "delete:force:data:record",
1039
- "delete:data:force:record",
1040
- "delete:data:record:force",
1041
- "force:delete:record:data",
1042
- "delete:force:record:data",
1043
- "delete:record:force:data",
1044
- "delete:record:data:force"
1103
+ "force:data:tree:export",
1104
+ "data:force:tree:export",
1105
+ "data:tree:force:export",
1106
+ "data:tree:export:force",
1107
+ "force:tree:data:export",
1108
+ "tree:force:data:export",
1109
+ "tree:data:force:export",
1110
+ "tree:data:export:force",
1111
+ "force:tree:export:data",
1112
+ "tree:force:export:data",
1113
+ "tree:export:force:data",
1114
+ "tree:export:data:force",
1115
+ "force:data:export:tree",
1116
+ "data:force:export:tree",
1117
+ "data:export:force:tree",
1118
+ "data:export:tree:force",
1119
+ "force:export:data:tree",
1120
+ "export:force:data:tree",
1121
+ "export:data:force:tree",
1122
+ "export:data:tree:force",
1123
+ "force:export:tree:data",
1124
+ "export:force:tree:data",
1125
+ "export:tree:force:data",
1126
+ "export:tree:data:force"
1045
1127
  ],
1046
1128
  "permutations": [
1047
- "data:delete:record",
1048
- "delete:data:record",
1049
- "delete:record:data",
1050
- "data:record:delete",
1051
- "record:data:delete",
1052
- "record:delete:data"
1129
+ "data:export:tree",
1130
+ "export:data:tree",
1131
+ "export:tree:data",
1132
+ "data:tree:export",
1133
+ "tree:data:export",
1134
+ "tree:export:data"
1053
1135
  ]
1054
1136
  },
1055
- "data:delete:resume": {
1137
+ "data:delete:bulk": {
1056
1138
  "aliases": [],
1057
1139
  "args": {},
1058
- "deprecateAliases": true,
1059
- "description": "The command uses the job ID returned by the \"<%= config.bin %> data delete bulk\" command or the most recently-run bulk delete job.",
1140
+ "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.",
1060
1141
  "examples": [
1061
- "Resume a bulk delete job from your default org using an ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
1062
- "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"
1142
+ "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",
1143
+ "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"
1063
1144
  ],
1064
1145
  "flags": {
1065
1146
  "json": {
@@ -1086,66 +1167,98 @@
1086
1167
  "deprecateAliases": true,
1087
1168
  "name": "target-org",
1088
1169
  "noCacheDefault": true,
1089
- "summary": "Username or alias of the target org. Not required if the \"target-org\" configuration variable is already set.",
1170
+ "required": true,
1171
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1090
1172
  "hasDynamicHelp": true,
1091
1173
  "multiple": false,
1092
1174
  "type": "option"
1093
1175
  },
1094
- "job-id": {
1176
+ "api-version": {
1095
1177
  "aliases": [
1096
- "jobid"
1178
+ "apiversion"
1097
1179
  ],
1098
- "char": "i",
1099
1180
  "deprecateAliases": true,
1100
- "name": "job-id",
1101
- "summary": "ID of the job you want to resume.",
1181
+ "description": "Override the api version used for api requests made by this command",
1182
+ "name": "api-version",
1102
1183
  "hasDynamicHelp": false,
1103
1184
  "multiple": false,
1104
1185
  "type": "option"
1105
1186
  },
1106
- "use-most-recent": {
1107
- "exclusive": [
1108
- "job-id"
1187
+ "loglevel": {
1188
+ "deprecated": {
1189
+ "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."
1190
+ },
1191
+ "hidden": true,
1192
+ "name": "loglevel",
1193
+ "hasDynamicHelp": false,
1194
+ "multiple": false,
1195
+ "type": "option"
1196
+ },
1197
+ "file": {
1198
+ "aliases": [
1199
+ "csvfile"
1109
1200
  ],
1110
- "name": "use-most-recent",
1111
- "summary": "Use the ID of the most recently-run bulk job.",
1112
- "allowNo": false,
1113
- "type": "boolean"
1201
+ "char": "f",
1202
+ "deprecateAliases": true,
1203
+ "name": "file",
1204
+ "required": true,
1205
+ "summary": "CSV file that contains the IDs of the records to update or delete.",
1206
+ "hasDynamicHelp": false,
1207
+ "multiple": false,
1208
+ "type": "option"
1209
+ },
1210
+ "sobject": {
1211
+ "aliases": [
1212
+ "sobjecttype"
1213
+ ],
1214
+ "char": "s",
1215
+ "deprecateAliases": true,
1216
+ "name": "sobject",
1217
+ "required": true,
1218
+ "summary": "API name of the Salesforce object, either standard or custom, that you want to update or delete records from.",
1219
+ "hasDynamicHelp": false,
1220
+ "multiple": false,
1221
+ "type": "option"
1114
1222
  },
1115
1223
  "wait": {
1224
+ "char": "w",
1116
1225
  "name": "wait",
1117
1226
  "summary": "Number of minutes to wait for the command to complete before displaying the results.",
1118
- "default": "5 minutes",
1227
+ "default": "0 minutes",
1119
1228
  "hasDynamicHelp": true,
1120
1229
  "multiple": false,
1121
1230
  "type": "option"
1122
1231
  },
1123
- "api-version": {
1124
- "description": "Override the api version used for api requests made by this command",
1125
- "name": "api-version",
1232
+ "line-ending": {
1233
+ "dependsOn": [
1234
+ "file"
1235
+ ],
1236
+ "name": "line-ending",
1237
+ "summary": "Line ending used in the CSV file. Default value on Windows is `CRLF`; on macOS and Linux it's `LF`.",
1126
1238
  "hasDynamicHelp": false,
1127
1239
  "multiple": false,
1240
+ "options": [
1241
+ "CRLF",
1242
+ "LF"
1243
+ ],
1128
1244
  "type": "option"
1129
1245
  },
1130
- "loglevel": {
1131
- "deprecated": {
1132
- "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."
1133
- },
1134
- "hidden": true,
1135
- "name": "loglevel",
1136
- "hasDynamicHelp": false,
1137
- "multiple": false,
1138
- "type": "option"
1246
+ "hard-delete": {
1247
+ "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.",
1248
+ "name": "hard-delete",
1249
+ "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.",
1250
+ "allowNo": false,
1251
+ "type": "boolean"
1139
1252
  }
1140
1253
  },
1141
1254
  "hasDynamicHelp": true,
1142
1255
  "hiddenAliases": [],
1143
- "id": "data:delete:resume",
1256
+ "id": "data:delete:bulk",
1144
1257
  "pluginAlias": "@salesforce/plugin-data",
1145
1258
  "pluginName": "@salesforce/plugin-data",
1146
1259
  "pluginType": "core",
1147
1260
  "strict": true,
1148
- "summary": "Resume a bulk delete job that you previously started. Uses Bulk API 2.0.",
1261
+ "summary": "Bulk delete records from an org using a CSV file. Uses Bulk API 2.0.",
1149
1262
  "enableJsonFlag": true,
1150
1263
  "isESM": true,
1151
1264
  "relativePath": [
@@ -1153,25 +1266,30 @@
1153
1266
  "commands",
1154
1267
  "data",
1155
1268
  "delete",
1156
- "resume.js"
1269
+ "bulk.js"
1157
1270
  ],
1158
1271
  "aliasPermutations": [],
1159
1272
  "permutations": [
1160
- "data:delete:resume",
1161
- "delete:data:resume",
1162
- "delete:resume:data",
1163
- "data:resume:delete",
1164
- "resume:data:delete",
1165
- "resume:delete:data"
1273
+ "data:delete:bulk",
1274
+ "delete:data:bulk",
1275
+ "delete:bulk:data",
1276
+ "data:bulk:delete",
1277
+ "bulk:data:delete",
1278
+ "bulk:delete:data"
1166
1279
  ]
1167
1280
  },
1168
- "data:export:bulk": {
1169
- "aliases": [],
1281
+ "data:delete:record": {
1282
+ "aliases": [
1283
+ "force:data:record:delete"
1284
+ ],
1170
1285
  "args": {},
1171
- "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, 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).",
1286
+ "deprecateAliases": true,
1287
+ "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.",
1172
1288
  "examples": [
1173
- "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",
1174
- "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"
1289
+ "Delete a record from Account with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 00180XX",
1290
+ "Delete a record from Account whose name equals \"Acme\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name=Acme\"",
1291
+ "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",
1292
+ "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"
1175
1293
  ],
1176
1294
  "flags": {
1177
1295
  "json": {
@@ -1190,7 +1308,12 @@
1190
1308
  "type": "option"
1191
1309
  },
1192
1310
  "target-org": {
1311
+ "aliases": [
1312
+ "targetusername",
1313
+ "u"
1314
+ ],
1193
1315
  "char": "o",
1316
+ "deprecateAliases": true,
1194
1317
  "name": "target-org",
1195
1318
  "noCacheDefault": true,
1196
1319
  "required": true,
@@ -1200,151 +1323,142 @@
1200
1323
  "type": "option"
1201
1324
  },
1202
1325
  "api-version": {
1326
+ "aliases": [
1327
+ "apiversion"
1328
+ ],
1329
+ "deprecateAliases": true,
1203
1330
  "description": "Override the api version used for api requests made by this command",
1204
1331
  "name": "api-version",
1205
1332
  "hasDynamicHelp": false,
1206
1333
  "multiple": false,
1207
1334
  "type": "option"
1208
1335
  },
1209
- "wait": {
1210
- "char": "w",
1211
- "name": "wait",
1212
- "summary": "Time to wait for the command to finish, in minutes.",
1213
- "hasDynamicHelp": true,
1214
- "helpValue": "<minutes>",
1215
- "multiple": false,
1216
- "type": "option"
1217
- },
1218
- "query": {
1219
- "char": "q",
1220
- "exclusive": [
1221
- "query-file"
1222
- ],
1223
- "name": "query",
1224
- "summary": "SOQL query to execute.",
1336
+ "loglevel": {
1337
+ "deprecated": {
1338
+ "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."
1339
+ },
1340
+ "hidden": true,
1341
+ "name": "loglevel",
1225
1342
  "hasDynamicHelp": false,
1226
1343
  "multiple": false,
1227
1344
  "type": "option"
1228
1345
  },
1229
- "query-file": {
1230
- "exclusive": [
1231
- "query"
1346
+ "sobject": {
1347
+ "aliases": [
1348
+ "sobjecttype"
1232
1349
  ],
1233
- "name": "query-file",
1234
- "summary": "File that contains the SOQL query.",
1235
- "hasDynamicHelp": false,
1236
- "multiple": false,
1237
- "type": "option"
1238
- },
1239
- "all-rows": {
1240
- "name": "all-rows",
1241
- "summary": "Include records that have been soft-deleted due to a merge or delete. By default, deleted records are not returned.",
1242
- "allowNo": false,
1243
- "type": "boolean"
1244
- },
1245
- "output-file": {
1246
- "name": "output-file",
1350
+ "char": "s",
1351
+ "deprecateAliases": true,
1352
+ "name": "sobject",
1247
1353
  "required": true,
1248
- "summary": "File where records are written.",
1354
+ "summary": "API name of the Salesforce or Tooling API object that you're deleting a record from.",
1249
1355
  "hasDynamicHelp": false,
1250
1356
  "multiple": false,
1251
1357
  "type": "option"
1252
1358
  },
1253
- "result-format": {
1254
- "char": "r",
1255
- "name": "result-format",
1256
- "required": true,
1257
- "summary": "Format to write the results.",
1258
- "default": "csv",
1359
+ "record-id": {
1360
+ "aliases": [
1361
+ "sobjectid"
1362
+ ],
1363
+ "char": "i",
1364
+ "deprecateAliases": true,
1365
+ "name": "record-id",
1366
+ "summary": "ID of the record you’re deleting.",
1259
1367
  "hasDynamicHelp": false,
1260
1368
  "multiple": false,
1261
- "options": [
1262
- "csv",
1263
- "json"
1264
- ],
1265
1369
  "type": "option"
1266
1370
  },
1267
- "column-delimiter": {
1268
- "name": "column-delimiter",
1269
- "relationships": [
1270
- {
1271
- "type": "some",
1272
- "flags": [
1273
- {
1274
- "name": "result-format"
1275
- }
1276
- ]
1277
- }
1278
- ],
1279
- "summary": "Column delimiter to be used when writing CSV output. Default is COMMA.",
1371
+ "where": {
1372
+ "char": "w",
1373
+ "name": "where",
1374
+ "summary": "List of <fieldName>=<value> pairs that identify the record you want to delete.",
1280
1375
  "hasDynamicHelp": false,
1281
1376
  "multiple": false,
1282
- "options": [
1283
- "BACKQUOTE",
1284
- "CARET",
1285
- "COMMA",
1286
- "PIPE",
1287
- "SEMICOLON",
1288
- "TAB"
1289
- ],
1290
1377
  "type": "option"
1291
1378
  },
1292
- "line-ending": {
1293
- "name": "line-ending",
1294
- "relationships": [
1295
- {
1296
- "type": "some",
1297
- "flags": [
1298
- {
1299
- "name": "result-format"
1300
- }
1301
- ]
1302
- }
1303
- ],
1304
- "summary": "Line ending to be used when writing CSV output. Default value on Windows is is `CRLF`; on macOS and Linux it's `LR`.",
1305
- "hasDynamicHelp": false,
1306
- "multiple": false,
1307
- "options": [
1308
- "LF",
1309
- "CRLF"
1379
+ "use-tooling-api": {
1380
+ "aliases": [
1381
+ "usetoolingapi"
1310
1382
  ],
1311
- "type": "option"
1383
+ "char": "t",
1384
+ "deprecateAliases": true,
1385
+ "name": "use-tooling-api",
1386
+ "summary": "Use Tooling API so you can delete a record from a Tooling API object.",
1387
+ "allowNo": false,
1388
+ "type": "boolean"
1389
+ },
1390
+ "perflog": {
1391
+ "deprecated": {
1392
+ "version": "57"
1393
+ },
1394
+ "description": "Gets data on API performance metrics from the server. The data is stored in $HOME/.sfdx/apiPerformanceLog.json.",
1395
+ "hidden": true,
1396
+ "name": "perflog",
1397
+ "summary": "Get API performance data.",
1398
+ "allowNo": false,
1399
+ "type": "boolean"
1312
1400
  }
1313
1401
  },
1314
1402
  "hasDynamicHelp": true,
1315
1403
  "hiddenAliases": [],
1316
- "id": "data:export:bulk",
1404
+ "id": "data:delete:record",
1317
1405
  "pluginAlias": "@salesforce/plugin-data",
1318
1406
  "pluginName": "@salesforce/plugin-data",
1319
1407
  "pluginType": "core",
1320
1408
  "strict": true,
1321
- "summary": "Bulk export records from an org into a file using a SOQL query. Uses Bulk API 2.0.",
1409
+ "summary": "Deletes a single record from a Salesforce or Tooling API object.",
1322
1410
  "enableJsonFlag": true,
1323
1411
  "isESM": true,
1324
1412
  "relativePath": [
1325
1413
  "lib",
1326
1414
  "commands",
1327
1415
  "data",
1328
- "export",
1329
- "bulk.js"
1416
+ "delete",
1417
+ "record.js"
1418
+ ],
1419
+ "aliasPermutations": [
1420
+ "force:data:record:delete",
1421
+ "data:force:record:delete",
1422
+ "data:record:force:delete",
1423
+ "data:record:delete:force",
1424
+ "force:record:data:delete",
1425
+ "record:force:data:delete",
1426
+ "record:data:force:delete",
1427
+ "record:data:delete:force",
1428
+ "force:record:delete:data",
1429
+ "record:force:delete:data",
1430
+ "record:delete:force:data",
1431
+ "record:delete:data:force",
1432
+ "force:data:delete:record",
1433
+ "data:force:delete:record",
1434
+ "data:delete:force:record",
1435
+ "data:delete:record:force",
1436
+ "force:delete:data:record",
1437
+ "delete:force:data:record",
1438
+ "delete:data:force:record",
1439
+ "delete:data:record:force",
1440
+ "force:delete:record:data",
1441
+ "delete:force:record:data",
1442
+ "delete:record:force:data",
1443
+ "delete:record:data:force"
1330
1444
  ],
1331
- "aliasPermutations": [],
1332
1445
  "permutations": [
1333
- "data:export:bulk",
1334
- "export:data:bulk",
1335
- "export:bulk:data",
1336
- "data:bulk:export",
1337
- "bulk:data:export",
1338
- "bulk:export:data"
1446
+ "data:delete:record",
1447
+ "delete:data:record",
1448
+ "delete:record:data",
1449
+ "data:record:delete",
1450
+ "record:data:delete",
1451
+ "record:delete:data"
1339
1452
  ]
1340
1453
  },
1341
- "data:export:resume": {
1454
+ "data:delete:resume": {
1342
1455
  "aliases": [],
1343
1456
  "args": {},
1344
- "description": "When the original \"data export bulk\" command times out, 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.\n\nUsing either `--job-id` or `--use-most-recent` will properly resolve to the correct org where the bulk job was started based on the cached data by \"data export bulk\".",
1457
+ "deprecateAliases": true,
1458
+ "description": "The command uses the job ID returned by the \"<%= config.bin %> data delete bulk\" command or the most recently-run bulk delete job.",
1345
1459
  "examples": [
1346
- "Resume a bulk export job run by specifying a job ID:\nsf <%= command.id %> --job-id 750xx000000005sAAA",
1347
- "Resume the most recently-run bulk export job:\nsf data export resume --use-most-recent"
1460
+ "Resume a bulk delete job from your default org using an ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
1461
+ "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"
1348
1462
  ],
1349
1463
  "flags": {
1350
1464
  "json": {
@@ -1362,220 +1476,106 @@
1362
1476
  "multiple": false,
1363
1477
  "type": "option"
1364
1478
  },
1479
+ "target-org": {
1480
+ "aliases": [
1481
+ "targetusername",
1482
+ "u"
1483
+ ],
1484
+ "char": "o",
1485
+ "deprecateAliases": true,
1486
+ "name": "target-org",
1487
+ "noCacheDefault": true,
1488
+ "summary": "Username or alias of the target org. Not required if the \"target-org\" configuration variable is already set.",
1489
+ "hasDynamicHelp": true,
1490
+ "multiple": false,
1491
+ "type": "option"
1492
+ },
1365
1493
  "job-id": {
1494
+ "aliases": [
1495
+ "jobid"
1496
+ ],
1366
1497
  "char": "i",
1498
+ "deprecateAliases": true,
1367
1499
  "name": "job-id",
1368
- "summary": "Job ID of the bulk export.",
1500
+ "summary": "ID of the job you want to resume.",
1369
1501
  "hasDynamicHelp": false,
1370
1502
  "multiple": false,
1371
1503
  "type": "option"
1372
1504
  },
1373
1505
  "use-most-recent": {
1506
+ "exclusive": [
1507
+ "job-id"
1508
+ ],
1374
1509
  "name": "use-most-recent",
1375
- "summary": "Use the job ID of the bulk export job that was most recently run.",
1510
+ "summary": "Use the ID of the most recently-run bulk job.",
1376
1511
  "allowNo": false,
1377
1512
  "type": "boolean"
1378
1513
  },
1514
+ "wait": {
1515
+ "name": "wait",
1516
+ "summary": "Number of minutes to wait for the command to complete before displaying the results.",
1517
+ "default": "5 minutes",
1518
+ "hasDynamicHelp": true,
1519
+ "multiple": false,
1520
+ "type": "option"
1521
+ },
1379
1522
  "api-version": {
1380
1523
  "description": "Override the api version used for api requests made by this command",
1381
1524
  "name": "api-version",
1382
1525
  "hasDynamicHelp": false,
1383
1526
  "multiple": false,
1384
1527
  "type": "option"
1528
+ },
1529
+ "loglevel": {
1530
+ "deprecated": {
1531
+ "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."
1532
+ },
1533
+ "hidden": true,
1534
+ "name": "loglevel",
1535
+ "hasDynamicHelp": false,
1536
+ "multiple": false,
1537
+ "type": "option"
1385
1538
  }
1386
1539
  },
1387
- "hasDynamicHelp": false,
1540
+ "hasDynamicHelp": true,
1388
1541
  "hiddenAliases": [],
1389
- "id": "data:export:resume",
1542
+ "id": "data:delete:resume",
1390
1543
  "pluginAlias": "@salesforce/plugin-data",
1391
1544
  "pluginName": "@salesforce/plugin-data",
1392
1545
  "pluginType": "core",
1393
1546
  "strict": true,
1394
- "summary": "Resume a bulk export job that you previously started. Uses Bulk API 2.0.",
1547
+ "summary": "Resume a bulk delete job that you previously started. Uses Bulk API 2.0.",
1395
1548
  "enableJsonFlag": true,
1396
1549
  "isESM": true,
1397
1550
  "relativePath": [
1398
1551
  "lib",
1399
1552
  "commands",
1400
1553
  "data",
1401
- "export",
1554
+ "delete",
1402
1555
  "resume.js"
1403
1556
  ],
1404
1557
  "aliasPermutations": [],
1405
1558
  "permutations": [
1406
- "data:export:resume",
1407
- "export:data:resume",
1408
- "export:resume:data",
1409
- "data:resume:export",
1410
- "resume:data:export",
1411
- "resume:export:data"
1559
+ "data:delete:resume",
1560
+ "delete:data:resume",
1561
+ "delete:resume:data",
1562
+ "data:resume:delete",
1563
+ "resume:data:delete",
1564
+ "resume:delete:data"
1412
1565
  ]
1413
1566
  },
1414
- "data:export:tree": {
1567
+ "data:get:record": {
1415
1568
  "aliases": [
1416
- "force:data:tree:export"
1569
+ "force:data:record:get"
1417
1570
  ],
1418
1571
  "args": {},
1419
1572
  "deprecateAliases": true,
1420
- "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).",
1573
+ "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.",
1421
1574
  "examples": [
1422
- "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\"",
1423
- "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",
1424
- "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"
1425
- ],
1426
- "flags": {
1427
- "json": {
1428
- "description": "Format output as json.",
1429
- "helpGroup": "GLOBAL",
1430
- "name": "json",
1431
- "allowNo": false,
1432
- "type": "boolean"
1433
- },
1434
- "flags-dir": {
1435
- "helpGroup": "GLOBAL",
1436
- "name": "flags-dir",
1437
- "summary": "Import flag values from a directory.",
1438
- "hasDynamicHelp": false,
1439
- "multiple": false,
1440
- "type": "option"
1441
- },
1442
- "target-org": {
1443
- "aliases": [
1444
- "targetusername",
1445
- "u"
1446
- ],
1447
- "char": "o",
1448
- "deprecateAliases": true,
1449
- "name": "target-org",
1450
- "noCacheDefault": true,
1451
- "required": true,
1452
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1453
- "hasDynamicHelp": true,
1454
- "multiple": false,
1455
- "type": "option"
1456
- },
1457
- "api-version": {
1458
- "aliases": [
1459
- "apiversion"
1460
- ],
1461
- "deprecateAliases": true,
1462
- "description": "Override the api version used for api requests made by this command",
1463
- "name": "api-version",
1464
- "hasDynamicHelp": false,
1465
- "multiple": false,
1466
- "type": "option"
1467
- },
1468
- "loglevel": {
1469
- "deprecated": {
1470
- "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."
1471
- },
1472
- "hidden": true,
1473
- "name": "loglevel",
1474
- "hasDynamicHelp": false,
1475
- "multiple": false,
1476
- "type": "option"
1477
- },
1478
- "query": {
1479
- "char": "q",
1480
- "name": "query",
1481
- "required": true,
1482
- "summary": "SOQL query, or filepath of a file that contains the query, to retrieve records.",
1483
- "hasDynamicHelp": false,
1484
- "multiple": true,
1485
- "type": "option"
1486
- },
1487
- "plan": {
1488
- "char": "p",
1489
- "name": "plan",
1490
- "summary": "Generate multiple sObject tree files and a plan definition file for aggregated import.",
1491
- "allowNo": false,
1492
- "type": "boolean"
1493
- },
1494
- "prefix": {
1495
- "char": "x",
1496
- "name": "prefix",
1497
- "summary": "Prefix of generated files.",
1498
- "hasDynamicHelp": false,
1499
- "multiple": false,
1500
- "type": "option"
1501
- },
1502
- "output-dir": {
1503
- "aliases": [
1504
- "outputdir"
1505
- ],
1506
- "char": "d",
1507
- "deprecateAliases": true,
1508
- "name": "output-dir",
1509
- "summary": "Directory in which to generate the JSON files; default is current directory.",
1510
- "hasDynamicHelp": false,
1511
- "multiple": false,
1512
- "type": "option"
1513
- }
1514
- },
1515
- "hasDynamicHelp": true,
1516
- "hiddenAliases": [],
1517
- "id": "data:export:tree",
1518
- "pluginAlias": "@salesforce/plugin-data",
1519
- "pluginName": "@salesforce/plugin-data",
1520
- "pluginType": "core",
1521
- "strict": true,
1522
- "summary": "Export data from an org into one or more JSON files.",
1523
- "enableJsonFlag": true,
1524
- "isESM": true,
1525
- "relativePath": [
1526
- "lib",
1527
- "commands",
1528
- "data",
1529
- "export",
1530
- "tree.js"
1531
- ],
1532
- "aliasPermutations": [
1533
- "force:data:tree:export",
1534
- "data:force:tree:export",
1535
- "data:tree:force:export",
1536
- "data:tree:export:force",
1537
- "force:tree:data:export",
1538
- "tree:force:data:export",
1539
- "tree:data:force:export",
1540
- "tree:data:export:force",
1541
- "force:tree:export:data",
1542
- "tree:force:export:data",
1543
- "tree:export:force:data",
1544
- "tree:export:data:force",
1545
- "force:data:export:tree",
1546
- "data:force:export:tree",
1547
- "data:export:force:tree",
1548
- "data:export:tree:force",
1549
- "force:export:data:tree",
1550
- "export:force:data:tree",
1551
- "export:data:force:tree",
1552
- "export:data:tree:force",
1553
- "force:export:tree:data",
1554
- "export:force:tree:data",
1555
- "export:tree:force:data",
1556
- "export:tree:data:force"
1557
- ],
1558
- "permutations": [
1559
- "data:export:tree",
1560
- "export:data:tree",
1561
- "export:tree:data",
1562
- "data:tree:export",
1563
- "tree:data:export",
1564
- "tree:export:data"
1565
- ]
1566
- },
1567
- "data:get:record": {
1568
- "aliases": [
1569
- "force:data:record:get"
1570
- ],
1571
- "args": {},
1572
- "deprecateAliases": true,
1573
- "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.",
1574
- "examples": [
1575
- "Retrieve and display a record from Account with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 00180XX",
1576
- "Retrieve a record from Account whose name equals \"Acme\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name=Acme\"",
1577
- "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",
1578
- "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"
1575
+ "Retrieve and display a record from Account with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 00180XX",
1576
+ "Retrieve a record from Account whose name equals \"Acme\":\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name=Acme\"",
1577
+ "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",
1578
+ "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"
1579
1579
  ],
1580
1580
  "flags": {
1581
1581
  "json": {
@@ -2073,13 +2073,12 @@
2073
2073
  "tree:import:data"
2074
2074
  ]
2075
2075
  },
2076
- "data:upsert:bulk": {
2076
+ "data:update:bulk": {
2077
2077
  "aliases": [],
2078
2078
  "args": {},
2079
- "description": "An upsert refers to inserting a record into a Salesforce object if the record doesn't already exist, or updating it if it does exist.\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 and batch IDs to check the status of the job with the \"<%= config.bin %> data upsert resume\" command.\n\nSee \"Prepare CSV Files\" in the Bulk API Developer Guide for details on formatting your CSV file. (https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_prepare_csv.htm)",
2079
+ "description": "You can use this command to update millions of Salesforce object records based on 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. The first column of every line in the CSV file must be an ID of the record you want to update. The CSV file can contain only existing records; if a record in the file doesn't currently exist in the Salesforce object, the command fails. Consider using \"sf data upsert bulk\" if you also want to insert new records.\n\nBulk updates can take a while, depending on how many records are in the CSV file. If the command times out, the command displays the job ID. To see the status and get the results of the job, run \"sf data update 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).",
2080
2080
  "examples": [
2081
- "Bulk upsert records to the Contact object in your default org:\n<%= config.bin %> <%= command.id %> --sobject Contact --file files/contacts.csv --external-id Id",
2082
- "Bulk upsert records to 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/file.csv --external-id MyField__c --wait 5 --target-org my-scratch"
2081
+ "Update Account records from a CSV-formatted file into an org with alias \"my-scratch\"; if the update 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"
2083
2082
  ],
2084
2083
  "flags": {
2085
2084
  "json": {
@@ -2097,73 +2096,45 @@
2097
2096
  "multiple": false,
2098
2097
  "type": "option"
2099
2098
  },
2100
- "target-org": {
2101
- "aliases": [
2102
- "targetusername",
2103
- "u"
2104
- ],
2105
- "char": "o",
2106
- "deprecateAliases": true,
2107
- "name": "target-org",
2108
- "noCacheDefault": true,
2109
- "required": true,
2110
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
2099
+ "wait": {
2100
+ "char": "w",
2101
+ "name": "wait",
2102
+ "summary": "Time to wait for the command to finish, in minutes.",
2111
2103
  "hasDynamicHelp": true,
2112
2104
  "multiple": false,
2113
2105
  "type": "option"
2114
2106
  },
2115
- "api-version": {
2116
- "aliases": [
2117
- "apiversion"
2118
- ],
2119
- "deprecateAliases": true,
2120
- "description": "Override the api version used for api requests made by this command",
2121
- "name": "api-version",
2122
- "hasDynamicHelp": false,
2123
- "multiple": false,
2124
- "type": "option"
2125
- },
2126
- "loglevel": {
2127
- "deprecated": {
2128
- "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."
2129
- },
2130
- "hidden": true,
2131
- "name": "loglevel",
2132
- "hasDynamicHelp": false,
2133
- "multiple": false,
2134
- "type": "option"
2135
- },
2136
2107
  "file": {
2137
- "aliases": [
2138
- "csvfile"
2139
- ],
2140
2108
  "char": "f",
2141
- "deprecateAliases": true,
2142
2109
  "name": "file",
2143
2110
  "required": true,
2144
- "summary": "CSV file that contains the IDs of the records to update or delete.",
2111
+ "summary": "CSV file that contains the Salesforce object records you want to update.",
2145
2112
  "hasDynamicHelp": false,
2146
2113
  "multiple": false,
2147
2114
  "type": "option"
2148
2115
  },
2149
2116
  "sobject": {
2150
- "aliases": [
2151
- "sobjecttype"
2152
- ],
2153
2117
  "char": "s",
2154
- "deprecateAliases": true,
2155
2118
  "name": "sobject",
2156
2119
  "required": true,
2157
- "summary": "API name of the Salesforce object, either standard or custom, that you want to update or delete records from.",
2120
+ "summary": "API name of the Salesforce object, either standard or custom, which you are updating.",
2158
2121
  "hasDynamicHelp": false,
2159
2122
  "multiple": false,
2160
2123
  "type": "option"
2161
2124
  },
2162
- "wait": {
2163
- "char": "w",
2164
- "name": "wait",
2165
- "summary": "Number of minutes to wait for the command to complete before displaying the results.",
2166
- "default": "0 minutes",
2125
+ "api-version": {
2126
+ "description": "Override the api version used for api requests made by this command",
2127
+ "name": "api-version",
2128
+ "hasDynamicHelp": false,
2129
+ "multiple": false,
2130
+ "type": "option"
2131
+ },
2132
+ "target-org": {
2133
+ "char": "o",
2134
+ "name": "target-org",
2135
+ "noCacheDefault": true,
2136
+ "required": true,
2137
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
2167
2138
  "hasDynamicHelp": true,
2168
2139
  "multiple": false,
2169
2140
  "type": "option"
@@ -2196,55 +2167,47 @@
2196
2167
  "TAB"
2197
2168
  ],
2198
2169
  "type": "option"
2199
- },
2200
- "external-id": {
2201
- "aliases": [
2202
- "externalid"
2203
- ],
2204
- "char": "i",
2205
- "deprecateAliases": true,
2206
- "name": "external-id",
2207
- "required": true,
2208
- "summary": "Name of the external ID field, or the Id field.",
2209
- "hasDynamicHelp": false,
2210
- "multiple": false,
2211
- "type": "option"
2212
2170
  }
2213
2171
  },
2214
2172
  "hasDynamicHelp": true,
2215
2173
  "hiddenAliases": [],
2216
- "id": "data:upsert:bulk",
2174
+ "id": "data:update:bulk",
2217
2175
  "pluginAlias": "@salesforce/plugin-data",
2218
2176
  "pluginName": "@salesforce/plugin-data",
2219
2177
  "pluginType": "core",
2220
2178
  "strict": true,
2221
- "summary": "Bulk upsert records to an org from a CSV file. Uses Bulk API 2.0.",
2179
+ "summary": "Bulk update records to an org from a CSV file. Uses Bulk API 2.0.",
2222
2180
  "enableJsonFlag": true,
2223
2181
  "isESM": true,
2224
2182
  "relativePath": [
2225
2183
  "lib",
2226
2184
  "commands",
2227
2185
  "data",
2228
- "upsert",
2186
+ "update",
2229
2187
  "bulk.js"
2230
2188
  ],
2231
2189
  "aliasPermutations": [],
2232
2190
  "permutations": [
2233
- "data:upsert:bulk",
2234
- "upsert:data:bulk",
2235
- "upsert:bulk:data",
2236
- "data:bulk:upsert",
2237
- "bulk:data:upsert",
2238
- "bulk:upsert:data"
2191
+ "data:update:bulk",
2192
+ "update:data:bulk",
2193
+ "update:bulk:data",
2194
+ "data:bulk:update",
2195
+ "bulk:data:update",
2196
+ "bulk:update:data"
2239
2197
  ]
2240
2198
  },
2241
- "data:upsert:resume": {
2242
- "aliases": [],
2199
+ "data:update:record": {
2200
+ "aliases": [
2201
+ "force:data:record:update"
2202
+ ],
2243
2203
  "args": {},
2244
- "description": "The command uses the job ID returned from the \"<%= config.bin %> data upsert bulk\" command or the most recently-run bulk upsert job.",
2204
+ "deprecateAliases": true,
2205
+ "description": "Specify the record you want to update 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 update fails; the error displays how many records were found.\n\nWhen using field-value pairs for both identifying the record and specifiyng the new field values, 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 updates a record in Salesforce objects by default. Use the --use-tooling-api flag to update a Tooling API object.",
2245
2206
  "examples": [
2246
- "Resume a bulk upsert job from your default org using an ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
2247
- "Resume the most recently run bulk upsert job for an org with alias my-scratch:\n<%= config.bin %> <%= command.id %> --use-most-recent --target-org my-scratch"
2207
+ "Update the Name field of an Account record with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 001D0 --values \"Name=NewAcme\"",
2208
+ "Update the Name field of an Account record whose current name is 'Old Acme':\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name='Old Acme'\" --values \"Name='New Acme'\"",
2209
+ "Update the Name and Website fields of an Account record with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 001D0 --values \"Name='Acme III' Website=www.example.com\"",
2210
+ "Update the ExpirationDate field of a record of the Tooling API object TraceFlag using the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> -t --sobject TraceFlag --record-id 7tf170000009cUBAAY --values \"ExpirationDate=2017-12-01T00:58:04.000+0000\""
2248
2211
  ],
2249
2212
  "flags": {
2250
2213
  "json": {
@@ -2271,91 +2234,156 @@
2271
2234
  "deprecateAliases": true,
2272
2235
  "name": "target-org",
2273
2236
  "noCacheDefault": true,
2274
- "summary": "Username or alias of the target org. Not required if the \"target-org\" configuration variable is already set.",
2237
+ "required": true,
2238
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
2275
2239
  "hasDynamicHelp": true,
2276
2240
  "multiple": false,
2277
2241
  "type": "option"
2278
2242
  },
2279
- "job-id": {
2243
+ "api-version": {
2280
2244
  "aliases": [
2281
- "jobid"
2245
+ "apiversion"
2282
2246
  ],
2283
- "char": "i",
2284
2247
  "deprecateAliases": true,
2285
- "name": "job-id",
2286
- "summary": "ID of the job you want to resume.",
2248
+ "description": "Override the api version used for api requests made by this command",
2249
+ "name": "api-version",
2287
2250
  "hasDynamicHelp": false,
2288
2251
  "multiple": false,
2289
2252
  "type": "option"
2290
2253
  },
2291
- "use-most-recent": {
2292
- "exclusive": [
2293
- "job-id"
2254
+ "loglevel": {
2255
+ "deprecated": {
2256
+ "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."
2257
+ },
2258
+ "hidden": true,
2259
+ "name": "loglevel",
2260
+ "hasDynamicHelp": false,
2261
+ "multiple": false,
2262
+ "type": "option"
2263
+ },
2264
+ "sobject": {
2265
+ "aliases": [
2266
+ "sobjecttype"
2294
2267
  ],
2295
- "name": "use-most-recent",
2296
- "summary": "Use the ID of the most recently-run bulk job.",
2297
- "allowNo": false,
2298
- "type": "boolean"
2268
+ "char": "s",
2269
+ "deprecateAliases": true,
2270
+ "name": "sobject",
2271
+ "required": true,
2272
+ "summary": "API name of the Salesforce or Tooling API object that contains the record you're updating.",
2273
+ "hasDynamicHelp": false,
2274
+ "multiple": false,
2275
+ "type": "option"
2299
2276
  },
2300
- "wait": {
2301
- "name": "wait",
2302
- "summary": "Number of minutes to wait for the command to complete before displaying the results.",
2303
- "default": "5 minutes",
2304
- "hasDynamicHelp": true,
2277
+ "record-id": {
2278
+ "aliases": [
2279
+ "sobjectid"
2280
+ ],
2281
+ "char": "i",
2282
+ "deprecateAliases": true,
2283
+ "name": "record-id",
2284
+ "summary": "ID of the record you’re updating.",
2285
+ "hasDynamicHelp": false,
2305
2286
  "multiple": false,
2306
2287
  "type": "option"
2307
2288
  },
2308
- "api-version": {
2309
- "description": "Override the api version used for api requests made by this command",
2310
- "name": "api-version",
2289
+ "where": {
2290
+ "char": "w",
2291
+ "name": "where",
2292
+ "summary": "List of <fieldName>=<value> pairs that identify the record you want to update.",
2311
2293
  "hasDynamicHelp": false,
2312
2294
  "multiple": false,
2313
2295
  "type": "option"
2314
2296
  },
2315
- "loglevel": {
2316
- "deprecated": {
2317
- "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."
2318
- },
2319
- "hidden": true,
2320
- "name": "loglevel",
2297
+ "values": {
2298
+ "char": "v",
2299
+ "name": "values",
2300
+ "required": true,
2301
+ "summary": "Fields that you're updating, in the format of <fieldName>=<value> pairs.",
2321
2302
  "hasDynamicHelp": false,
2322
2303
  "multiple": false,
2323
2304
  "type": "option"
2305
+ },
2306
+ "use-tooling-api": {
2307
+ "aliases": [
2308
+ "usetoolingapi"
2309
+ ],
2310
+ "char": "t",
2311
+ "deprecateAliases": true,
2312
+ "name": "use-tooling-api",
2313
+ "summary": "Use Tooling API so you can update a record in a Tooling API object.",
2314
+ "allowNo": false,
2315
+ "type": "boolean"
2316
+ },
2317
+ "perflog": {
2318
+ "deprecated": {
2319
+ "version": "57"
2320
+ },
2321
+ "hidden": true,
2322
+ "name": "perflog",
2323
+ "summary": "Get API performance data.",
2324
+ "allowNo": false,
2325
+ "type": "boolean"
2324
2326
  }
2325
2327
  },
2326
2328
  "hasDynamicHelp": true,
2327
2329
  "hiddenAliases": [],
2328
- "id": "data:upsert:resume",
2330
+ "id": "data:update:record",
2329
2331
  "pluginAlias": "@salesforce/plugin-data",
2330
2332
  "pluginName": "@salesforce/plugin-data",
2331
2333
  "pluginType": "core",
2332
2334
  "strict": true,
2333
- "summary": "Resume a bulk upsert job that you previously started. Uses Bulk API 2.0.",
2335
+ "summary": "Updates a single record of a Salesforce or Tooling API object.",
2334
2336
  "enableJsonFlag": true,
2335
2337
  "isESM": true,
2336
2338
  "relativePath": [
2337
2339
  "lib",
2338
2340
  "commands",
2339
2341
  "data",
2340
- "upsert",
2341
- "resume.js"
2342
+ "update",
2343
+ "record.js"
2344
+ ],
2345
+ "aliasPermutations": [
2346
+ "force:data:record:update",
2347
+ "data:force:record:update",
2348
+ "data:record:force:update",
2349
+ "data:record:update:force",
2350
+ "force:record:data:update",
2351
+ "record:force:data:update",
2352
+ "record:data:force:update",
2353
+ "record:data:update:force",
2354
+ "force:record:update:data",
2355
+ "record:force:update:data",
2356
+ "record:update:force:data",
2357
+ "record:update:data:force",
2358
+ "force:data:update:record",
2359
+ "data:force:update:record",
2360
+ "data:update:force:record",
2361
+ "data:update:record:force",
2362
+ "force:update:data:record",
2363
+ "update:force:data:record",
2364
+ "update:data:force:record",
2365
+ "update:data:record:force",
2366
+ "force:update:record:data",
2367
+ "update:force:record:data",
2368
+ "update:record:force:data",
2369
+ "update:record:data:force"
2342
2370
  ],
2343
- "aliasPermutations": [],
2344
2371
  "permutations": [
2345
- "data:upsert:resume",
2346
- "upsert:data:resume",
2347
- "upsert:resume:data",
2348
- "data:resume:upsert",
2349
- "resume:data:upsert",
2350
- "resume:upsert:data"
2372
+ "data:update:record",
2373
+ "update:data:record",
2374
+ "update:record:data",
2375
+ "data:record:update",
2376
+ "record:data:update",
2377
+ "record:update:data"
2351
2378
  ]
2352
2379
  },
2353
- "data:update:bulk": {
2380
+ "data:update:resume": {
2354
2381
  "aliases": [],
2355
2382
  "args": {},
2356
- "description": "You can use this command to update millions of Salesforce object records based on 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. The first column of every line in the CSV file must be an ID of the record you want to update. The CSV file can contain only existing records; if a record in the file doesn't currently exist in the Salesforce object, the command fails. Consider using \"sf data upsert bulk\" if you also want to insert new records.\n\nBulk updates can take a while, depending on how many records are in the CSV file. If the command times out, the command displays the job ID. To see the status and get the results of the job, run \"sf data update 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).",
2383
+ "description": "When the original \"sf data update bulk\" command times out, it displays a job ID. To see the status and get the results of the bulk update, run this command by either passing it the job ID or using the --use-most-recent flag to specify the most recent bulk update job.\n\nUsing either `--job-id` or `--use-most-recent` will properly resolve to the correct org where the bulk job was started based on the cached data by \"data update bulk\".",
2357
2384
  "examples": [
2358
- "Update Account records from a CSV-formatted file into an org with alias \"my-scratch\"; if the update 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"
2385
+ "Resume a bulk update job using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
2386
+ "Resume the most recently run bulk update job:\n<%= config.bin %> <%= command.id %> --use-most-recent"
2359
2387
  ],
2360
2388
  "flags": {
2361
2389
  "json": {
@@ -2373,87 +2401,38 @@
2373
2401
  "multiple": false,
2374
2402
  "type": "option"
2375
2403
  },
2376
- "wait": {
2377
- "char": "w",
2378
- "name": "wait",
2379
- "summary": "Time to wait for the command to finish, in minutes.",
2380
- "hasDynamicHelp": true,
2381
- "multiple": false,
2382
- "type": "option"
2383
- },
2384
- "file": {
2385
- "char": "f",
2386
- "name": "file",
2387
- "required": true,
2388
- "summary": "CSV file that contains the Salesforce object records you want to update.",
2389
- "hasDynamicHelp": false,
2390
- "multiple": false,
2391
- "type": "option"
2392
- },
2393
- "sobject": {
2394
- "char": "s",
2395
- "name": "sobject",
2396
- "required": true,
2397
- "summary": "API name of the Salesforce object, either standard or custom, which you are updating.",
2398
- "hasDynamicHelp": false,
2399
- "multiple": false,
2400
- "type": "option"
2401
- },
2402
- "api-version": {
2403
- "description": "Override the api version used for api requests made by this command",
2404
- "name": "api-version",
2405
- "hasDynamicHelp": false,
2406
- "multiple": false,
2407
- "type": "option"
2408
- },
2409
- "target-org": {
2410
- "char": "o",
2411
- "name": "target-org",
2412
- "noCacheDefault": true,
2413
- "required": true,
2414
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
2415
- "hasDynamicHelp": true,
2416
- "multiple": false,
2417
- "type": "option"
2404
+ "use-most-recent": {
2405
+ "name": "use-most-recent",
2406
+ "summary": "Use the job ID of the bulk update job that was most recently run.",
2407
+ "allowNo": false,
2408
+ "type": "boolean"
2418
2409
  },
2419
- "line-ending": {
2420
- "dependsOn": [
2421
- "file"
2422
- ],
2423
- "name": "line-ending",
2424
- "summary": "Line ending used in the CSV file. Default value on Windows is `CRLF`; on macOS and Linux it's `LF`.",
2410
+ "job-id": {
2411
+ "char": "i",
2412
+ "name": "job-id",
2413
+ "summary": "Job ID of the bulk update.",
2425
2414
  "hasDynamicHelp": false,
2426
2415
  "multiple": false,
2427
- "options": [
2428
- "CRLF",
2429
- "LF"
2430
- ],
2431
2416
  "type": "option"
2432
2417
  },
2433
- "column-delimiter": {
2434
- "name": "column-delimiter",
2435
- "summary": "Column delimiter used in the CSV file.",
2436
- "hasDynamicHelp": false,
2418
+ "wait": {
2419
+ "char": "w",
2420
+ "name": "wait",
2421
+ "summary": "Time to wait for the command to finish, in minutes.",
2422
+ "default": "5 minutes",
2423
+ "hasDynamicHelp": true,
2437
2424
  "multiple": false,
2438
- "options": [
2439
- "BACKQUOTE",
2440
- "CARET",
2441
- "COMMA",
2442
- "PIPE",
2443
- "SEMICOLON",
2444
- "TAB"
2445
- ],
2446
2425
  "type": "option"
2447
2426
  }
2448
2427
  },
2449
2428
  "hasDynamicHelp": true,
2450
2429
  "hiddenAliases": [],
2451
- "id": "data:update:bulk",
2430
+ "id": "data:update:resume",
2452
2431
  "pluginAlias": "@salesforce/plugin-data",
2453
2432
  "pluginName": "@salesforce/plugin-data",
2454
2433
  "pluginType": "core",
2455
2434
  "strict": true,
2456
- "summary": "Bulk update records to an org from a CSV file. Uses Bulk API 2.0.",
2435
+ "summary": "Resume a bulk update job that you previously started. Uses Bulk API 2.0.",
2457
2436
  "enableJsonFlag": true,
2458
2437
  "isESM": true,
2459
2438
  "relativePath": [
@@ -2461,30 +2440,25 @@
2461
2440
  "commands",
2462
2441
  "data",
2463
2442
  "update",
2464
- "bulk.js"
2443
+ "resume.js"
2465
2444
  ],
2466
2445
  "aliasPermutations": [],
2467
2446
  "permutations": [
2468
- "data:update:bulk",
2469
- "update:data:bulk",
2470
- "update:bulk:data",
2471
- "data:bulk:update",
2472
- "bulk:data:update",
2473
- "bulk:update:data"
2447
+ "data:update:resume",
2448
+ "update:data:resume",
2449
+ "update:resume:data",
2450
+ "data:resume:update",
2451
+ "resume:data:update",
2452
+ "resume:update:data"
2474
2453
  ]
2475
2454
  },
2476
- "data:update:record": {
2477
- "aliases": [
2478
- "force:data:record:update"
2479
- ],
2455
+ "data:upsert:bulk": {
2456
+ "aliases": [],
2480
2457
  "args": {},
2481
- "deprecateAliases": true,
2482
- "description": "Specify the record you want to update 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 update fails; the error displays how many records were found.\n\nWhen using field-value pairs for both identifying the record and specifiyng the new field values, 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 updates a record in Salesforce objects by default. Use the --use-tooling-api flag to update a Tooling API object.",
2458
+ "description": "An upsert refers to inserting a record into a Salesforce object if the record doesn't already exist, or updating it if it does exist.\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 and batch IDs to check the status of the job with the \"<%= config.bin %> data upsert resume\" command.\n\nSee \"Prepare CSV Files\" in the Bulk API Developer Guide for details on formatting your CSV file. (https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_prepare_csv.htm)",
2483
2459
  "examples": [
2484
- "Update the Name field of an Account record with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 001D0 --values \"Name=NewAcme\"",
2485
- "Update the Name field of an Account record whose current name is 'Old Acme':\n<%= config.bin %> <%= command.id %> --sobject Account --where \"Name='Old Acme'\" --values \"Name='New Acme'\"",
2486
- "Update the Name and Website fields of an Account record with the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> --sobject Account --record-id 001D0 --values \"Name='Acme III' Website=www.example.com\"",
2487
- "Update the ExpirationDate field of a record of the Tooling API object TraceFlag using the specified (truncated) ID:\n<%= config.bin %> <%= command.id %> -t --sobject TraceFlag --record-id 7tf170000009cUBAAY --values \"ExpirationDate=2017-12-01T00:58:04.000+0000\""
2460
+ "Bulk upsert records to the Contact object in your default org:\n<%= config.bin %> <%= command.id %> --sobject Contact --file files/contacts.csv --external-id Id",
2461
+ "Bulk upsert records to 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/file.csv --external-id MyField__c --wait 5 --target-org my-scratch"
2488
2462
  ],
2489
2463
  "flags": {
2490
2464
  "json": {
@@ -2538,129 +2512,118 @@
2538
2512
  "multiple": false,
2539
2513
  "type": "option"
2540
2514
  },
2541
- "sobject": {
2515
+ "file": {
2542
2516
  "aliases": [
2543
- "sobjecttype"
2517
+ "csvfile"
2544
2518
  ],
2545
- "char": "s",
2519
+ "char": "f",
2546
2520
  "deprecateAliases": true,
2547
- "name": "sobject",
2521
+ "name": "file",
2548
2522
  "required": true,
2549
- "summary": "API name of the Salesforce or Tooling API object that contains the record you're updating.",
2523
+ "summary": "CSV file that contains the IDs of the records to update or delete.",
2550
2524
  "hasDynamicHelp": false,
2551
2525
  "multiple": false,
2552
2526
  "type": "option"
2553
2527
  },
2554
- "record-id": {
2528
+ "sobject": {
2555
2529
  "aliases": [
2556
- "sobjectid"
2530
+ "sobjecttype"
2557
2531
  ],
2558
- "char": "i",
2532
+ "char": "s",
2559
2533
  "deprecateAliases": true,
2560
- "name": "record-id",
2561
- "summary": "ID of the record you’re updating.",
2534
+ "name": "sobject",
2535
+ "required": true,
2536
+ "summary": "API name of the Salesforce object, either standard or custom, that you want to update or delete records from.",
2562
2537
  "hasDynamicHelp": false,
2563
2538
  "multiple": false,
2564
2539
  "type": "option"
2565
2540
  },
2566
- "where": {
2541
+ "wait": {
2567
2542
  "char": "w",
2568
- "name": "where",
2569
- "summary": "List of <fieldName>=<value> pairs that identify the record you want to update.",
2543
+ "name": "wait",
2544
+ "summary": "Number of minutes to wait for the command to complete before displaying the results.",
2545
+ "default": "0 minutes",
2546
+ "hasDynamicHelp": true,
2547
+ "multiple": false,
2548
+ "type": "option"
2549
+ },
2550
+ "line-ending": {
2551
+ "dependsOn": [
2552
+ "file"
2553
+ ],
2554
+ "name": "line-ending",
2555
+ "summary": "Line ending used in the CSV file. Default value on Windows is `CRLF`; on macOS and Linux it's `LF`.",
2570
2556
  "hasDynamicHelp": false,
2571
2557
  "multiple": false,
2558
+ "options": [
2559
+ "CRLF",
2560
+ "LF"
2561
+ ],
2572
2562
  "type": "option"
2573
2563
  },
2574
- "values": {
2575
- "char": "v",
2576
- "name": "values",
2577
- "required": true,
2578
- "summary": "Fields that you're updating, in the format of <fieldName>=<value> pairs.",
2564
+ "column-delimiter": {
2565
+ "name": "column-delimiter",
2566
+ "summary": "Column delimiter used in the CSV file.",
2579
2567
  "hasDynamicHelp": false,
2580
2568
  "multiple": false,
2569
+ "options": [
2570
+ "BACKQUOTE",
2571
+ "CARET",
2572
+ "COMMA",
2573
+ "PIPE",
2574
+ "SEMICOLON",
2575
+ "TAB"
2576
+ ],
2581
2577
  "type": "option"
2582
2578
  },
2583
- "use-tooling-api": {
2579
+ "external-id": {
2584
2580
  "aliases": [
2585
- "usetoolingapi"
2581
+ "externalid"
2586
2582
  ],
2587
- "char": "t",
2583
+ "char": "i",
2588
2584
  "deprecateAliases": true,
2589
- "name": "use-tooling-api",
2590
- "summary": "Use Tooling API so you can update a record in a Tooling API object.",
2591
- "allowNo": false,
2592
- "type": "boolean"
2593
- },
2594
- "perflog": {
2595
- "deprecated": {
2596
- "version": "57"
2597
- },
2598
- "hidden": true,
2599
- "name": "perflog",
2600
- "summary": "Get API performance data.",
2601
- "allowNo": false,
2602
- "type": "boolean"
2585
+ "name": "external-id",
2586
+ "required": true,
2587
+ "summary": "Name of the external ID field, or the Id field.",
2588
+ "hasDynamicHelp": false,
2589
+ "multiple": false,
2590
+ "type": "option"
2603
2591
  }
2604
2592
  },
2605
2593
  "hasDynamicHelp": true,
2606
2594
  "hiddenAliases": [],
2607
- "id": "data:update:record",
2595
+ "id": "data:upsert:bulk",
2608
2596
  "pluginAlias": "@salesforce/plugin-data",
2609
2597
  "pluginName": "@salesforce/plugin-data",
2610
2598
  "pluginType": "core",
2611
2599
  "strict": true,
2612
- "summary": "Updates a single record of a Salesforce or Tooling API object.",
2600
+ "summary": "Bulk upsert records to an org from a CSV file. Uses Bulk API 2.0.",
2613
2601
  "enableJsonFlag": true,
2614
2602
  "isESM": true,
2615
2603
  "relativePath": [
2616
2604
  "lib",
2617
2605
  "commands",
2618
2606
  "data",
2619
- "update",
2620
- "record.js"
2621
- ],
2622
- "aliasPermutations": [
2623
- "force:data:record:update",
2624
- "data:force:record:update",
2625
- "data:record:force:update",
2626
- "data:record:update:force",
2627
- "force:record:data:update",
2628
- "record:force:data:update",
2629
- "record:data:force:update",
2630
- "record:data:update:force",
2631
- "force:record:update:data",
2632
- "record:force:update:data",
2633
- "record:update:force:data",
2634
- "record:update:data:force",
2635
- "force:data:update:record",
2636
- "data:force:update:record",
2637
- "data:update:force:record",
2638
- "data:update:record:force",
2639
- "force:update:data:record",
2640
- "update:force:data:record",
2641
- "update:data:force:record",
2642
- "update:data:record:force",
2643
- "force:update:record:data",
2644
- "update:force:record:data",
2645
- "update:record:force:data",
2646
- "update:record:data:force"
2607
+ "upsert",
2608
+ "bulk.js"
2647
2609
  ],
2610
+ "aliasPermutations": [],
2648
2611
  "permutations": [
2649
- "data:update:record",
2650
- "update:data:record",
2651
- "update:record:data",
2652
- "data:record:update",
2653
- "record:data:update",
2654
- "record:update:data"
2612
+ "data:upsert:bulk",
2613
+ "upsert:data:bulk",
2614
+ "upsert:bulk:data",
2615
+ "data:bulk:upsert",
2616
+ "bulk:data:upsert",
2617
+ "bulk:upsert:data"
2655
2618
  ]
2656
2619
  },
2657
- "data:update:resume": {
2620
+ "data:upsert:resume": {
2658
2621
  "aliases": [],
2659
2622
  "args": {},
2660
- "description": "When the original \"sf data update bulk\" command times out, it displays a job ID. To see the status and get the results of the bulk update, run this command by either passing it the job ID or using the --use-most-recent flag to specify the most recent bulk update job.\n\nUsing either `--job-id` or `--use-most-recent` will properly resolve to the correct org where the bulk job was started based on the cached data by \"data update bulk\".",
2623
+ "description": "The command uses the job ID returned from the \"<%= config.bin %> data upsert bulk\" command or the most recently-run bulk upsert job.",
2661
2624
  "examples": [
2662
- "Resume a bulk update job using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
2663
- "Resume the most recently run bulk update job:\n<%= config.bin %> <%= command.id %> --use-most-recent"
2625
+ "Resume a bulk upsert job from your default org using an ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
2626
+ "Resume the most recently run bulk upsert job for an org with alias my-scratch:\n<%= config.bin %> <%= command.id %> --use-most-recent --target-org my-scratch"
2664
2627
  ],
2665
2628
  "flags": {
2666
2629
  "json": {
@@ -2678,55 +2641,92 @@
2678
2641
  "multiple": false,
2679
2642
  "type": "option"
2680
2643
  },
2681
- "use-most-recent": {
2682
- "name": "use-most-recent",
2683
- "summary": "Use the job ID of the bulk update job that was most recently run.",
2684
- "allowNo": false,
2685
- "type": "boolean"
2644
+ "target-org": {
2645
+ "aliases": [
2646
+ "targetusername",
2647
+ "u"
2648
+ ],
2649
+ "char": "o",
2650
+ "deprecateAliases": true,
2651
+ "name": "target-org",
2652
+ "noCacheDefault": true,
2653
+ "summary": "Username or alias of the target org. Not required if the \"target-org\" configuration variable is already set.",
2654
+ "hasDynamicHelp": true,
2655
+ "multiple": false,
2656
+ "type": "option"
2686
2657
  },
2687
2658
  "job-id": {
2659
+ "aliases": [
2660
+ "jobid"
2661
+ ],
2688
2662
  "char": "i",
2663
+ "deprecateAliases": true,
2689
2664
  "name": "job-id",
2690
- "summary": "Job ID of the bulk update.",
2665
+ "summary": "ID of the job you want to resume.",
2691
2666
  "hasDynamicHelp": false,
2692
2667
  "multiple": false,
2693
2668
  "type": "option"
2694
2669
  },
2670
+ "use-most-recent": {
2671
+ "exclusive": [
2672
+ "job-id"
2673
+ ],
2674
+ "name": "use-most-recent",
2675
+ "summary": "Use the ID of the most recently-run bulk job.",
2676
+ "allowNo": false,
2677
+ "type": "boolean"
2678
+ },
2695
2679
  "wait": {
2696
- "char": "w",
2697
2680
  "name": "wait",
2698
- "summary": "Time to wait for the command to finish, in minutes.",
2681
+ "summary": "Number of minutes to wait for the command to complete before displaying the results.",
2699
2682
  "default": "5 minutes",
2700
2683
  "hasDynamicHelp": true,
2701
2684
  "multiple": false,
2702
2685
  "type": "option"
2686
+ },
2687
+ "api-version": {
2688
+ "description": "Override the api version used for api requests made by this command",
2689
+ "name": "api-version",
2690
+ "hasDynamicHelp": false,
2691
+ "multiple": false,
2692
+ "type": "option"
2693
+ },
2694
+ "loglevel": {
2695
+ "deprecated": {
2696
+ "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."
2697
+ },
2698
+ "hidden": true,
2699
+ "name": "loglevel",
2700
+ "hasDynamicHelp": false,
2701
+ "multiple": false,
2702
+ "type": "option"
2703
2703
  }
2704
2704
  },
2705
2705
  "hasDynamicHelp": true,
2706
2706
  "hiddenAliases": [],
2707
- "id": "data:update:resume",
2707
+ "id": "data:upsert:resume",
2708
2708
  "pluginAlias": "@salesforce/plugin-data",
2709
2709
  "pluginName": "@salesforce/plugin-data",
2710
2710
  "pluginType": "core",
2711
2711
  "strict": true,
2712
- "summary": "Resume a bulk update job that you previously started. Uses Bulk API 2.0.",
2712
+ "summary": "Resume a bulk upsert job that you previously started. Uses Bulk API 2.0.",
2713
2713
  "enableJsonFlag": true,
2714
2714
  "isESM": true,
2715
2715
  "relativePath": [
2716
2716
  "lib",
2717
2717
  "commands",
2718
2718
  "data",
2719
- "update",
2719
+ "upsert",
2720
2720
  "resume.js"
2721
2721
  ],
2722
2722
  "aliasPermutations": [],
2723
2723
  "permutations": [
2724
- "data:update:resume",
2725
- "update:data:resume",
2726
- "update:resume:data",
2727
- "data:resume:update",
2728
- "resume:data:update",
2729
- "resume:update:data"
2724
+ "data:upsert:resume",
2725
+ "upsert:data:resume",
2726
+ "upsert:resume:data",
2727
+ "data:resume:upsert",
2728
+ "resume:data:upsert",
2729
+ "resume:upsert:data"
2730
2730
  ]
2731
2731
  },
2732
2732
  "force:data:bulk:delete": {
@@ -3166,5 +3166,5 @@
3166
3166
  ]
3167
3167
  }
3168
3168
  },
3169
- "version": "4.0.86"
3169
+ "version": "4.0.87"
3170
3170
  }