Often forms submissions will require a receipt or reference to be captured and potentially displayed to the person submitting the form. To assist with this we have included the Receipt Generation function in the platform. 

This will allow you to configure an endpoint that is called before the form loads to generate an external ID for that form submission.

Additionally to the receipt generation, there is often a need to be able to personalise the content of the form based on the logged in user.  To account for that this feature also allows developers to add data to the form. 


Add a custom URL or a hosted API endpoint to the form summary page. 

Configure an API endpoint for the form to generate a receipt number that can be used to search for submissions. The endpoint will be called prior to form load.


Below is an example of the POST request payload

   formsAppId: number
    formId: number
    externalIdUrlSearchParam: string | null
    draftId: string | null
    preFillFormDataId: string | null
    jobId: string | null
    previousFormSubmissionApprovalId: string | null

Below is an example of the response payload

    externalId: string, 
    submission: { 
        [formElementName]: any 
    elements: FormElement[]

Display Receipt Id to Users

Now that you are creating and capturing your external Id you can display it in a receipt form to your users. 

This can be done using the OneBlink pre-fill, and redirect URL functionality. 

Simply create you receipt page and add it as a redirect URL to your form. 

Once you have added the below to the end of the redirect URL, be sure to add the name of the element you want to pre-fill with the external Id. 

?preFillData={"name of your element":"{EXTERNAL_ID}"}

Get Help

If you have any question or would like assistance with setting up your Receipt Generation please contact us via this support portal or email support@oneblink.io. We are happy to assist in any way we can.