Custom configuration operation

Modified on Wed, 2 Dec at 3:39 PM

Custom configuration operation

The custom configuration operation enables a custom integration. The process of connecting an external service is very similar to the one in Documotor.

With a custom configuration, Create can fetch data from any HTTP service while a document is made, for example case details from a case system.

Set up the integration

  1. Open the unit's Integrations, click New integration and select Custom configuration.
  2. Under Authentication, choose how Create signs in to the service: None, Static header, WSO2, OAuth2 or OAuth2ClientCredentials. The settings are the same as for Generic server delivery.
  3. Under Operations, click Add Operation + for each call you need. Give it an Operation Name, choose GET or POST, and enter the Endpoint URL.
  4. Optionally, set Static Header Key and Static Header Value, for example X-Api-Key. Create sends this header with every request.

Call an operation

Call an operation from a transformation with the service function: the name of the integration, the name of the operation, and the data to send.

service('CaseSystem', 'getCase', {caseId: caseId})
  • A part of the URL that starts with a colon, such as /cases/:caseId, is filled with the value of that property from the data.
  • With GET, the other properties are added to the URL as query parameters. With POST, they are sent as JSON in the request body.
  • The function returns the response from the service, which you can use in the rest of the transformation.

When the service fails

If the service answers with an error, service stops the document and shows the reason. If it answers with 401 Unauthorized, the reason is "Access token expired.".

To make the document anyway, use cached_service with true as the fourth argument. It returns null when the call fails. cached_service also reuses the result of an identical earlier call instead of calling the service again.

Good to know

  • The call is made from Create's servers each time a preview or document is made, so the service must be reachable from Create.
  • All calls use the integration's sign-in, not the user's.
  • Pagination type has no effect on calls made with service.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article