While it's easy to get started building a Pack, there are lots of options to explore and decisions to make as you go. This page includes some best practices we've learned through developing our own Packs that we encourage you to consider.
- Follow the guidance on formula naming.
- Ensure each formula has a few examples defined. These show up in the generated documentation for the formula.
- Set a suggested value for required parameters. This allows users to drag the formula from the side panel and see a result immediately.
- For each formula that has only a single required parameter, consider exposing it as a column format. This makes it easier for users to use the functionality in a table.
- Consider the caching behavior of your formulas. Use longer cache times for formulas where the results are deterministic, and shorter cache times for ones that fetch external data.
- Follow the guidance on action naming.
- Ensure each action formula returns a result. This allows the doc to react to the action being completed.
- Follow the guidance on column format naming.
- For column formats that use a URL as input, add a matcher pattern. This allows Coda to apply the format automatically when a user adds a compatible URL to a table.
- Follow the guidance on sync table naming.
- Set the
descriptionfield for each sync table. The description is shown on the Pack's listing page and helps a user understand what data it retrieves.
- Add parameters to sync tables to allow for filtering. Filtering is particularly important when a table can return a large number of rows.
- Consider the caching behavior of your sync tables. Most fetcher requests should have their caching reduced or disabled to ensure the latest results are synced.
- Set a few featured columns on your schema, for the most commonly used properties.
Dynamic sync tables¶
- Add a
searchDynamicUrlsfunction to allow users to search for their desired dataset, if the underlying API supports it.
- Set a meaningful account name by implementing the
getConnectionNamefunction. This helps users that connect to multiple accounts distinguish them.
- Make sure to set the
instructionsUrlfield. Direct user to a help center article that provides information about where they can find the required tokens or credentials.
- Throw a
UserVisibleErrorfor bad input or when an expected type of error occurs. This allows you to provide a more informative error message to the user.