Skip to content

docs: Add fallback docs #241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Jun 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d33cd91
Update IDM docs
tilenkavcic May 28, 2025
720c6c6
Update supported object types
tilenkavcic May 28, 2025
c8cff51
Add fallback description
tilenkavcic May 28, 2025
cd59b36
Address comments
tilenkavcic May 30, 2025
d86fce2
Don't capitalize titles in supported object types
tilenkavcic May 30, 2025
b7508d5
Add hint for integrating DevRev documentation into MCP server
tilenkavcic May 30, 2025
b6825a3
Introduce Chef UI, better explain fallbacks
tilenkavcic Jun 5, 2025
ef75077
Update fern/docs/pages/airdrop/initial-domain-mapping.mdx
tilenkavcic Jun 5, 2025
3c38923
Nits
tilenkavcic Jun 5, 2025
63880a2
Address comments
tilenkavcic Jun 9, 2025
2a909dd
frontend user-identity method (#232)
shalomgk May 30, 2025
4c27818
changed the position of note (#243)
AvinashSingh10-1 May 31, 2025
31296a4
chore: Update OpenAPI specs (#245)
bdbyrne Jun 2, 2025
03251e7
Point to customization API docs from identity SDK docs (#246)
shivansh Jun 4, 2025
33c6cf2
chore: Include 'Bearer' in authorization header documentation (#247)
bdbyrne Jun 4, 2025
a3da99f
Document `unit` and `is_read_only` customization UI hints (#248)
shivansh Jun 5, 2025
e65a82b
style rules for marketplace (#214)
bc-devrev Jun 5, 2025
eedd51c
add instructions for local instance (#171)
bc-devrev Jun 5, 2025
b4d0788
Update supported objects for Airdrop (#250)
arturo-aparicio Jun 5, 2025
8784be6
Merge branch 'main' into tilenk/fallbacks
tilenkavcic Jun 9, 2025
ec3938a
Merge branch 'main' into tilenk/fallbacks
tilenkavcic Jun 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ fern/dist
fern/*/definition/
.DS_Store
.idea
.vscode
temp
__pycache__
79 changes: 55 additions & 24 deletions fern/docs/pages/airdrop/initial-domain-mapping.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ system is triggered.

You can create initial domain mappings using two methods:

1. **Chef-cli UI**: Interactive web interface for comprehensive mapping creation
1. **Chef UI**: Interactive web interface for comprehensive mapping creation
2. **Model Context Protocol (MCP)**: AI-assisted mapping creation for developers (experimental)

Choose the chef-cli UI for manual control or use MCP for rapid prototyping with AI assistance.
Choose the Chef UI for manual control or use MCP for rapid prototyping with AI assistance.
MCP is an experimental feature and works locally without requiring a sync to be created.

<Info>
For AI-assisted mapping creation, see the [Model Context Protocol integration guide](./mcp.mdx).
</Info>

## Chef-cli initial domain mapping setup
## Chef UI setup

### Prerequisites

Expand All @@ -36,7 +36,7 @@ or by running `make auth` in your snap-in repository.

### Add your token as an environment variable

Obtain a PAT-token from the **Settings** > **Account** tab of the dev org where you deploy your snap-in,
Obtain a PAT-token from the **Settings** > **Account** tab of the org where you deploy your snap-in,
and export it as `DEVREV_TOKEN`.

You can also run the following command if you are authenticated with the CLI:
Expand Down Expand Up @@ -70,7 +70,7 @@ Or you can use the interactive helper of the CLI:
eval $(chef-cli ctx init); chef-cli ctx show > ctx.json
```

### Use the local UI to create a recipe blueprint for your initial import
### Use the Chef UI

```bash
chef-cli configure-mappings --env prod
Expand All @@ -81,48 +81,79 @@ If you are also creating a bidirectional sync (DevRev to external system), to en
chef-cli configure-mappings --env prod --reverse
```

If your org is not in `US-East-1`, you have to override an environment variable to make sure the tool reaches the right server. For example:
If your org is not in `US-East-1`, you h ave to override an environment variable to make sure the tool reaches the right server. For example:
```bash
ACTIVE_PARTITION=dvrv-in-1 chef-cli configure-mappings --env prod
```

The options are: `dvrv-us-1`, `dvrv-eu-1`, `dvrv-in-1`, and `dvrv-de-1`.

The first function of the local UI is to assemble a *blueprint* for a concrete import running in the test-org, allowing the mapping to be tested out and evaluated.
After it is used for the import, the mappings become immutable, but the chef-cli UI offers a button to make a draft clone, which can be edited again for refinements.
The first function of the Chef UI is to assemble a *blueprint* for a concrete import running in the test-org, allowing the mapping to be tested out and evaluated.
After it is used for the import, the mappings become immutable, but the Chef UI offers a button to make a draft clone, which can be edited again for refinements.

### Continue to initial domain mapping

When you are done, you should have the chef-cli context set up and have the chef-cli local UI running in your browser.
You can now use the chef-cli web UI to create initial domain mappings.
When you are done, you should have the chef-cli context set up and have the Chef UI running in your browser.
You can now use the Chef UI to create initial domain mappings.

</Steps>

## Use the local UI to create initial domain mappings
## Use the Chef UI to create initial domain mappings

The final artifact of the recipe creation process is the `initial_domain_mapping.json`, which has to be embedded in the extractor.
The Chef UI generates an `initial_domain_mapping.json` file that must be embedded in your extractor. This defines the options that the end-user sees when they are mapping the data.

This mapping, unlike the recipe blueprint of a concrete import, can contain multiple options for each external record type from which the end-user might choose (for example, allow *task* from an external system to map either to *issue* or *ticket* in DevRev), and it can also contain mappings that apply to a record type category.
When the user runs a new import, and the extractor reports in its metadata record types belonging to this category that are not directly mapped in the initial domain mappings, the recipe manager applies the per-category default to them.
Initial domain mappings provide two key configuration capabilities:

After the blueprint of the test import is completed, the *Install in this org* button takes you to the initial domain mapping creation screen, where you can *merge* the blueprint to the existing initial mappings of the org.
- **Multiple mapping options**: The developer can choose how external record types map to DevRev records (for example, external *task* can map to either *issue* or *ticket*).
- **Category-based defaults**: Mappings can apply to entire record type categories, automatically handling new record types.

By repeating this process (run a new import, create a different configuration, merge to the initial mappings), you can create an initial mapping that contains multiple options for the user to choose from.
<Steps>

### Map record types and fields

Use the Chef UI to map record types and fields.
The UI displays the external record types you defined in external domain metadata and allows you to map them to DevRev objects.
Map one record type at a time, ensuring you map all required fields and as many optional fields as possible.

### Specify fallback mappings

For some required DevRev fields a fallback is required.

The fallback you choose is used on item creation if the extractor doesn't provide a value for the required DevRev field.
This is useful for fields that are required by DevRev but optional in the external system.

### Install the blueprint

Apply the mappings and **install them in your org** to access the initial domain mapping creation screen.
Follow the instructions to create your initial domain mapping.

### Merge configurations

To create multiple mappings for different record types and fields, repeat this process:
Create a new import, map the record types and fields, then install the mappings in your org.
The install screen allows you to merge new mappings with existing initial domain mappings.

### Export the mapping file

When all fields are mapped correctly, click **Export** to download `initial_domain_mapping.json`.

</Steps>

### Advanced configuration

Finally, when all the fields are mapped without deficiencies and the blueprint is installed, the Export button allows you to retrieve the `initial_domain_mapping.json`.
You can provide a local metadata file for enhanced functionality:

<Tip>
You can also provide a local metadata file to the command using the `-m` flag, for example:
```bash
chef-cli configure-mappings --env prod -m metadata.json
```

This enables the following features:
- Raw jq transformations using an external field as input (experimental feature).
- Filling in example input data for trying out the transformation.
This enables:
- Raw jq transformations using external fields as input (experimental)
- Example input data for testing transformations

In this case, it's not validated that the local file is the same as the one submitted by the snap-in.
</Tip>
<Warning>
The local metadata file is not validated against the snap-in submission.
</Warning>

### Test an import with initial mapping using the in-app UI

Expand Down
7 changes: 6 additions & 1 deletion fern/docs/pages/airdrop/mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ Create a `.mcp.json` file with the following content:
3. Use the editor to guide the AI to create the initial domain mappings.
4. Use `initial-mapping check` to test the initial domain mappings against the local domain metadata file.

<Hint>
To assist you in creating the Airdrop snap-in you can add DevRev's documentation to your MCP server, just add `https://developer.devrev.ai/public/airdrop/` as a custom docs URL.
See [Cursor documentation](https://docs.cursor.com/context/@-symbols/@-docs#add-custom-docs) for more information.
</Hint>

### Claude Code setup

1. Provide `.mcp.json` in your project root.
Expand All @@ -58,7 +63,7 @@ You can use the same `.mcp.json` file in other IDEs that support MCP.
To guide the AI tool, provide the following instructions to your AI assistant:

```markdown
When asked to perform airdrop initial mapping:
When asked to perform Airdrop initial mapping:

- Refer to the `metadata.json` for the external domain metadata.
- Use `mappings.json` as your initial domain mapping file.
Expand Down
1 change: 1 addition & 0 deletions fern/docs/pages/airdrop/supported-object-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ This document contains the list of all DevRev object types that are supported fo

[ ▲ top](#summary)

---

## account

Expand Down
Loading