Skip to content

Commit

Permalink
Merge branch 'DDOC-833-templates' of github.com:box/developer.box.com…
Browse files Browse the repository at this point in the history
… into staging
  • Loading branch information
bszwarc committed Aug 29, 2023
2 parents b0d6c06 + ad9761b commit 7a3eca3
Show file tree
Hide file tree
Showing 4 changed files with 375 additions and 87 deletions.
129 changes: 43 additions & 86 deletions content/guides/box-sign/create-sign-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,36 @@ rank: 1

# Create Box Sign Request

At a minimum, using the [create Box Sign request endpoint][create] requires
selecting a file for signature, a destination folder for the signed
document/[signing log][log], and designating signers.
At minimum, to [create Box Sign request][create] you need
the a file you want to be signed, a destination folder for the signed
document/[signing log][log], and signers.

<Samples id='post_sign_requests' />

## Document preparation

Preparing a document prior to sending a Box Sign request allows developers to
add date, text, checkbox, and/or signature placeholders for signers. This can be
done via a UI or [tags][tags] directly in the document. If this is not done,
signers receive an unprepared document and can place signatures and fields at
their own discretion. However, developers can leverage controls in the request
that allow them to turn on and off features for the unprepared document.

Setting `is_document_preparation_needed` to `true` provides a `prepare_url` in
the response. Visiting this link in your browser allows you to complete document
preparation and send the request via UI.

To learn more about document tags, please see our [support article][tags].

<Message type='warning'>
Prefill tags created in a template via the Box web app cannot be accessed from
the API.
</Message>

<ImageFrame border center shadow>
![Prepare options](images/prepare.png)
</ImageFrame>

## Files

Each Box Sign request begins with a file that needs to be signed. If the file
Expand Down Expand Up @@ -47,8 +71,7 @@ cannot be the All Files or root level, which is represented by folder ID `0`.

## Signers

Each signer must be assigned a [role][role]: signer, approver, or final copy
reader.
Each signer must be assigned a [role][role]: `signer`, `approver`, or `final copy_reader`.

If the requester is not given a role, a signer with the role `final_copy_reader`
is automatically created. This means they only receive a copy of the final,
Expand All @@ -70,6 +93,19 @@ aliases unless specified. Please double check to ensure all provided signer
email addresses are valid.
</Message>

### Inputs

The `inputs` parameter represents placeholders that the user can interact with.
The `document_tag_id` parameter can be populated with data you want to
pass when creating a sign request.

## Templates

You can create a sign request using a template.
To do so, you must provide the `template_id` parameter.
See [this guide][templates] to learn more about using templates
when creating sign requests.

## Redirects

The URLs specified in the `redirect_url` and `declined_redirect_url`
Expand Down Expand Up @@ -113,86 +149,6 @@ request email. The overall request is declined.
![Multiple signer flow](images/multiple_signer_flow.png)
</ImageFrame>

## Document preparation

Preparing a document prior to sending a Box Sign request allows developers to
add date, text, checkbox, and/or signature placeholders for signers. This can be
done via a UI or [tags][tags] directly in the document. If this is not done,
signers receive an unprepared document and can place signatures and fields at
their own discretion. However, developers can leverage controls in the request
that allow them to turn on and off features for the unprepared document.

Setting `is_document_preparation_needed` to `true` provides a `prepare_url` in
the response. Visiting this link in your browser allows you to complete document
preparation and send the request via UI.

To learn more about document tags, please see our [support article][tags].

<Message type='warning'>
Prefill tags created in a template via the Box web app cannot be accessed from
the API.
</Message>

<ImageFrame border center shadow>
![Prepare options](images/prepare.png)
</ImageFrame>

## Embedded Sign client

[Box Embed][embed] allows you to embed Box Sign
features into your own website. This way, users
don't have to leave the website, go to Box Sign
to sign the document, and then come back to finish
the process.
Instead, Box Embed allows them
to complete the signing process
within the external website.

To integrate Box Sign experience within your
own website, you need the `iframable_embed_url`
parameter that is specifically designed to allow
signing documents within the HTML `iframe` tag.

<!-- markdownlint-disable line-length -->

A sample `iframable_embed_url` looks as follows:

```sh
https://app.box.com/embed/sign/document/f14d7098-a331-494b-808b-79bc7f3992a3/f14d7098-a331-494b-808b-79bc7f3992a4
```

To get the `iframeable_embed_url` pass the [`embed_url_external_user_id`][externalid] parameter for each signer when calling the [create sign request][signrequest] endpoint.
The returned response will contain a unique `iframeable_embed_url` for that signer.

To embed Sign features and make them
available to the users,
use the URL within the `iframe` tag:

```sh
<iframe
src="https://app.box.com/embed/sign/document/f14d7098-a331-494b-808b-79bc7f3992a3/f14d7098-a331-494b-808b-79bc7f3992a4"
width="{pixels}"
height="{pixels}"
frameborder="0"
allowfullscreen
webkitallowfullscreen
msallowfullscreen
></iframe>
```

<!-- markdownlint-enable line-length -->

<Message>
For details on working with Box Embed, see [this guide][embedguide].
</Message>

Box Embed uses the [Cloud Game][cloudgame] widget to
prevent clickjacking.
In this case, when the user wants to sign
a document, they will have to interact
with the widget and drag a cloud to the correct
location before proceeding to document signing.

## Request status

- `converting`: The file is converted to a `.pdf` for the signing process once
Expand Down Expand Up @@ -240,4 +196,5 @@ Encountering an error status requires creating a new sign request to retry.
[embedguide]: g://embed/box-embed#programmatically
[signrequest]: e://post-sign-requests
[externalid]: e://post-sign-requests#param-signers-embed_url_external_user_id
[cloudgame]: g://embed/box-embed#cloud-game
[cloudgame]: g://embed/box-embed#cloud-game
[templates]: g://box-sign/sign-templates
71 changes: 71 additions & 0 deletions content/guides/box-sign/embedded-sign-client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
rank: 6
related_endpoints: []
related_guides: []
required_guides: []
related_resources: []
alias_paths:
- guides/box-sign/create-sign-request/#embedded-sign-client
---

# Embedded Sign client

[Box Embed][embed] allows you to embed Box Sign
features into your own website. This way, users
don't have to leave the website, go to Box Sign
to sign the document, and then come back to finish
the process.
Instead, Box Embed allows them
to complete the signing process
within the external website.

To integrate Box Sign experience within your
own website, you need the `iframable_embed_url`
parameter that is specifically designed to allow
signing documents within the HTML `iframe` tag.

<!-- markdownlint-disable line-length -->

A sample `iframable_embed_url` looks as follows:

```sh
https://app.box.com/embed/sign/document/f14d7098-a331-494b-808b-79bc7f3992a3/f14d7098-a331-494b-808b-79bc7f3992a4
```

To get the `iframeable_embed_url` pass the [`embed_url_external_user_id`][externalid] parameter for each signer when calling the [create sign request][signrequest] endpoint.
The returned response will contain a unique `iframeable_embed_url` for that signer.

To embed Sign features and make them
available to the users,
use the URL within the `iframe` tag:

```sh
<iframe
src="https://app.box.com/embed/sign/document/f14d7098-a331-494b-808b-79bc7f3992a3/f14d7098-a331-494b-808b-79bc7f3992a4"
width="{pixels}"
height="{pixels}"
frameborder="0"
allowfullscreen
webkitallowfullscreen
msallowfullscreen
></iframe>
```

<!-- markdownlint-enable line-length -->

<Message>
For details on working with Box Embed, see [this guide][embedguide].
</Message>

Box Embed uses the [Cloud Game][cloudgame] widget to
prevent clickjacking.
In this case, when the user wants to sign
a document, they will have to interact
with the widget and drag a cloud to the correct
location before proceeding to document signing.

[embed]: g://embed/box-embed
[embedguide]: g://embed/box-embed#programmatically
[signrequest]: e://post-sign-requests
[externalid]: e://post-sign-requests#param-signers-embed_url_external_user_id
[cloudgame]: g://embed/box-embed#cloud-game
2 changes: 1 addition & 1 deletion content/guides/box-sign/list-sign-requests.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
rank: 2
rank: 5
---

# List Box Sign Requests
Expand Down
Loading

0 comments on commit 7a3eca3

Please sign in to comment.