> **Source:** https://knowledge.leegality.com/document-execution/integrations/salesforce/workflow-management > **Site:** Leegality Knowledge Base — https://knowledge.leegality.com > **About:** Leegality is a document execution platform covering eSigning, stamps, NeSL, workflows, and REST API integration. > **Navigation:** Every article on this site has a plain-text version at `.txt` (this format). To get an index of all articles with their `.txt` links, read: https://knowledge.leegality.com/llms.txt > **AI Guide:** For instructions on how to navigate this knowledge base as an AI agent, read: https://knowledge.leegality.com/ai-readable.txt --- # Workflow Management Admins bring Leegality workflows into Salesforce in two steps: **import** the workflow list from Leegality, then **link** each workflow to a Salesforce object by mapping its fields across a series of stages. Once linked and activated, a workflow becomes available to senders on that object's records. ## Import workflows from Leegality 1. As an admin, open the **Workflow Management** tab. 2. Click **Import Workflow**. 3. A confirmation appears on success, and the imported workflows are listed under the Workflow Management tab. > **Info — note** > > The workflow list is fetched when you visit the tab. If workflows change in Leegality, revisit the **Workflow Management** tab to fetch the latest details. > **Caution — Which workflows appear** > > Workflows with the **NeSL** invitee signing type, and workflows unpublished in Leegality, are filtered out and won't appear in Salesforce. ## Link a workflow Linking maps a workflow to a Salesforce object across six stages — object, document, template, PDF, and invitee mapping, followed by review and activation. Work through them in order. > **Tip — Pause anytime** > > You can pause linking at any stage. Unfinished workflows keep a **Draft** status with your progress stored — see [Draft workflows](#draft-workflows) for how drafts behave across admins. ### Object Mapping Map the source objects whose records will feed the workflow information like document name, invitee details, and so on. If no suitable object exists, create one in Salesforce before linking. 1. Open the **Workflow Management** tab. 2. Click **Link Workflow** next to the workflow. 3. Use the **Select Source Object** dropdown to choose the data source — the Salesforce object whose records will feed the workflow. 4. Optionally, select additional source object(s) that are in relation with the primary source object, such as Account and Contacts. 5. Click **Next**. ### Document Details Mapping Map the document details to object fields that will feed the document and stamp details. If you leave a field unmapped, the person sending the document can enter any value in that field. - **Document Name** — the name the document is saved and identified by in Leegality and Salesforce. - **Internal Reference Number** — your own reference number for tracking the document internally. - **Revenue Stamp Series** — must be a valid revenue stamp series with stamps in it. For example: `06`. - **Revenue Stamp Quantity** — the number of stamps you want to affix. Must be a whole number, e.g. `4`. - **Series Group** — the stamp series group to draw the stamp from. - **Series Value** — the denomination (value) of the stamp to be affixed. - **Stamp Series** — the specific stamp series used to stamp the document. > **Info** > > When a field value is predefined at the Leegality workflow level, it cannot be mapped to a Salesforce field. Click **Save and Proceed**. ### Template Fields Mapping This stage is conditionally available — it appears only if the workflow uses a template. For PDF-only workflows, this stage does not appear. If your template has fields, they are fetched from Leegality. You can map template fields to Salesforce fields and provide values. - Fields like Radio Button, Dropdown (single-selection), Checkbox (multi-select), and Image cannot be mapped to any Salesforce field. - Required fields must be either mapped to an object's field or given a value at this stage before proceeding. - If you leave an optional field unmapped or empty, the person sending the document can enter any value in that field. Click **Save and Proceed**. ### PDF Files Mapping You can upload multiple PDFs if allowed by the workflow creator. You can also leave this empty, in which case the person sending the document can upload the PDFs. Click **Add PDF File** to upload a PDF from your system. > **Info** > > **Upload limit:** 10 files. > **Maximum total size:** up to 15 MB combined for all PDFs. Click **Save and Proceed**. ### Invitee Details Mapping Map the invitee details. For each invitee, map the name, phone, and email address. If left unmapped, the person using the workflow to send the document can enter any value. Click **Save and Proceed**. ### Review and Activate Workflow Review the complete mapping on the **Activate Workflow** page. Use **Edit** to change a mapping, or go **Back** to return to a previous stage. #### Automatic upload of documents to Files Admins can configure a workflow to automatically upload the signed document and/or the Audit Trail to the Salesforce **Files** section once the process is complete. This removes the need to manually download and re-upload documents. 1. Enable the **Enable automatic upload of document(s) to Files** toggle (off by default). 2. After enabling, two more toggles appear (both on by default): - **Upload latest version of document** — the latest signed version is uploaded to Files, replacing any previously uploaded version. - **Upload Audit Trail after completion** — the Audit Trail is uploaded once the document is fully signed by all parties. > **Caution** > > If the selected object does not support Salesforce Files, a warning appears: *"'Files' is NOT linked with this object."* You can still save the configuration, but documents will not be stored in Files until the object is properly configured. When everything looks correct, click **Activate**. The workflow's status changes to **Linked** and it becomes available to senders on the mapped object's records. **How it works:** - When the document is sent, an initial copy is saved to the Files section automatically. - As the document progresses, the latest signed version replaces the previous version, and on completion the Audit Trail is added — based on your configuration. ## Give edit permission to the sender By default, senders send documents with the details mapped by the admin. To let senders edit details before sending: 1. Go to the **Workflow Management** tab. 2. Find the workflow and click its **toggle** to grant edit permission to the sender. ## Re-link a workflow Re-link a workflow when its mapping needs to change: 1. Open the **Workflow Management** tab. 2. Find the linked workflow and click **Relink**. 3. Work through the mapping stages again — **Object Mapping**, **Document Details**, **Template Fields**, **PDF Files**, and **Invitee Details** — clicking **Next** or **Save and Proceed** at each stage. 4. On the **Activate Workflow** page, review the summary and click **Activate** to re-link (or **Edit** to keep adjusting). > **Caution** > > Re-link cautiously to avoid disrupting in-flight processes. Verify all details thoroughly before activating. ## Draft workflows When a workflow's linking is paused mid-way: - All other admins can see the workflow, but it remains **unlinked**. - Other admins can work on the same workflow — but they **cannot see drafts** that another user has edited and saved. - Once linking completes, the workflow moves to the linked section and becomes visible to all admin users. ## Next step With workflows linked, [add the Sender Modal and start sending documents](https://knowledge.leegality.com/document-execution/integrations/salesforce/send-documents).