# Configure Global Settings

### ⚙️ Phase 2: Configuration

#### Step 1: Create Remote Site Settings

S-Sign uses SendGrid to ensure verification emails bypass Salesforce email limitations.

* Navigate to **Setup > Remote Site Settings > New Remote Site**.
* Remote Site Name: `SSign_Email_Verification_Site`
* Remote Site URL: `https://api.sendgrid.com`
* Active: Ensure this box is checked.

#### Step 2: Create a Salesforce Site

This allows external signers to access and sign documents within your Salesforce environment.

1. Navigate to **Setup > Sites**.
2. Register a Domain: If you haven't already, register a **Force.com domain**.
3. Create New Site: Click New and fill in the following:
   * **Site Label:** `S-Sign Site`
   * **Site Name:** `S_Sign_Site`
   * **Active:** Check this box.
   * **Active Site Homepage:** Set to `Under Construction`.
   * **CRITICAL:** Uncheck "Lightning Features for Guest Users" for security compliance.
4. Assign Visualforce Pages: On the Site Detail page, scroll to Site Visualforce Pages, click Edit, and add:
   * `SDOC.SDTemplateHTML`
   * `SSign.SSMultiSign`
   * `SSign.SSCreateSig`
   * `SSign.SSTemplatePDF`
   * `SSign.SSVerify`
   * `SSign.SSViewEnvIncl`
5. Security Check: Navigate to **Setup > Session Settings** and ensure "**Use Lightning Web Security for Lightning web components and Aura components**" is Checked.

#### Step 3: Create a Lookup Field

You must link your specific Salesforce object to the S-Sign Envelope object.

*Note: Skip this step if using Standard objects like Opportunity, Contact, Quote and Account; the lookup field is pre-configured for these out-of-the box.*

1. Navigate to **Object Manager > S-Sign Envelope** (Object)
2. Go to **Fields & Relationships > New**
3. Data Type: Select **`Lookup Relationship`**
4. Related To: Select your desired object (e.g., a Custom Object).
5. Naming Convention (Custom Objects): \* **Field Label**: Name of the object.
   * Field Name: Object API name ending in `_c` (not `__c`). *Example: `CustomObject_c`*.

#### Step 4: Provide Site Info

1. Navigate to **S-Docs Setup > Go To S-Sign Setup Page**.
2. Site URL: Copy the URL from your Salesforce Site (from Step 2).
   * Use the URL ending in `secure.force.com` if available.
   * Ensure it begins with `https://`.
3. Click **Set Site Info & Assign Permissions**.

#### Step 5: License Management

1. On the S-Sign Setup page, click Go To S-Sign License Page.
2. Enter Key: Input your license key provided by S-Docs.
3. Assign Users: Select users from the list and click Add Selected Users.

***

### 🛡️ Phase 3: Production-Specific Steps

#### Step 5B: Assign Licenses to Site Guest User

1. Navigate to **Setup > Sites > \[Your S-Sign Site]**.
2. Click **Public Access Settings > View Users**.
3. Click the **Site Guest User** record.
4. Scroll to Managed Packages and click **Assign Licenses**.
5. Add both **SDocs** and **SSign**.

Note: This step is only required in Production environments.

#### Step 5C: Establish Org-Wide Email Address

To ensure confirmation and subsequent emails are sent correctly, you’ll need to have an Organization-Wide Email Address configured.

* If you **already have a valid Organization-Wide Email Address set up**, and it matches your Site Guest User email, you can **skip this step**.
* If not, please follow the steps below:

1. Go to **Setup → Organization-Wide Addresses → Add**
2. Add an email address that matches the **Site Guest User email**
3. Select **“Allow All Profiles to Use this From Address”** and complete the verification
4. Update the **Site Guest User record** so its email matches this address

**Note:** This setup is required for sending confirmation and subsequent emails successfully.

To ensure confirmation and subsequent signature request emails are sent correctly, you’ll need to have an Organization-Wide Email Address configured on the Site Guest User.

* If you **already have a valid Organization-Wide Email Address set up**, and it matches your Site Guest User email, you can **skip to Step 2**.
* If not, please follow the steps below:

1. Go to **Setup → Organization-Wide Addresses → Add**
2. Add an email address that matches the **Site Guest User email**
3. Select **“Allow All Profiles to Use this From Address”** and complete the verification
4. Update the **Site Guest User record** so its email matches this address

**Note:** This setup is required for sending confirmation and subsequent emails successfully. If the Site Guest User is not configured with a vaild Org-wide email address you may notice emails after the first intial request not being sent out.

***

### 💡 Pro Tips

* Keep Tabs Minimum: Avoid having multiple Setup tabs open to prevent settings from being overwritten.
* Bulk Licensing: Use the global function `SSIGN.SSLicensesController.addSSignUserLicenses(userIds)` in Apex to assign licenses to large groups of users simultaneously.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.sdocs.com/quick-start/s-sign-setup/configure-global-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
