diff --git a/fern/docs.yml b/fern/docs.yml index fd1aae3c..9b52942a 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -83,6 +83,12 @@ redirects: - source: /:path*/airdrop/overview destination: /:path*/airdrop permanent: true + - source: /beta/guides/object-customization + destination: /public/guides/object-customization + permanent: true + - source: /beta/guides/custom-objects + destination: /public/guides/custom-objects + permanent: true analytics: ga4: diff --git a/fern/docs/pages/custom-objects.mdx b/fern/docs/pages/custom-objects.mdx index 8878b9a8..8c4d053e 100644 --- a/fern/docs/pages/custom-objects.mdx +++ b/fern/docs/pages/custom-objects.mdx @@ -1,7 +1,3 @@ - -This functionality is in Beta. It is not recommended for use in production applications. - - Custom objects allow you to extend DevRev's data model beyond the standard use-cases served by the native apps like Build and Support. Custom objects allow you to create and manage object types tailored to your specific business needs. @@ -12,8 +8,7 @@ and manage object types tailored to your specific business needs. 2. **Subtype**: A categorization of a leaf type. For example, "promotion" or "advertising" for a "campaign" leaf type. 3. **Schema fragment**: A schema fragment defines the schema for an object. 4. **Custom fields**: User-defined fields that store specific data for your custom object. -5. **Unique key**: A unique identifier for each custom object. This is useful for maintaining idempotency when retrying custom object creation requests. -6. **ID prefix**: A unique prefix used to generate the display ID for the custom object. If the `id_prefix` is "CAMP", the generated custom object display ID is "C-CAMP-1". The display ID is used to identify the custom object in the UI, similar to the standard DevRev object display IDs like "ISS-001" for issues. +5. **ID prefix**: A unique prefix used to generate the display ID for the custom object. If the `id_prefix` is "CAMP", the generated custom object display ID is "C-CAMP-1". The display ID is used to identify the custom object in the UI, similar to the standard DevRev object display IDs like "ISS-001" for issues. For more details on customization concepts, please refer to the [Customization](./object-customization) documentation. @@ -34,6 +29,9 @@ curl --location 'https://api.devrev.ai/schemas.custom.set' \ "type": "tenant_fragment", "description": "Attributes for Campaign", "leaf_type": "campaign", + "leaf_type_display_name": "Campaign", + "is_custom_leaf_type": true, + "id_prefix": "CAMP" "fields": [ { "name": "name", @@ -64,9 +62,7 @@ curl --location 'https://api.devrev.ai/schemas.custom.set' \ "Students" ] } - ], - "is_custom_leaf_type": true, - "id_prefix": "CAMP" + ] }' ``` @@ -82,7 +78,6 @@ curl --location 'https://api.devrev.ai/custom-objects.create' \ --header 'Authorization: Bearer ' \ --data '{ "leaf_type": "campaign", - "unique_key": "CAMP-001", "custom_schema_spec": { "tenant_fragment": true }, @@ -107,7 +102,6 @@ The response of the above API call is the ID of the custom object created. "modified_date": "2024-10-01T07:02:58.958Z", "display_id": "C-CAMP-1", "leaf_type": "campaign", - "unique_key": "CAMP-001" "stock_schema_fragment": "don:core:dvrv-us-1:stock_sf/1", "custom_schema_fragments": [ "don:core:dvrv-us-1:devo/demo:tenant_fragment/1" @@ -249,7 +243,33 @@ curl --location 'https://api.devrev.ai/custom-objects.create' \ "tnt__target_audience": "Professionals", "ctype__social_media_platform": "Facebook", "ctype__post_id": "1234567890" + } +}' +``` + +### Use unique keys for custom objects + +A unique identifier for each custom object can be used to maintain idempotency +when retrying custom object creation requests. No other custom object of the +same type can have the same unique key. + +```curl {10} +curl --location 'https://api.devrev.ai/custom-objects.create' \ +--header 'Content-Type: application/json' \ +--header 'Accept: application/json' \ +--header 'Authorization: Bearer ' \ +--data '{ + "leaf_type": "campaign", + "custom_schema_spec": { + "tenant_fragment": true }, - "unique_key": "CAMP-001" + "unique_key": "CAMP-1", + "custom_fields": { + "tnt__name": "Summer Sale 2023", + "tnt__start_date": "2023-06-01", + "tnt__end_date": "2023-08-31", + "tnt__budget": 10000, + "tnt__target_audience": "Professionals" + } }' ``` diff --git a/fern/docs/pages/customization.mdx b/fern/docs/pages/customization.mdx index cfce2849..8fbaf2b1 100644 --- a/fern/docs/pages/customization.mdx +++ b/fern/docs/pages/customization.mdx @@ -402,7 +402,7 @@ following POST request payload to `schemas.custom.set` can be used: "fields": [ ... ], - "deprecated": true, + "is_deprecated": true, } ``` @@ -685,8 +685,8 @@ curl --location 'https://api.devrev.ai/schemas.custom.set' \ Any attempt to update a _bug_ object to the _completed_ stage without populating the _RCA_ field is rejected. -The supported operators are `==`, `!=`, `>`, `>=`, `<`, `<=`. The `expression` is a -boolean expression that must return a boolean value. +The supported operators are `==`, `!=`, `&&`, `||`. The `expression` is a +binary expression that must return a boolean value. The `effects` array contains the list of effects of the condition. The following effects are supported: * `require`: Whether the field must be set for the condition to be met. diff --git a/fern/versions/beta.yml b/fern/versions/beta.yml index 3434011b..03579980 100644 --- a/fern/versions/beta.yml +++ b/fern/versions/beta.yml @@ -14,10 +14,6 @@ navigation: title: Changelog - section: Guides contents: - - page: Object customization - path: ../docs/pages/customization.mdx - - page: Custom objects - path: ../docs/pages/custom-objects.mdx - page: Account creation path: ../docs/pages/create-accounts.mdx - page: Agents async API diff --git a/fern/versions/public.yml b/fern/versions/public.yml index 3cc524fa..e4f1c7e5 100644 --- a/fern/versions/public.yml +++ b/fern/versions/public.yml @@ -68,6 +68,12 @@ navigation: - page: Restricted messages on a timeline slug: timeline-entries path: ../docs/pages/timeline-entries.mdx + - page: Object customization + slug: object-customization + path: ../docs/pages/object-customization.mdx + - page: Custom objects + slug: custom-objects + path: ../docs/pages/custom-objects.mdx - section: SDKs slug: sdks path: ../docs/pages/sdks/index.mdx