> For the complete documentation index, see [llms.txt](https://help.sdocs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sdocs.com/developer-hub/s-sign-system-architecture/s-sign-entity-relationship-diagram.md).

# S-Sign Entity-Relationship Diagram

```mermaid
erDiagram
    GENERIC_BASE_OBJECT {
        id Id PK
        string Name
        string ObjectApiName
    }

    SDOC__SDTemplate__c {
        id Id PK
        string SDOC__Base_Object__c
        boolean SDOC__Create_File__c
        boolean SDOC__Create_Attachment__c
    }

    SDOC__SDoc__c {
        id Id PK
        id SDOC__SDTemplate__c FK
        string SDOC__ObjectID__c
        string SDOC__ObjectType__c
        string SDOC__File_ID__c
        string SDOC__File_Version_ID__c
        string SDOC__Status__c
    }

    SSign__SSTemplate__c {
        id Id PK
        id SSign__SDTemplate__c FK
        string Name
        string SSign__Description__c
    }

    SSign__SSEnvelope__c {
        id Id PK
        string Name
        string SSign__Status__c
        id Base_Record_Id FK
    }

    SSign__SSEnvelope_Document__c {
        id Id PK
        string Name
        id SSign__SSEnvelope__c FK
        id SSign__SSTemplate__c FK
        id SSign__SDoc__c FK
        string SSign__Status__c
    }

    SSign__SSInput_Response__c {
        id Id PK
        id SSign__SSEnvelope_Document__c FK
        string Name
        string SSign__Value__c
        string SSign__Type__c
    }

    ContentDocument {
        id Id PK
        string Title
        id LatestPublishedVersionId FK
        string FileType
    }

    ContentVersion {
        id Id PK
        id ContentDocumentId FK
        string Title
        string VersionNumber
        boolean IsLatest
    }

    ContentDocumentLink {
        id Id PK
        id ContentDocumentId FK
        id LinkedEntityId FK
        string ShareType
        string Visibility
    }

    %% S-Sign specific relationships
    SDOC__SDTemplate__c ||--o{ SSign__SSTemplate__c : "SSign__SDTemplate__c"
    SSign__SSEnvelope__c ||--o{ SSign__SSEnvelope_Document__c : "SSign__SSEnvelope__c"
    SSign__SSTemplate__c ||--o{ SSign__SSEnvelope_Document__c : "SSign__SSTemplate__c"
    SDOC__SDoc__c ||--o{ SSign__SSEnvelope_Document__c : "SSign__SDoc__c"
    SSign__SSEnvelope_Document__c ||--o{ SSign__SSInput_Response__c : "SSign__SSEnvelope_Document__c"
    
    %% Base object relationships
    GENERIC_BASE_OBJECT ||--o{ SSign__SSEnvelope__c : "optional lookups per object API"

    %% Files architecture relationships
    ContentDocument ||--o{ ContentVersion : "Has versions"
    ContentDocument ||--o{ ContentDocumentLink : "ContentDocumentId"
    SSign__SSEnvelope_Document__c ||--o{ ContentDocumentLink : "LinkedEntityId"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.sdocs.com/developer-hub/s-sign-system-architecture/s-sign-entity-relationship-diagram.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
