@salesforce/plugin-data 4.0.51 → 4.0.53

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.
@@ -823,9 +823,6 @@
823
823
  },
824
824
  "wait": {
825
825
  "char": "w",
826
- "exclusive": [
827
- "async"
828
- ],
829
826
  "name": "wait",
830
827
  "summary": "Number of minutes to wait for the command to complete before displaying the results.",
831
828
  "default": "0 minutes",
@@ -833,17 +830,6 @@
833
830
  "multiple": false,
834
831
  "type": "option"
835
832
  },
836
- "async": {
837
- "char": "a",
838
- "deprecated": true,
839
- "exclusive": [
840
- "wait"
841
- ],
842
- "name": "async",
843
- "summary": "Run the command asynchronously.",
844
- "allowNo": false,
845
- "type": "boolean"
846
- },
847
833
  "line-ending": {
848
834
  "dependsOn": [
849
835
  "file"
@@ -1182,11 +1168,10 @@
1182
1168
  "data:export:bulk": {
1183
1169
  "aliases": [],
1184
1170
  "args": {},
1185
- "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).",
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).",
1186
1172
  "examples": [
1187
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",
1188
- "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",
1189
- "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"
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"
1190
1175
  ],
1191
1176
  "flags": {
1192
1177
  "json": {
@@ -1223,9 +1208,6 @@
1223
1208
  },
1224
1209
  "wait": {
1225
1210
  "char": "w",
1226
- "exclusive": [
1227
- "async"
1228
- ],
1229
1211
  "name": "wait",
1230
1212
  "summary": "Time to wait for the command to finish, in minutes.",
1231
1213
  "hasDynamicHelp": true,
@@ -1233,16 +1215,6 @@
1233
1215
  "multiple": false,
1234
1216
  "type": "option"
1235
1217
  },
1236
- "async": {
1237
- "deprecated": true,
1238
- "exclusive": [
1239
- "wait"
1240
- ],
1241
- "name": "async",
1242
- "summary": "Don't wait for the job to complete.",
1243
- "allowNo": false,
1244
- "type": "boolean"
1245
- },
1246
1218
  "query": {
1247
1219
  "char": "q",
1248
1220
  "exclusive": [
@@ -1369,7 +1341,7 @@
1369
1341
  "data:export:resume": {
1370
1342
  "aliases": [],
1371
1343
  "args": {},
1372
- "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.\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\".",
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\".",
1373
1345
  "examples": [
1374
1346
  "Resume a bulk export job run by specifying a job ID:\nsf <%= command.id %> --job-id 750xx000000005sAAA",
1375
1347
  "Resume the most recently-run bulk export job:\nsf data export resume --use-most-recent"
@@ -1765,13 +1737,12 @@
1765
1737
  "record:get:data"
1766
1738
  ]
1767
1739
  },
1768
- "data:update:bulk": {
1740
+ "data:import:bulk": {
1769
1741
  "aliases": [],
1770
1742
  "args": {},
1771
- "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, 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 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).",
1743
+ "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, 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).",
1772
1744
  "examples": [
1773
- "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",
1774
- "Update asynchronously and use the default org; the command immediately returns a job ID that you then pass to the \"sf data update resume\" command:\n<%= config.bin %> <%= command.id %> --file accounts.csv --sobject Account --async"
1745
+ "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"
1775
1746
  ],
1776
1747
  "flags": {
1777
1748
  "json": {
@@ -1789,27 +1760,11 @@
1789
1760
  "multiple": false,
1790
1761
  "type": "option"
1791
1762
  },
1792
- "async": {
1793
- "char": "a",
1794
- "deprecated": true,
1795
- "name": "async",
1796
- "summary": "Don't wait for the command to complete.",
1797
- "allowNo": false,
1798
- "type": "boolean"
1799
- },
1800
- "wait": {
1801
- "char": "w",
1802
- "name": "wait",
1803
- "summary": "Time to wait for the command to finish, in minutes.",
1804
- "hasDynamicHelp": true,
1805
- "multiple": false,
1806
- "type": "option"
1807
- },
1808
1763
  "file": {
1809
1764
  "char": "f",
1810
1765
  "name": "file",
1811
1766
  "required": true,
1812
- "summary": "CSV file that contains the Salesforce object records you want to update.",
1767
+ "summary": "CSV file that contains the Salesforce object records you want to import.",
1813
1768
  "hasDynamicHelp": false,
1814
1769
  "multiple": false,
1815
1770
  "type": "option"
@@ -1818,7 +1773,7 @@
1818
1773
  "char": "s",
1819
1774
  "name": "sobject",
1820
1775
  "required": true,
1821
- "summary": "API name of the Salesforce object, either standard or custom, which you are updating.",
1776
+ "summary": "API name of the Salesforce object, either standard or custom, into which you're importing records.",
1822
1777
  "hasDynamicHelp": false,
1823
1778
  "multiple": false,
1824
1779
  "type": "option"
@@ -1830,6 +1785,14 @@
1830
1785
  "multiple": false,
1831
1786
  "type": "option"
1832
1787
  },
1788
+ "wait": {
1789
+ "char": "w",
1790
+ "name": "wait",
1791
+ "summary": "Time to wait for the command to finish, in minutes.",
1792
+ "hasDynamicHelp": true,
1793
+ "multiple": false,
1794
+ "type": "option"
1795
+ },
1833
1796
  "target-org": {
1834
1797
  "char": "o",
1835
1798
  "name": "target-org",
@@ -1872,43 +1835,116 @@
1872
1835
  },
1873
1836
  "hasDynamicHelp": true,
1874
1837
  "hiddenAliases": [],
1875
- "id": "data:update:bulk",
1838
+ "id": "data:import:bulk",
1876
1839
  "pluginAlias": "@salesforce/plugin-data",
1877
1840
  "pluginName": "@salesforce/plugin-data",
1878
1841
  "pluginType": "core",
1879
1842
  "strict": true,
1880
- "summary": "Bulk update records to an org from a CSV file. Uses Bulk API 2.0.",
1843
+ "summary": "Bulk import records into a Salesforce object from a CSV file. Uses Bulk API 2.0.",
1881
1844
  "enableJsonFlag": true,
1882
1845
  "isESM": true,
1883
1846
  "relativePath": [
1884
1847
  "lib",
1885
1848
  "commands",
1886
1849
  "data",
1887
- "update",
1850
+ "import",
1888
1851
  "bulk.js"
1889
1852
  ],
1890
1853
  "aliasPermutations": [],
1891
1854
  "permutations": [
1892
- "data:update:bulk",
1893
- "update:data:bulk",
1894
- "update:bulk:data",
1895
- "data:bulk:update",
1896
- "bulk:data:update",
1897
- "bulk:update:data"
1855
+ "data:import:bulk",
1856
+ "import:data:bulk",
1857
+ "import:bulk:data",
1858
+ "data:bulk:import",
1859
+ "bulk:data:import",
1860
+ "bulk:import:data"
1898
1861
  ]
1899
1862
  },
1900
- "data:update:record": {
1863
+ "data:import:resume": {
1864
+ "aliases": [],
1865
+ "args": {},
1866
+ "description": "When the original \"sf data import bulk\" command times out, 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.",
1867
+ "examples": [
1868
+ "Resume a bulk import job to your default org using an ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
1869
+ "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"
1870
+ ],
1871
+ "flags": {
1872
+ "json": {
1873
+ "description": "Format output as json.",
1874
+ "helpGroup": "GLOBAL",
1875
+ "name": "json",
1876
+ "allowNo": false,
1877
+ "type": "boolean"
1878
+ },
1879
+ "flags-dir": {
1880
+ "helpGroup": "GLOBAL",
1881
+ "name": "flags-dir",
1882
+ "summary": "Import flag values from a directory.",
1883
+ "hasDynamicHelp": false,
1884
+ "multiple": false,
1885
+ "type": "option"
1886
+ },
1887
+ "use-most-recent": {
1888
+ "name": "use-most-recent",
1889
+ "summary": "Use the job ID of the bulk import job that was most recently run.",
1890
+ "allowNo": false,
1891
+ "type": "boolean"
1892
+ },
1893
+ "job-id": {
1894
+ "char": "i",
1895
+ "name": "job-id",
1896
+ "summary": "Job ID of the bulk import.",
1897
+ "hasDynamicHelp": false,
1898
+ "multiple": false,
1899
+ "type": "option"
1900
+ },
1901
+ "wait": {
1902
+ "char": "w",
1903
+ "name": "wait",
1904
+ "summary": "Time to wait for the command to finish, in minutes.",
1905
+ "default": "5 minutes",
1906
+ "hasDynamicHelp": true,
1907
+ "multiple": false,
1908
+ "type": "option"
1909
+ }
1910
+ },
1911
+ "hasDynamicHelp": true,
1912
+ "hiddenAliases": [],
1913
+ "id": "data:import:resume",
1914
+ "pluginAlias": "@salesforce/plugin-data",
1915
+ "pluginName": "@salesforce/plugin-data",
1916
+ "pluginType": "core",
1917
+ "strict": true,
1918
+ "summary": "Resume a bulk import job that you previously started. Uses Bulk API 2.0.",
1919
+ "enableJsonFlag": true,
1920
+ "isESM": true,
1921
+ "relativePath": [
1922
+ "lib",
1923
+ "commands",
1924
+ "data",
1925
+ "import",
1926
+ "resume.js"
1927
+ ],
1928
+ "aliasPermutations": [],
1929
+ "permutations": [
1930
+ "data:import:resume",
1931
+ "import:data:resume",
1932
+ "import:resume:data",
1933
+ "data:resume:import",
1934
+ "resume:data:import",
1935
+ "resume:import:data"
1936
+ ]
1937
+ },
1938
+ "data:import:tree": {
1901
1939
  "aliases": [
1902
- "force:data:record:update"
1940
+ "force:data:tree:import"
1903
1941
  ],
1904
1942
  "args": {},
1905
1943
  "deprecateAliases": true,
1906
- "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.",
1944
+ "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.",
1907
1945
  "examples": [
1908
- "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\"",
1909
- "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'\"",
1910
- "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\"",
1911
- "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\""
1946
+ "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",
1947
+ "Import records using a plan definition file into your default org:\n<%= config.bin %> <%= command.id %> --plan Account-Contact-plan.json"
1912
1948
  ],
1913
1949
  "flags": {
1914
1950
  "json": {
@@ -1962,204 +1998,87 @@
1962
1998
  "multiple": false,
1963
1999
  "type": "option"
1964
2000
  },
1965
- "sobject": {
1966
- "aliases": [
1967
- "sobjecttype"
1968
- ],
1969
- "char": "s",
1970
- "deprecateAliases": true,
1971
- "name": "sobject",
1972
- "required": true,
1973
- "summary": "API name of the Salesforce or Tooling API object that contains the record you're updating.",
1974
- "hasDynamicHelp": false,
1975
- "multiple": false,
1976
- "type": "option"
1977
- },
1978
- "record-id": {
2001
+ "files": {
1979
2002
  "aliases": [
1980
- "sobjectid"
2003
+ "sobjecttreefiles"
1981
2004
  ],
1982
- "char": "i",
2005
+ "char": "f",
1983
2006
  "deprecateAliases": true,
1984
- "name": "record-id",
1985
- "summary": "ID of the record you’re updating.",
1986
- "hasDynamicHelp": false,
1987
- "multiple": false,
1988
- "type": "option"
1989
- },
1990
- "where": {
1991
- "char": "w",
1992
- "name": "where",
1993
- "summary": "List of <fieldName>=<value> pairs that identify the record you want to update.",
2007
+ "name": "files",
2008
+ "summary": "Comma-separated and in-order JSON files that contain the records, in sObject tree format, that you want to insert.",
2009
+ "delimiter": ",",
1994
2010
  "hasDynamicHelp": false,
1995
- "multiple": false,
2011
+ "multiple": true,
1996
2012
  "type": "option"
1997
2013
  },
1998
- "values": {
1999
- "char": "v",
2000
- "name": "values",
2001
- "required": true,
2002
- "summary": "Fields that you're updating, in the format of <fieldName>=<value> pairs.",
2014
+ "plan": {
2015
+ "char": "p",
2016
+ "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",
2017
+ "name": "plan",
2018
+ "summary": "Plan definition file to insert multiple data files.",
2003
2019
  "hasDynamicHelp": false,
2004
2020
  "multiple": false,
2005
2021
  "type": "option"
2006
- },
2007
- "use-tooling-api": {
2008
- "aliases": [
2009
- "usetoolingapi"
2010
- ],
2011
- "char": "t",
2012
- "deprecateAliases": true,
2013
- "name": "use-tooling-api",
2014
- "summary": "Use Tooling API so you can update a record in a Tooling API object.",
2015
- "allowNo": false,
2016
- "type": "boolean"
2017
- },
2018
- "perflog": {
2019
- "deprecated": {
2020
- "version": "57"
2021
- },
2022
- "hidden": true,
2023
- "name": "perflog",
2024
- "summary": "Get API performance data.",
2025
- "allowNo": false,
2026
- "type": "boolean"
2027
2022
  }
2028
2023
  },
2029
2024
  "hasDynamicHelp": true,
2030
2025
  "hiddenAliases": [],
2031
- "id": "data:update:record",
2026
+ "id": "data:import:tree",
2032
2027
  "pluginAlias": "@salesforce/plugin-data",
2033
2028
  "pluginName": "@salesforce/plugin-data",
2034
2029
  "pluginType": "core",
2035
2030
  "strict": true,
2036
- "summary": "Updates a single record of a Salesforce or Tooling API object.",
2031
+ "summary": "Import data from one or more JSON files into an org.",
2037
2032
  "enableJsonFlag": true,
2038
2033
  "isESM": true,
2039
2034
  "relativePath": [
2040
2035
  "lib",
2041
2036
  "commands",
2042
2037
  "data",
2043
- "update",
2044
- "record.js"
2038
+ "import",
2039
+ "tree.js"
2045
2040
  ],
2046
2041
  "aliasPermutations": [
2047
- "force:data:record:update",
2048
- "data:force:record:update",
2049
- "data:record:force:update",
2050
- "data:record:update:force",
2051
- "force:record:data:update",
2052
- "record:force:data:update",
2053
- "record:data:force:update",
2054
- "record:data:update:force",
2055
- "force:record:update:data",
2056
- "record:force:update:data",
2057
- "record:update:force:data",
2058
- "record:update:data:force",
2059
- "force:data:update:record",
2060
- "data:force:update:record",
2061
- "data:update:force:record",
2062
- "data:update:record:force",
2063
- "force:update:data:record",
2064
- "update:force:data:record",
2065
- "update:data:force:record",
2066
- "update:data:record:force",
2067
- "force:update:record:data",
2068
- "update:force:record:data",
2069
- "update:record:force:data",
2070
- "update:record:data:force"
2071
- ],
2072
- "permutations": [
2073
- "data:update:record",
2074
- "update:data:record",
2075
- "update:record:data",
2076
- "data:record:update",
2077
- "record:data:update",
2078
- "record:update:data"
2079
- ]
2080
- },
2081
- "data:update:resume": {
2082
- "aliases": [],
2083
- "args": {},
2084
- "description": "When the original \"sf data update 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 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\".",
2085
- "examples": [
2086
- "Resume a bulk update job using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
2087
- "Resume the most recently run bulk update job:\n<%= config.bin %> <%= command.id %> --use-most-recent"
2088
- ],
2089
- "flags": {
2090
- "json": {
2091
- "description": "Format output as json.",
2092
- "helpGroup": "GLOBAL",
2093
- "name": "json",
2094
- "allowNo": false,
2095
- "type": "boolean"
2096
- },
2097
- "flags-dir": {
2098
- "helpGroup": "GLOBAL",
2099
- "name": "flags-dir",
2100
- "summary": "Import flag values from a directory.",
2101
- "hasDynamicHelp": false,
2102
- "multiple": false,
2103
- "type": "option"
2104
- },
2105
- "use-most-recent": {
2106
- "name": "use-most-recent",
2107
- "summary": "Use the job ID of the bulk update job that was most recently run.",
2108
- "allowNo": false,
2109
- "type": "boolean"
2110
- },
2111
- "job-id": {
2112
- "char": "i",
2113
- "name": "job-id",
2114
- "summary": "Job ID of the bulk update.",
2115
- "hasDynamicHelp": false,
2116
- "multiple": false,
2117
- "type": "option"
2118
- },
2119
- "wait": {
2120
- "char": "w",
2121
- "name": "wait",
2122
- "summary": "Time to wait for the command to finish, in minutes.",
2123
- "default": "5 minutes",
2124
- "hasDynamicHelp": true,
2125
- "multiple": false,
2126
- "type": "option"
2127
- }
2128
- },
2129
- "hasDynamicHelp": true,
2130
- "hiddenAliases": [],
2131
- "id": "data:update:resume",
2132
- "pluginAlias": "@salesforce/plugin-data",
2133
- "pluginName": "@salesforce/plugin-data",
2134
- "pluginType": "core",
2135
- "strict": true,
2136
- "summary": "Resume a bulk update job that you previously started. Uses Bulk API 2.0.",
2137
- "enableJsonFlag": true,
2138
- "isESM": true,
2139
- "relativePath": [
2140
- "lib",
2141
- "commands",
2142
- "data",
2143
- "update",
2144
- "resume.js"
2042
+ "force:data:tree:import",
2043
+ "data:force:tree:import",
2044
+ "data:tree:force:import",
2045
+ "data:tree:import:force",
2046
+ "force:tree:data:import",
2047
+ "tree:force:data:import",
2048
+ "tree:data:force:import",
2049
+ "tree:data:import:force",
2050
+ "force:tree:import:data",
2051
+ "tree:force:import:data",
2052
+ "tree:import:force:data",
2053
+ "tree:import:data:force",
2054
+ "force:data:import:tree",
2055
+ "data:force:import:tree",
2056
+ "data:import:force:tree",
2057
+ "data:import:tree:force",
2058
+ "force:import:data:tree",
2059
+ "import:force:data:tree",
2060
+ "import:data:force:tree",
2061
+ "import:data:tree:force",
2062
+ "force:import:tree:data",
2063
+ "import:force:tree:data",
2064
+ "import:tree:force:data",
2065
+ "import:tree:data:force"
2145
2066
  ],
2146
- "aliasPermutations": [],
2147
2067
  "permutations": [
2148
- "data:update:resume",
2149
- "update:data:resume",
2150
- "update:resume:data",
2151
- "data:resume:update",
2152
- "resume:data:update",
2153
- "resume:update:data"
2068
+ "data:import:tree",
2069
+ "import:data:tree",
2070
+ "import:tree:data",
2071
+ "data:tree:import",
2072
+ "tree:data:import",
2073
+ "tree:import:data"
2154
2074
  ]
2155
2075
  },
2156
- "data:upsert:bulk": {
2076
+ "data:update:bulk": {
2157
2077
  "aliases": [],
2158
2078
  "args": {},
2159
- "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).",
2160
2080
  "examples": [
2161
- "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",
2162
- "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"
2163
2082
  ],
2164
2083
  "flags": {
2165
2084
  "json": {
@@ -2177,90 +2096,48 @@
2177
2096
  "multiple": false,
2178
2097
  "type": "option"
2179
2098
  },
2180
- "target-org": {
2181
- "aliases": [
2182
- "targetusername",
2183
- "u"
2184
- ],
2185
- "char": "o",
2186
- "deprecateAliases": true,
2187
- "name": "target-org",
2188
- "noCacheDefault": true,
2189
- "required": true,
2190
- "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.",
2191
2103
  "hasDynamicHelp": true,
2192
2104
  "multiple": false,
2193
2105
  "type": "option"
2194
2106
  },
2195
- "api-version": {
2196
- "aliases": [
2197
- "apiversion"
2198
- ],
2199
- "deprecateAliases": true,
2200
- "description": "Override the api version used for api requests made by this command",
2201
- "name": "api-version",
2202
- "hasDynamicHelp": false,
2203
- "multiple": false,
2204
- "type": "option"
2205
- },
2206
- "loglevel": {
2207
- "deprecated": {
2208
- "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."
2209
- },
2210
- "hidden": true,
2211
- "name": "loglevel",
2212
- "hasDynamicHelp": false,
2213
- "multiple": false,
2214
- "type": "option"
2215
- },
2216
2107
  "file": {
2217
- "aliases": [
2218
- "csvfile"
2219
- ],
2220
2108
  "char": "f",
2221
- "deprecateAliases": true,
2222
2109
  "name": "file",
2223
2110
  "required": true,
2224
- "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.",
2225
2112
  "hasDynamicHelp": false,
2226
2113
  "multiple": false,
2227
2114
  "type": "option"
2228
2115
  },
2229
2116
  "sobject": {
2230
- "aliases": [
2231
- "sobjecttype"
2232
- ],
2233
2117
  "char": "s",
2234
- "deprecateAliases": true,
2235
2118
  "name": "sobject",
2236
2119
  "required": true,
2237
- "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.",
2238
2121
  "hasDynamicHelp": false,
2239
2122
  "multiple": false,
2240
2123
  "type": "option"
2241
2124
  },
2242
- "wait": {
2243
- "char": "w",
2244
- "exclusive": [
2245
- "async"
2246
- ],
2247
- "name": "wait",
2248
- "summary": "Number of minutes to wait for the command to complete before displaying the results.",
2249
- "default": "0 minutes",
2250
- "hasDynamicHelp": true,
2125
+ "api-version": {
2126
+ "description": "Override the api version used for api requests made by this command",
2127
+ "name": "api-version",
2128
+ "hasDynamicHelp": false,
2251
2129
  "multiple": false,
2252
2130
  "type": "option"
2253
2131
  },
2254
- "async": {
2255
- "char": "a",
2256
- "deprecated": true,
2257
- "exclusive": [
2258
- "wait"
2259
- ],
2260
- "name": "async",
2261
- "summary": "Run the command asynchronously.",
2262
- "allowNo": false,
2263
- "type": "boolean"
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.",
2138
+ "hasDynamicHelp": true,
2139
+ "multiple": false,
2140
+ "type": "option"
2264
2141
  },
2265
2142
  "line-ending": {
2266
2143
  "dependsOn": [
@@ -2290,55 +2167,47 @@
2290
2167
  "TAB"
2291
2168
  ],
2292
2169
  "type": "option"
2293
- },
2294
- "external-id": {
2295
- "aliases": [
2296
- "externalid"
2297
- ],
2298
- "char": "i",
2299
- "deprecateAliases": true,
2300
- "name": "external-id",
2301
- "required": true,
2302
- "summary": "Name of the external ID field, or the Id field.",
2303
- "hasDynamicHelp": false,
2304
- "multiple": false,
2305
- "type": "option"
2306
2170
  }
2307
2171
  },
2308
2172
  "hasDynamicHelp": true,
2309
2173
  "hiddenAliases": [],
2310
- "id": "data:upsert:bulk",
2174
+ "id": "data:update:bulk",
2311
2175
  "pluginAlias": "@salesforce/plugin-data",
2312
2176
  "pluginName": "@salesforce/plugin-data",
2313
2177
  "pluginType": "core",
2314
2178
  "strict": true,
2315
- "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.",
2316
2180
  "enableJsonFlag": true,
2317
2181
  "isESM": true,
2318
2182
  "relativePath": [
2319
2183
  "lib",
2320
2184
  "commands",
2321
2185
  "data",
2322
- "upsert",
2186
+ "update",
2323
2187
  "bulk.js"
2324
2188
  ],
2325
2189
  "aliasPermutations": [],
2326
2190
  "permutations": [
2327
- "data:upsert:bulk",
2328
- "upsert:data:bulk",
2329
- "upsert:bulk:data",
2330
- "data:bulk:upsert",
2331
- "bulk:data:upsert",
2332
- "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"
2333
2197
  ]
2334
2198
  },
2335
- "data:upsert:resume": {
2336
- "aliases": [],
2199
+ "data:update:record": {
2200
+ "aliases": [
2201
+ "force:data:record:update"
2202
+ ],
2337
2203
  "args": {},
2338
- "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.",
2339
2206
  "examples": [
2340
- "Resume a bulk upsert job from your default org using an ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
2341
- "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\""
2342
2211
  ],
2343
2212
  "flags": {
2344
2213
  "json": {
@@ -2365,41 +2234,17 @@
2365
2234
  "deprecateAliases": true,
2366
2235
  "name": "target-org",
2367
2236
  "noCacheDefault": true,
2368
- "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.",
2369
2239
  "hasDynamicHelp": true,
2370
2240
  "multiple": false,
2371
2241
  "type": "option"
2372
2242
  },
2373
- "job-id": {
2243
+ "api-version": {
2374
2244
  "aliases": [
2375
- "jobid"
2245
+ "apiversion"
2376
2246
  ],
2377
- "char": "i",
2378
2247
  "deprecateAliases": true,
2379
- "name": "job-id",
2380
- "summary": "ID of the job you want to resume.",
2381
- "hasDynamicHelp": false,
2382
- "multiple": false,
2383
- "type": "option"
2384
- },
2385
- "use-most-recent": {
2386
- "exclusive": [
2387
- "job-id"
2388
- ],
2389
- "name": "use-most-recent",
2390
- "summary": "Use the ID of the most recently-run bulk job.",
2391
- "allowNo": false,
2392
- "type": "boolean"
2393
- },
2394
- "wait": {
2395
- "name": "wait",
2396
- "summary": "Number of minutes to wait for the command to complete before displaying the results.",
2397
- "default": "5 minutes",
2398
- "hasDynamicHelp": true,
2399
- "multiple": false,
2400
- "type": "option"
2401
- },
2402
- "api-version": {
2403
2248
  "description": "Override the api version used for api requests made by this command",
2404
2249
  "name": "api-version",
2405
2250
  "hasDynamicHelp": false,
@@ -2415,180 +2260,130 @@
2415
2260
  "hasDynamicHelp": false,
2416
2261
  "multiple": false,
2417
2262
  "type": "option"
2418
- }
2419
- },
2420
- "hasDynamicHelp": true,
2421
- "hiddenAliases": [],
2422
- "id": "data:upsert:resume",
2423
- "pluginAlias": "@salesforce/plugin-data",
2424
- "pluginName": "@salesforce/plugin-data",
2425
- "pluginType": "core",
2426
- "strict": true,
2427
- "summary": "Resume a bulk upsert job that you previously started. Uses Bulk API 2.0.",
2428
- "enableJsonFlag": true,
2429
- "isESM": true,
2430
- "relativePath": [
2431
- "lib",
2432
- "commands",
2433
- "data",
2434
- "upsert",
2435
- "resume.js"
2436
- ],
2437
- "aliasPermutations": [],
2438
- "permutations": [
2439
- "data:upsert:resume",
2440
- "upsert:data:resume",
2441
- "upsert:resume:data",
2442
- "data:resume:upsert",
2443
- "resume:data:upsert",
2444
- "resume:upsert:data"
2445
- ]
2446
- },
2447
- "data:import:bulk": {
2448
- "aliases": [],
2449
- "args": {},
2450
- "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).",
2451
- "examples": [
2452
- "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",
2453
- "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"
2454
- ],
2455
- "flags": {
2456
- "json": {
2457
- "description": "Format output as json.",
2458
- "helpGroup": "GLOBAL",
2459
- "name": "json",
2460
- "allowNo": false,
2461
- "type": "boolean"
2462
- },
2463
- "flags-dir": {
2464
- "helpGroup": "GLOBAL",
2465
- "name": "flags-dir",
2466
- "summary": "Import flag values from a directory.",
2467
- "hasDynamicHelp": false,
2468
- "multiple": false,
2469
- "type": "option"
2470
- },
2471
- "async": {
2472
- "char": "a",
2473
- "deprecated": true,
2474
- "exclusive": [
2475
- "wait"
2476
- ],
2477
- "name": "async",
2478
- "summary": "Don't wait for the command to complete.",
2479
- "allowNo": false,
2480
- "type": "boolean"
2481
- },
2482
- "file": {
2483
- "char": "f",
2484
- "name": "file",
2485
- "required": true,
2486
- "summary": "CSV file that contains the Salesforce object records you want to import.",
2487
- "hasDynamicHelp": false,
2488
- "multiple": false,
2489
- "type": "option"
2490
2263
  },
2491
2264
  "sobject": {
2265
+ "aliases": [
2266
+ "sobjecttype"
2267
+ ],
2492
2268
  "char": "s",
2269
+ "deprecateAliases": true,
2493
2270
  "name": "sobject",
2494
2271
  "required": true,
2495
- "summary": "API name of the Salesforce object, either standard or custom, into which you're importing records.",
2272
+ "summary": "API name of the Salesforce or Tooling API object that contains the record you're updating.",
2496
2273
  "hasDynamicHelp": false,
2497
2274
  "multiple": false,
2498
2275
  "type": "option"
2499
2276
  },
2500
- "api-version": {
2501
- "description": "Override the api version used for api requests made by this command",
2502
- "name": "api-version",
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.",
2503
2285
  "hasDynamicHelp": false,
2504
2286
  "multiple": false,
2505
2287
  "type": "option"
2506
2288
  },
2507
- "wait": {
2289
+ "where": {
2508
2290
  "char": "w",
2509
- "exclusive": [
2510
- "async"
2511
- ],
2512
- "name": "wait",
2513
- "summary": "Time to wait for the command to finish, in minutes.",
2514
- "hasDynamicHelp": true,
2291
+ "name": "where",
2292
+ "summary": "List of <fieldName>=<value> pairs that identify the record you want to update.",
2293
+ "hasDynamicHelp": false,
2515
2294
  "multiple": false,
2516
2295
  "type": "option"
2517
2296
  },
2518
- "target-org": {
2519
- "char": "o",
2520
- "name": "target-org",
2521
- "noCacheDefault": true,
2297
+ "values": {
2298
+ "char": "v",
2299
+ "name": "values",
2522
2300
  "required": true,
2523
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
2524
- "hasDynamicHelp": true,
2525
- "multiple": false,
2526
- "type": "option"
2527
- },
2528
- "line-ending": {
2529
- "dependsOn": [
2530
- "file"
2531
- ],
2532
- "name": "line-ending",
2533
- "summary": "Line ending used in the CSV file. Default value on Windows is `CRLF`; on macOS and Linux it's `LF`.",
2301
+ "summary": "Fields that you're updating, in the format of <fieldName>=<value> pairs.",
2534
2302
  "hasDynamicHelp": false,
2535
2303
  "multiple": false,
2536
- "options": [
2537
- "CRLF",
2538
- "LF"
2539
- ],
2540
2304
  "type": "option"
2541
2305
  },
2542
- "column-delimiter": {
2543
- "name": "column-delimiter",
2544
- "summary": "Column delimiter used in the CSV file.",
2545
- "hasDynamicHelp": false,
2546
- "multiple": false,
2547
- "options": [
2548
- "BACKQUOTE",
2549
- "CARET",
2550
- "COMMA",
2551
- "PIPE",
2552
- "SEMICOLON",
2553
- "TAB"
2306
+ "use-tooling-api": {
2307
+ "aliases": [
2308
+ "usetoolingapi"
2554
2309
  ],
2555
- "type": "option"
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"
2556
2326
  }
2557
2327
  },
2558
2328
  "hasDynamicHelp": true,
2559
2329
  "hiddenAliases": [],
2560
- "id": "data:import:bulk",
2330
+ "id": "data:update:record",
2561
2331
  "pluginAlias": "@salesforce/plugin-data",
2562
2332
  "pluginName": "@salesforce/plugin-data",
2563
2333
  "pluginType": "core",
2564
2334
  "strict": true,
2565
- "summary": "Bulk import records into a Salesforce object from a CSV file. Uses Bulk API 2.0.",
2335
+ "summary": "Updates a single record of a Salesforce or Tooling API object.",
2566
2336
  "enableJsonFlag": true,
2567
2337
  "isESM": true,
2568
2338
  "relativePath": [
2569
2339
  "lib",
2570
2340
  "commands",
2571
2341
  "data",
2572
- "import",
2573
- "bulk.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"
2574
2370
  ],
2575
- "aliasPermutations": [],
2576
2371
  "permutations": [
2577
- "data:import:bulk",
2578
- "import:data:bulk",
2579
- "import:bulk:data",
2580
- "data:bulk:import",
2581
- "bulk:data:import",
2582
- "bulk:import: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"
2583
2378
  ]
2584
2379
  },
2585
- "data:import:resume": {
2380
+ "data:update:resume": {
2586
2381
  "aliases": [],
2587
2382
  "args": {},
2588
- "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.",
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\".",
2589
2384
  "examples": [
2590
- "Resume a bulk import job to your default org using an ID:\n<%= config.bin %> <%= command.id %> --job-id 750xx000000005sAAA",
2591
- "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"
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"
2592
2387
  ],
2593
2388
  "flags": {
2594
2389
  "json": {
@@ -2608,14 +2403,14 @@
2608
2403
  },
2609
2404
  "use-most-recent": {
2610
2405
  "name": "use-most-recent",
2611
- "summary": "Use the job ID of the bulk import job that was most recently run.",
2406
+ "summary": "Use the job ID of the bulk update job that was most recently run.",
2612
2407
  "allowNo": false,
2613
2408
  "type": "boolean"
2614
2409
  },
2615
2410
  "job-id": {
2616
2411
  "char": "i",
2617
2412
  "name": "job-id",
2618
- "summary": "Job ID of the bulk import.",
2413
+ "summary": "Job ID of the bulk update.",
2619
2414
  "hasDynamicHelp": false,
2620
2415
  "multiple": false,
2621
2416
  "type": "option"
@@ -2632,41 +2427,38 @@
2632
2427
  },
2633
2428
  "hasDynamicHelp": true,
2634
2429
  "hiddenAliases": [],
2635
- "id": "data:import:resume",
2430
+ "id": "data:update:resume",
2636
2431
  "pluginAlias": "@salesforce/plugin-data",
2637
2432
  "pluginName": "@salesforce/plugin-data",
2638
2433
  "pluginType": "core",
2639
2434
  "strict": true,
2640
- "summary": "Resume a bulk import job that you previously started. Uses Bulk API 2.0.",
2435
+ "summary": "Resume a bulk update job that you previously started. Uses Bulk API 2.0.",
2641
2436
  "enableJsonFlag": true,
2642
2437
  "isESM": true,
2643
2438
  "relativePath": [
2644
2439
  "lib",
2645
2440
  "commands",
2646
2441
  "data",
2647
- "import",
2442
+ "update",
2648
2443
  "resume.js"
2649
2444
  ],
2650
2445
  "aliasPermutations": [],
2651
2446
  "permutations": [
2652
- "data:import:resume",
2653
- "import:data:resume",
2654
- "import:resume:data",
2655
- "data:resume:import",
2656
- "resume:data:import",
2657
- "resume:import: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"
2658
2453
  ]
2659
2454
  },
2660
- "data:import:tree": {
2661
- "aliases": [
2662
- "force:data:tree:import"
2663
- ],
2455
+ "data:upsert:bulk": {
2456
+ "aliases": [],
2664
2457
  "args": {},
2665
- "deprecateAliases": true,
2666
- "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.",
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)",
2667
2459
  "examples": [
2668
- "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",
2669
- "Import records using a plan definition file into your default org:\n<%= config.bin %> <%= command.id %> --plan Account-Contact-plan.json"
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"
2670
2462
  ],
2671
2463
  "flags": {
2672
2464
  "json": {
@@ -2720,24 +2512,79 @@
2720
2512
  "multiple": false,
2721
2513
  "type": "option"
2722
2514
  },
2723
- "files": {
2515
+ "file": {
2724
2516
  "aliases": [
2725
- "sobjecttreefiles"
2517
+ "csvfile"
2726
2518
  ],
2727
2519
  "char": "f",
2728
2520
  "deprecateAliases": true,
2729
- "name": "files",
2730
- "summary": "Comma-separated and in-order JSON files that contain the records, in sObject tree format, that you want to insert.",
2731
- "delimiter": ",",
2521
+ "name": "file",
2522
+ "required": true,
2523
+ "summary": "CSV file that contains the IDs of the records to update or delete.",
2732
2524
  "hasDynamicHelp": false,
2733
- "multiple": true,
2525
+ "multiple": false,
2734
2526
  "type": "option"
2735
2527
  },
2736
- "plan": {
2737
- "char": "p",
2738
- "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",
2739
- "name": "plan",
2740
- "summary": "Plan definition file to insert multiple data files.",
2528
+ "sobject": {
2529
+ "aliases": [
2530
+ "sobjecttype"
2531
+ ],
2532
+ "char": "s",
2533
+ "deprecateAliases": true,
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.",
2537
+ "hasDynamicHelp": false,
2538
+ "multiple": false,
2539
+ "type": "option"
2540
+ },
2541
+ "wait": {
2542
+ "char": "w",
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`.",
2556
+ "hasDynamicHelp": false,
2557
+ "multiple": false,
2558
+ "options": [
2559
+ "CRLF",
2560
+ "LF"
2561
+ ],
2562
+ "type": "option"
2563
+ },
2564
+ "column-delimiter": {
2565
+ "name": "column-delimiter",
2566
+ "summary": "Column delimiter used in the CSV file.",
2567
+ "hasDynamicHelp": false,
2568
+ "multiple": false,
2569
+ "options": [
2570
+ "BACKQUOTE",
2571
+ "CARET",
2572
+ "COMMA",
2573
+ "PIPE",
2574
+ "SEMICOLON",
2575
+ "TAB"
2576
+ ],
2577
+ "type": "option"
2578
+ },
2579
+ "external-id": {
2580
+ "aliases": [
2581
+ "externalid"
2582
+ ],
2583
+ "char": "i",
2584
+ "deprecateAliases": true,
2585
+ "name": "external-id",
2586
+ "required": true,
2587
+ "summary": "Name of the external ID field, or the Id field.",
2741
2588
  "hasDynamicHelp": false,
2742
2589
  "multiple": false,
2743
2590
  "type": "option"
@@ -2745,54 +2592,141 @@
2745
2592
  },
2746
2593
  "hasDynamicHelp": true,
2747
2594
  "hiddenAliases": [],
2748
- "id": "data:import:tree",
2595
+ "id": "data:upsert:bulk",
2749
2596
  "pluginAlias": "@salesforce/plugin-data",
2750
2597
  "pluginName": "@salesforce/plugin-data",
2751
2598
  "pluginType": "core",
2752
2599
  "strict": true,
2753
- "summary": "Import data from one or more JSON files into an org.",
2600
+ "summary": "Bulk upsert records to an org from a CSV file. Uses Bulk API 2.0.",
2754
2601
  "enableJsonFlag": true,
2755
2602
  "isESM": true,
2756
2603
  "relativePath": [
2757
2604
  "lib",
2758
2605
  "commands",
2759
2606
  "data",
2760
- "import",
2761
- "tree.js"
2607
+ "upsert",
2608
+ "bulk.js"
2762
2609
  ],
2763
- "aliasPermutations": [
2764
- "force:data:tree:import",
2765
- "data:force:tree:import",
2766
- "data:tree:force:import",
2767
- "data:tree:import:force",
2768
- "force:tree:data:import",
2769
- "tree:force:data:import",
2770
- "tree:data:force:import",
2771
- "tree:data:import:force",
2772
- "force:tree:import:data",
2773
- "tree:force:import:data",
2774
- "tree:import:force:data",
2775
- "tree:import:data:force",
2776
- "force:data:import:tree",
2777
- "data:force:import:tree",
2778
- "data:import:force:tree",
2779
- "data:import:tree:force",
2780
- "force:import:data:tree",
2781
- "import:force:data:tree",
2782
- "import:data:force:tree",
2783
- "import:data:tree:force",
2784
- "force:import:tree:data",
2785
- "import:force:tree:data",
2786
- "import:tree:force:data",
2787
- "import:tree:data:force"
2610
+ "aliasPermutations": [],
2611
+ "permutations": [
2612
+ "data:upsert:bulk",
2613
+ "upsert:data:bulk",
2614
+ "upsert:bulk:data",
2615
+ "data:bulk:upsert",
2616
+ "bulk:data:upsert",
2617
+ "bulk:upsert:data"
2618
+ ]
2619
+ },
2620
+ "data:upsert:resume": {
2621
+ "aliases": [],
2622
+ "args": {},
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.",
2624
+ "examples": [
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"
2788
2627
  ],
2628
+ "flags": {
2629
+ "json": {
2630
+ "description": "Format output as json.",
2631
+ "helpGroup": "GLOBAL",
2632
+ "name": "json",
2633
+ "allowNo": false,
2634
+ "type": "boolean"
2635
+ },
2636
+ "flags-dir": {
2637
+ "helpGroup": "GLOBAL",
2638
+ "name": "flags-dir",
2639
+ "summary": "Import flag values from a directory.",
2640
+ "hasDynamicHelp": false,
2641
+ "multiple": false,
2642
+ "type": "option"
2643
+ },
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"
2657
+ },
2658
+ "job-id": {
2659
+ "aliases": [
2660
+ "jobid"
2661
+ ],
2662
+ "char": "i",
2663
+ "deprecateAliases": true,
2664
+ "name": "job-id",
2665
+ "summary": "ID of the job you want to resume.",
2666
+ "hasDynamicHelp": false,
2667
+ "multiple": false,
2668
+ "type": "option"
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
+ },
2679
+ "wait": {
2680
+ "name": "wait",
2681
+ "summary": "Number of minutes to wait for the command to complete before displaying the results.",
2682
+ "default": "5 minutes",
2683
+ "hasDynamicHelp": true,
2684
+ "multiple": false,
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
+ }
2704
+ },
2705
+ "hasDynamicHelp": true,
2706
+ "hiddenAliases": [],
2707
+ "id": "data:upsert:resume",
2708
+ "pluginAlias": "@salesforce/plugin-data",
2709
+ "pluginName": "@salesforce/plugin-data",
2710
+ "pluginType": "core",
2711
+ "strict": true,
2712
+ "summary": "Resume a bulk upsert job that you previously started. Uses Bulk API 2.0.",
2713
+ "enableJsonFlag": true,
2714
+ "isESM": true,
2715
+ "relativePath": [
2716
+ "lib",
2717
+ "commands",
2718
+ "data",
2719
+ "upsert",
2720
+ "resume.js"
2721
+ ],
2722
+ "aliasPermutations": [],
2789
2723
  "permutations": [
2790
- "data:import:tree",
2791
- "import:data:tree",
2792
- "import:tree:data",
2793
- "data:tree:import",
2794
- "tree:data:import",
2795
- "tree:import: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"
2796
2730
  ]
2797
2731
  },
2798
2732
  "force:data:bulk:delete": {
@@ -3232,5 +3166,5 @@
3232
3166
  ]
3233
3167
  }
3234
3168
  },
3235
- "version": "4.0.51"
3169
+ "version": "4.0.53"
3236
3170
  }