# SF Cli Plugin

## Plugin Install

Clone the repository:

```json
git clone https://github.com/GridMate/gridmate-sf-plugin
```

Go to the plugin directory and Install npm modules:&#x20;

```json
npm install
```

Finally link the plugin to your cli installation:

```json
sf plugins link .
```

## Plugin Commands

### sf gmpkg usergrid export

```json
Export GM - User Grid

USAGE
  $ sf gmpkg usergrid export -o <value> -d <value> --api-version <value> [--json] [-n <value>] [-q <value>]

FLAGS
  -d, --directory=<value>   (required) Export output directory.
  -n, --name=<value>        ',' List of API names of GM - User Grids.
  -o, --target-org=<value>  (required) Target org username/alias
  -q, --query=<value>       SOQL query to fetch list of GM - User Grids.
  --api-version=<value>     (required) Salesforce API Version

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Export GM - User Grid

  You can export either from a list of api names or an SOQL query.

EXAMPLES
  $ sf gmpkg usergrid export -o gmpkg-demo --api-version=58.0 -d "/data/Opportunity/export" -n "Opportunity_All_Grid,Opportunity_Pipeline_Grid"

  $ sf gmpkg usergrid export -o gmpkg-demo --api-version=58.0 -d "/data/Opportunity/export" -q "Select Id, Name From gmpkg_xUser_Grid_c Where gmpkg_Object_Name_c = 'Opportunity'"
  
FLAG DESCRIPTIONS
  --api-version=<value>  Salesforce API Version

    Override the api version used for api requests made by this command
```

### sf gmpkg usergrid import

```json
Import GM - User Grid

USAGE
  $ sf gmpkg usergrid import -o <value> --api-version <value> [--json] [-f <value>] [-d <value>]

FLAGS
  -d, --directory=<value>   directory path to import.
  -f, --file=<value>        file path to import
  -o, --target-org=<value>  (required) Target org username/alias
  --api-version=<value>     (required) Salesforce API Version

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Import GM - User Grid

  You can import either a file or a directory.

EXAMPLES
  $ sf gmpkg usergrid import -o gmpkg-demo --api-version=58.0 -f "/data/Opportunity/import/Opportunity_All_Grid.json"

  $ sf gmpkg usergrid import -o gmpkg-demo --api-version=58.0 -d "/data/Opportunity/import"

FLAG DESCRIPTIONS
  --api-version=<value>  Salesforce API Version

    Override the api version used for api requests made by this command
```

### sf gmpkg congaview export

```json
Export Conga View

USAGE
  $ sf gmpkg congaview export -o <value> -d <value> --api-version <value> [--json] [-n <value>] [-q <value>]

FLAGS
  -d, --directory=<value>   (required) Export output directory.
  -n, --name=<value>        ',' List of Conga Views.
  -o, --target-org=<value>  (required) Target org username/alias
  -q, --query=<value>       SOQL query to fetch list of Conga Views.
  --api-version=<value>     (required) Salesforce API Version

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Export Conga View

  You can export either from a list of api names or an SOQL query.

EXAMPLES
  $ sf gmpkg congaview export -o gmpkg-demo --api-version=58.0 -d "/data/conga/export" -n "Opportunity_All_View"

  $ sf gmpkg congaview export -o gmpkg-demo --api-version=58.0 -d "/data/conga/export" -q "SELECT Id, Name FROM CRMC_PP_GridView_c Where CRMC_PP_ObjectName_c='Opportunity'"

FLAG DESCRIPTIONS
  --api-version=<value>  Salesforce API Version

    Override the api version used for api requests made by this command
```

### sf gmpkg congaview migrate

```json
Import Conga View

USAGE
  $ sf gmpkg congaview migrate -o <value> -f <value> -d <value> --api-version <value> [--json]

FLAGS
  -d, --directory=<value>   (required) target directory.
  -f, --file=<value>        (required) file path to migrate.
  -o, --target-org=<value>  (required) Target org username/alias
  --api-version=<value>     (required) Salesforce API Version

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Import Conga View

  Import a Conga View Json file

EXAMPLES
  $ sf gmpkg congaview migrate -o gmpkg-demo --api-version=58.0 -f "/data/conga/export/Opportunity_All_View.json" -d "/data/conga/migrated"

FLAG DESCRIPTIONS
  --api-version=<value>  Salesforce API Version

    Override the api version used for api requests made by this command
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gridmate.io/tools/sf-cli-plugin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
