UX Customization Options

Endgrate provides an entire suite of UX customization options to fit your use case. All customization options are specified as body parameters when initiating a session.

Integration Provider Selection

By default, Endgrate will prompt the end user to choose the integration provider with which they would like to connect.

If you want to handle the integration provider selection process on your end, you can specify a provider such as hubspot or salesforce. Endgrate will skip the selection screen and redirect to the integration provider's authentication screen.

To get a list of all available integration providers, use the GET api/integrations endpoint.

Example

curl --request POST \
     --url https://endgrate.com/api/session/initiate \
     --header 'accept: application/json' \
     --header 'authorization: Bearer API_KEY' \
     --header 'content-type: application/json' \
     --data '
{
  "schema": [
    {
    	"endgrate_type": "crm-contact",
    }
  ],
  "provider": "hubspot"
}
'

Schema Selection

By default, every schema you specify will be "selected", meaning that it is available for you to interface with (push/pull data) after the end user configures the session.

When the schema_selection flag is on, Endgrate will prompt the end user to choose which schemas to push and pull. This is useful if you want your end users to have more granular control over integration access.

If the passthrough_schemas flag is on in addition to this flag, Endgrate will also prompt the user to choose which passthrough schemas (custom objects) to push and pull. However, if this flag isn't on but the passthrough_schemas flag is on then all the Endgrate and custom schemas for the current provider will be selected.

You can get the selected schemas (and selected passthrough schemas if applicable) via the GET api/session/configuration endpoint (we'll review this endpoint in a later guide).

Example

curl --request POST \
     --url https://endgrate.com/api/session/initiate \
     --header 'accept: application/json' \
     --header 'authorization: Bearer API_KEY' \
     --header 'content-type: application/json' \
     --data '
{
  "schema": [
    {
    	"endgrate_type": "crm-contact",
    }
  ],
  "schema_selection": "true"
}
'

Resource Selection

By default, schemas will be matched to a corresponding integration provider resource by their endgrate_type.

When the resource_selection flag is on, Endgrate will prompt the end user to choose an integration provider resource for each schema. This is useful in rare cases in which a direct match is not appropriate, such as when you have an unspecified endgrate_type.

Example

curl --request POST \
     --url https://endgrate.com/api/session/initiate \
     --header 'accept: application/json' \
     --header 'authorization: Bearer API_KEY' \
     --header 'content-type: application/json' \
     --data '
{
  "schema": [
    {
    	"endgrate_type": "crm-contact",
    }
  ],
  "resource_selection": "true"
}
'

Field Selection

By default, Endgrate's AI engine automatically maps fields in your standardized schema to fields for the integration provider.

When the field_selection flag is on, Endgrate will prompt the end user to review/edit the field mapping,

If the passthrough_fields flag is on in addition to this flag, Endgrate will also prompt the user to choose which passthrough fields (custom fields) to add.

Example

curl --request POST \
     --url https://endgrate.com/api/session/initiate \
     --header 'accept: application/json' \
     --header 'authorization: Bearer API_KEY' \
     --header 'content-type: application/json' \
     --data '
{
  "schema": [
    {
    	"endgrate_type": "crm-contact",
    }
  ],
  "field_selection": "true"
}
'

Statistics

When the statistics flag is on, the end user will be redirected to a statistics screen after configuring the session.

Example

curl --request POST \
     --url https://endgrate.com/api/session/initiate \
     --header 'accept: application/json' \
     --header 'authorization: Bearer API_KEY' \
     --header 'content-type: application/json' \
     --data '
{
  "schema": [
    {
    	"endgrate_type": "crm-contact",
    }
  ],
  "statistics": "true"
}
'

Redirect URL

When a redirect_url is specified, the end user will be redirected to the provided URL after configuring the session.

Example

curl --request POST \
     --url https://endgrate.com/api/session/initiate \
     --header 'accept: application/json' \
     --header 'authorization: Bearer API_KEY' \
     --header 'content-type: application/json' \
     --data '
{
  "schema": [
    {
    	"endgrate_type": "crm-contact",
    }
  ],
  "redirect_url": "https://website.com"
}
'