End Users

What is an End User?
Copy

An End User of your Embedded integration is somebody who has Instances of your Solutions set up and configured for their own use.

They should be stored in your own user database, and when they are created using the createExternalUser API they will be stored in your Tray Embedded account.

They must be linked between these two databases using a common externalUserId, which is created in your database and then passed as a parameter when using the createExternalUser API.

They can be marked as test users to exclude them from account usage and billing.

End User auths
Copy

An End User can have one or more authentications for any 3rd party service.

When a Solution Instance is created for an End User, an authentication must be allocated to each service. This can be done by:

  • The End User creates a new auth in the Config Wizard / Auth-only dialog

  • The End User selects an existing auth in the Config Wizard / Auth-only dialog

  • Importing an auth on behalf of an End User using Create user Auth

The following diagram illustrates how auths are linked to End Users and can be re-used when needed.

Note, however that an End User may wish to have more than one auth for a service - e.g. to cater for different permission scopes and levels of access:

It is recommended that the externalUserId for each customer is set to match the internal id for them in your external database, to enable mapping between the two systems.

If you wish to associate an End User with a group (i.e. company / department) then the externalUserId can be linked to the internal id for that group in your database.

If desired, you could also link one or more users in your database to enable them to share a particular auth.

It is also possible to set static auths whereby all End Users of a particular instance automatically use the same auth

End User authentications are not accessible in the UI but can be queried via Get user authentications

Auths can be created using the Tray OAuth app or a custom OAuth app (preferred for white labelling /required depending on service).

Viewing End Users in the Tray UI
Copy

In the Tray UI it is possible to view End Users and their activated Solution Instances.

For each of their 'workflow instances' you can click on Debug to view a read-only version of their workflow and inspect the logs for troubleshooting purposes.

Here you are looking at a read-only version of the End User-specific version of the Workflow and if you want to make corrections you will have to return to the Source Workflow found in the original Project.

You will then need to update and publish the new version of your Solution as described in Updating Solution Instances.

When working with test End Users and test data, you can debug instances to fix any issues with your integration before publishing and discover what are likely recurring issues that may need to be managed.

It is then vital that you make use of the Embedded triggers to alert you of any issues in your integrations and to set up appropriate error handling

Test End Users
Copy

To exclude users from billing, you can mark them as test users. You can then assume the role of an End User and test your solutions.

You can create test users using the createExternalUser mutation - by setting isTestUser as 'true'.

You can also create end users through the UI when creating a solution instance:

To mark an existing user as a test user, you can toggle this setting using the updateExternalUser mutation.

You can also do this in the Tray admin UI: