├── .gitignore ├── README.md ├── docs ├── DocumentWrapper.md ├── Item.md ├── JSONBuilder.md ├── Recipient.md ├── SourceNode.md ├── TriggerManager.md ├── TriggerTemplate.md └── pandadoc__PandaDocDocument__c.md ├── examples ├── .forceignore ├── config │ └── minimal_setup-scratch-def.json ├── force-app │ └── main │ │ └── default │ │ ├── classes │ │ ├── CustomPricingItems.cls │ │ ├── CustomPricingItems.cls-meta.xml │ │ ├── CustomRecipients.cls │ │ ├── CustomRecipients.cls-meta.xml │ │ ├── CustomRelation.cls │ │ ├── CustomRelation.cls-meta.xml │ │ ├── DefaultBehaviorBuilder.cls │ │ ├── DefaultBehaviorBuilder.cls-meta.xml │ │ ├── DocumentHandler.cls │ │ ├── DocumentHandler.cls-meta.xml │ │ ├── ExtraTokens.cls │ │ ├── ExtraTokens.cls-meta.xml │ │ ├── MinimalJsonBuilder.cls │ │ └── MinimalJsonBuilder.cls-meta.xml │ │ ├── flexipages │ │ ├── CustomObject_Record_Page.flexipage-meta.xml │ │ └── Opportunity_Record_Page.flexipage-meta.xml │ │ ├── installedPackages │ │ └── pandadoc.installedPackage-meta.xml │ │ ├── layouts │ │ ├── CustomObject__c-CustomObject Layout.layout-meta.xml │ │ └── OpportunityLineItem-Opportunity Product Layout.layout-meta.xml │ │ ├── objects │ │ ├── CustomObject__c │ │ │ ├── CustomObject__c.object-meta.xml │ │ │ ├── fields │ │ │ │ ├── Contact__c.field-meta.xml │ │ │ │ ├── CustomText__c.field-meta.xml │ │ │ │ └── Product__c.field-meta.xml │ │ │ └── listViews │ │ │ │ └── All.listView-meta.xml │ │ └── Opportunity │ │ │ ├── Opportunity.object-meta.xml │ │ │ ├── fields │ │ │ ├── AccountId.field-meta.xml │ │ │ ├── Amount.field-meta.xml │ │ │ ├── CampaignId.field-meta.xml │ │ │ ├── CloseDate.field-meta.xml │ │ │ ├── ContractId.field-meta.xml │ │ │ ├── Description.field-meta.xml │ │ │ ├── ExpectedRevenue.field-meta.xml │ │ │ ├── IqScore.field-meta.xml │ │ │ ├── IsPrivate.field-meta.xml │ │ │ ├── LeadSource.field-meta.xml │ │ │ ├── Name.field-meta.xml │ │ │ ├── NextStep.field-meta.xml │ │ │ ├── OwnerId.field-meta.xml │ │ │ ├── Pricebook2Id.field-meta.xml │ │ │ ├── Probability.field-meta.xml │ │ │ ├── StageName.field-meta.xml │ │ │ ├── TotalOpportunityQuantity.field-meta.xml │ │ │ ├── Type.field-meta.xml │ │ │ └── pandadoc__TrackingNumber__c.field-meta.xml │ │ │ └── listViews │ │ │ └── Default_Opportunity_Pipeline.listView-meta.xml │ │ ├── pages │ │ ├── PandaDocForCustomObject.page │ │ └── PandaDocForCustomObject.page-meta.xml │ │ ├── profiles │ │ ├── Admin.profile-meta.xml │ │ ├── Custom%3A Marketing Profile.profile-meta.xml │ │ ├── Custom%3A Sales Profile.profile-meta.xml │ │ └── Custom%3A Support Profile.profile-meta.xml │ │ ├── tabs │ │ └── CustomObject__c.tab-meta.xml │ │ └── triggers │ │ ├── PandaDocDocumentTrigger.trigger │ │ └── PandaDocDocumentTrigger.trigger-meta.xml └── sfdx-project.json └── screenshots ├── 01-quick-setup-btn.png ├── 02-adding-screen.png ├── 03-builder-setup.png ├── 04-custom-builder-btn.png ├── 05-adding-custom-builder.png ├── 06-new-trigger-btn.png └── 07-trigger-setup.png /.gitignore: -------------------------------------------------------------------------------- 1 | # GitIgnore for Salesforce Projects 2 | # Project Settings and MetaData 3 | .project 4 | .settings/ 5 | .metadata 6 | build.properties 7 | 8 | # Apex Log as optional 9 | apex-scripts/log 10 | 11 | # Eclipse specific 12 | salesforce.schema 13 | Referenced Packages 14 | bin/ 15 | tmp/ 16 | *.tmp 17 | *.bak 18 | local.properties 19 | .settings 20 | .loadpath 21 | .classpath 22 | *.cache 23 | 24 | # Mavensmate 25 | *.sublime-project 26 | *.sublime-settings 27 | *.sublime-workspace 28 | mm.log 29 | 30 | # IDEA 31 | .idea 32 | *.iml 33 | IlluminatedCloud 34 | 35 | # OSX-specific exclusions 36 | .[dD][sS]_[sS]tore 37 | 38 | .sfdx 39 | 40 | .vscode -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Code examples for PandaDoc Salesforce package extensions 2 | 3 | This repository contains code examples and available API methods for PandaDoc extension for Salesforce CRM. 4 | Our [AppExchange page](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000DvMrEUAV) 5 | 6 | Sometimes standard functionality of PandaDoc package is not enough. 7 | For this reason our package provides API for implementing additional customizations for specific business cases. 8 | 9 | Currently PandaDoc package provides two different types of API for package extensions. 10 | 11 | 1. ## JSON builders. 12 | JSON builders are used for passing data from Salesforce to PandaDoc document. It is a class which implements `pandadoc.JsonBuilder` interface. JSON builder can pass this data into PandaDoc: 13 | - tokens 14 | - document name 15 | - pricing items 16 | - recipients 17 | - metadata 18 | 19 | 2. ## Trigger handlers 20 | Every time a document's state changes PandaDoc sends a new document payload in JSON format into SFDC. Our package saves this data into [pandadoc__PandaDocDocument__c](docs/pandadoc__PandaDocDocument__c.md) object. Our API provides a simplified solution for handling these changes via SF triggers. Currently we send the following events to SFDC side: 21 | - `document_state_changed`: document status was changed or new document created. You get this event every time a document is sent\paid\approved\etc 22 | - `recipient_completed`: some recipients filled all required input fields 23 | - `document_deleted`: document was deleted 24 | - `document_updated`: sent or completed document was edited (moved to draft). New document version was generated. 25 | 26 | # How to use these examples 27 | 28 | All examples are in the `examples` folder. This is a SFDX project, [here you can find more info on how to work with SFDX](https://developer.salesforce.com/tools/sfdxcli). We highly recommend to upload this source code into a test or sandbox organization and run tests there. By default, [this source code already has installedPackage](examples/force-app/main/default/installedPackages/pandadoc.installedPackage-meta.xml), you do not need to install our package manually. It already has the configured simple custom object. 29 | 30 | # StandardJsonBuilder 31 | 32 | PandaDoc package provides StandardJsonBuilder. This builder can be configured to provide: 33 | - set of tokens 34 | - related recipients 35 | - related pricing items 36 | - document name 37 | - send object itself as recipient(useful for objects like Lead, Contact or Account) 38 | 39 | This builder can be configured via UI. The provided functionality should be enough to cover your business requirements. You do not need to create new Apex classes. Use `PandaDoc Quick Setup` button on `PandaDoc Setup` page to use already provided functionality. 40 | 41 | ![quick setup](screenshots/01-quick-setup-btn.png) 42 | ![adding screen](screenshots/02-adding-screen.png) 43 | ![builder setup](screenshots/03-builder-setup.png) 44 | 45 | # Custom JSON builder examples 46 | 47 | In `examples` folder you can find the source code for JSON builders: 48 | - [MinimalJsonBuilder](examples/force-app/main/default/classes/MinimalJsonBuilder.cls): this is a minimal required JSON Builder. It respects document name and tokens list which was configured via `PandaDoc Setup page`. **Recipients and pricing items will always be empty**. 49 | 50 | NOTE: Make sure that class has `global` access level. 51 | 52 | - [CustomRecipients](examples/force-app/main/default/classes/CustomRecipients.cls): This example adds two recipients to the document. One is generated via related contact, another is a hardcoded recipient. 53 | 54 | - Method `getObjectContact` shows how to generate recipients from SObject. This method respects the `Recipient Mapping` setting from `PandaDoc Setup`. 55 | 56 | NOTE: To avoid `System.SObjectException: SObject row was retrieved via SOQL without querying the requested field` error please re-select provided sobject for every required operation like "form recipients" or "form pricing items" 57 | 58 | - Method `getPredefinedRecipient` shows how to generate recipients for any kind of data. This method might not work with recipient mapping from `PandaDoc Setup` page but allows to generate recipients almost from everything. 59 | 60 | Additional information about `Recipient` object [here](docs/Recipient.md) 61 | 62 | - [CustomPricingItems](examples/force-app/main/default/classes/CustomPricingItems.cls): Similar to `CustomRecipients` shows how to add pricing items into document. 63 | 64 | NOTE: By default the package does not have pricing item mapping for Product2 object. 65 | NOTE: Currently we are not providing any public API to use sorting settings from Pricing Items mapping page. This is an experimental feature and public access for third party customizations will be added later. 66 | 67 | Additional information about `Item` object [here](docs/Item.md) 68 | 69 | - [ExtraTokens](examples/force-app/main/default/classes/ExtraTokens.cls): This builder adds additional tokens to a document. The document will have tokens which were selected in the `PandaDoc Setup` page. 70 | 71 | - [CustomRelation](examples/force-app/main/default/classes/CustomRelation.cls): This builder shows how to link document to additional object. Every new document be shown on CustomObject and on related contact. See: [SourceNode](docs/SourceNode.md) 72 | 73 | - [DefaultBehaviorBuilder](examples/force-app/main/default/classes/DefaultBehaviorBuilder.cls): This example shows how to add default behavior for recipients and pricing items from default builder. You can as use default value as modify them according to business requirements. 74 | 75 | 76 | Please note. Currently not possible to add Setup button for custom builders. As workaround possible to add builder via the PandaDoc Quick Setup button. Configure builder and after that just add your custom builder without removing Standard Builder. All your setting be saved except that your class be used insted of default class. 77 | 78 | To use custom JSON builder class, upload examples to target organization with installed PandaDoc package. After that, click on the `Add Custom JSON Builder` button and in the showed popup window, please enter the class name for the selected SObject. 79 | 80 | ![custom-builder-btn](screenshots/04-custom-builder-btn.png) 81 | ![adding-custom-builder](screenshots/05-adding-custom-builder.png) 82 | 83 | # VisualForce inline page for classic UI 84 | We highly recommend using Lightning Component for adding PandaDoc to SObject pages. [Here you can find how to set up PandaDoc in Salesforce Lightning](https://support.pandadoc.com/hc/en-us/articles/360019828554-Salesforce-Lightning-Standard-setup-). 85 | 86 | If you’re using Salesforce Classic, you need to create a new Visualforce page for every object in which you want to use PandaDoc. Contact, Lead, Account and Opportunity are already include VF pages in package. 87 | 88 | [Here you can find more info about configuring PandaDoc for the Salesforce Classic UI](https://support.pandadoc.com/hc/en-us/articles/360007816454-Salesforce-Classic-Add-PandaDoc-to-custom-objects). 89 | 90 | # Trigger handler example 91 | 92 | [DocumentHandler](examples/force-app/main/default/classes/DocumentHandler.cls) provides an example of trigger handler. This simple handler updates OpportunityLineItem quantity and unit price from PandaDoc document. This handler still can not be executed without a properly created trigger for `pandadoc__PandaDocDocument__c` object. Please look at [PandaDocDocumentTrigger](examples/force-app/main/default/triggers/PandaDocDocumentTrigger.trigger). Please look at `pandadoc.TriggerTemplate.TriggerManager` object. This object provides possibility to work with `Document trigger settings` from the `PandaDoc setup` page. 93 | 94 | For adding a custom Trigger to PandaDoc upload all source code into organization and click on `Add new trigger` button. 95 | ![new-trigger-btn](screenshots/06-new-trigger-btn.png) 96 | 97 | On PopUp window enter title for new handler(any human readable text) and an internal trigger name. This name will be a unique identificator for this trigger and this name should be used with `pandadoc.TriggerManager.isTriggerEnabled` method. 98 | 99 | ![new-trigger-setup](screenshots/07-trigger-setup.png) 100 | 101 | If everything has been configured correctly you will have a possibility to enable\disable trigger handlers right from the PandaDoc setup page. 102 | 103 | # Additional API reference 104 | - [Item](docs/Item.md): wrapper for document pricing item 105 | - [Recipient](docs/Recipient.md): wrapper for document recipient 106 | - [JSONBuilder](docs/JSONBuilder.md): base class for custom JSON builders 107 | - [pandadoc__PandaDocDocument__c](docs/pandadoc__PandaDocDocument__c.md): Database object which represents PandaDoc document 108 | - [DocumentWrapper](docs/DocumentWrapper.md): wrapper for document payload. Used in triggers 109 | - [TriggerTemplate](docs/TriggerTemplate.md): util classes for implementing custom trigger handlers 110 | - [TriggerManager](docs/TriggerManager.md): API for trigger settings 111 | - [SourceNode](docs/SourceNode.md): Represents an entity which linked with document -------------------------------------------------------------------------------- /docs/DocumentWrapper.md: -------------------------------------------------------------------------------- 1 | # DocumentWrapper 2 | 3 | Parse PandaDoc document JSON payload and provide simple API to access document data 4 | 5 | ## Methods 6 | 7 | - `static List parseFromJson(String jsonData)`: Used to fill in document data from JSON string. 8 | 9 | pandadoc.DocumentWrapper wrapper = pandadoc.DocumentWrapper.parseFromJson( 10 | newValue.pandadoc__InputJSON__c)[0]; 11 | 12 | ## Variables 13 | - `global String event`: last event for this document. Possible values: 14 | - `document_state_changed`: document status was changed or new document was created. You get this event every time a document is sent\paid\approved\etc 15 | - `recipient_completed`: a recipient filled all required input fields 16 | - `document_deleted`: document was deleted in PandaDoc application 17 | - `document_updated`: sent or completed document was edited (moved to draft status). New document version was generated. 18 | - `global DocumentWrapper.DocumentData data`: document data wrapper. See [DocumentData](#documentwrapperdocumentdata) 19 | 20 | 21 | # DocumentWrapper.DocumentData 22 | 23 | Represents PandaDoc document data 24 | 25 | ## Variables 26 | - `global DocumentWrapper.DocumentPerson action_by`: available only for `recipient_completed` event. Represents a recipient who filled in document data. Equal to `null` otherwise. See [DocumentPerson](#documentwrapperdocumentperson) 27 | - `global DocumentWrapper.PandaDocUser created_by`: PandaDoc user who created the document. See [PandaDocUser](#documentwrapperpandadocuser) 28 | - `global Datetime date_created`: when document was created 29 | - `global Datetime date_modified`: when document was edited 30 | - `global String id`: PandaDoc document Id 31 | - `global Map metadata`: document metadata 32 | - `global SourceNode source_node`: link between PandaDoc document and Salesforce SObject. See: [SourceNode](SourceNode.md) 33 | - `global String name`: document name 34 | - `global List products`: list of document pricing items. See [DocumentProducts](#documentwrapperdocumentproducts) 35 | - `global List recipients`: list of document recipients. See [DocumentRecipient](#documentwrapperdocumentrecipient) 36 | - `global DocumentWrapper.PandaDocUser sent_by`: PandaDoc user who sent the document. 37 | - `global String status`: Document status on PandaDoc side. Possible values: 38 | - `document.draft` 39 | - `document.sent` 40 | - `document.completed` 41 | - `document.viewed` 42 | - `document.waiting_approval` 43 | - `document.rejected` 44 | - `document.approved` 45 | - `document.waiting_pay` 46 | - `document.paid` 47 | - `document.expired` 48 | - `document.declined` 49 | 50 | 51 | # DocumentWrapper.DocumentPerson 52 | Base class for users\recipients 53 | - `global String email`: email 54 | - `global String first_name`: first name 55 | - `global String last_name`: last name 56 | - `global String id`: PandaDoc id 57 | 58 | # DocumentWrapper.PandaDocUser 59 | Extends from [DocumentPerson](#documentwrapperdocumentperson) and has all fields from parent. 60 | - `global String avatar`: url to user avatar image 61 | 62 | # DocumentWrapper.DocumentRecipient 63 | Extends from [DocumentPerson](#documentwrapperdocumentperson) and has all fields from parent. 64 | - `global Boolean has_completed`: `true` the recipient has completed the document 65 | - `global String recipient_type`: possible values: 66 | - `signer`: the recipient has input field assigned to them 67 | - `CC`: the recipient has no input field assigned 68 | - `global String role `: recipient role name 69 | 70 | # DocumentWrapper.DocumentProducts 71 | - `global String sku`: product sku 72 | - `global Map custom_fields`: here you will get all fields that were selected on the `Configure Tokens` page for this Product type. By default there is a selected `Id` field for `OpportunityLineItem` object. Please note that if the field value equals to `null`, this value won’t been added here, Dictionary won’t have this key. 73 | - `global Map custom_columns`: here you will get all custom columns that were added on PandaDoc UI. 74 | - `global String description`: product description. 75 | - `global DocumentWrapper.Discount discount`: product discount. Should be percent. Please see [Discount](#discount). 76 | - `global String name`: product name 77 | - `global String price`: string representation of product price per unit 78 | - `global Integer qty`: items quantity 79 | - `global String subtotal`: (price * qty) - discount 80 | 81 | # Discount 82 | represents discount 83 | - `global String type`: currently always equals to `percent` 84 | - `global String value`: string representation of discount size 85 | -------------------------------------------------------------------------------- /docs/Item.md: -------------------------------------------------------------------------------- 1 | # Item 2 | 3 | Represents document pricing item. Used by [JSON builders](JSONBuilder.md) 4 | 5 | ## Constructors 6 | 7 | - `global Item(Item.ItemSettings setting, SObject sObj)`: create Item from SObject according to [Item.ItemSettings](#itemitemsettings). This constructor can throw exception in case required fields are not selected or if you have invalid configuration in `ItemSettings` 8 | - `global Item(String sku, String name, Decimal price, Decimal qty, String description)` 9 | - `global Item(String sku, String name, Decimal price, Decimal qty, String description, Decimal discount)` 10 | - `global Item(String sku, String name, Decimal price, Decimal qty, String description, Decimal discount, Decimal taxFirst, Decimal taxSecond, Object customFields)` 11 | - `global Item(String sku, String name, Decimal price, Decimal qty, String description, Decimal discount, Object customFields)` 12 | 13 | ## Methods 14 | 15 | - `global static Item sObjectToItem(SObject sObj)`: converts SObject into Item according to [Item.ItemSettings](#itemitemsettings). Returns null if there was an error with configuration or if SOQL request doesn’t have the selected fields for conversion. 16 | 17 | ## Variables 18 | - `global static Map PRICING_ITEM_SETTINGS_MAP`: Dictionary where key is SObject name in lowercase and value is [Item.ItemSettings](#itemitemsettings) for this object. This dictionary is automatically initiated at first call. 19 | 20 | ## Item.ItemSettings 21 | 22 | ## Methods 23 | 24 | - `global Set getSoqlFields`: returns all required fields names for converting SObject into Item. These fields should be used into SOQL request to avoid SObject errors with not selected fields. Please note this method does not respect Salesforce field level security. If you need to accept FLS rules you should filter these fields additionally 25 | 26 | ## Variables 27 | 28 | - `global String objectName`: name of SObject in lowcase 29 | - `global String skuField`: SObject field name which should be used as Pricing Item SKU 30 | - `global String nameField`: SObject field name which should be used as Pricing Item name 31 | - `global String priceField1`: primary field with pricing 32 | - `global String priceField2`: secondary field with pricing to be used if primary field is empty 33 | - `global String quantityField`: SObject field name which should be used as Pricing Item quantity 34 | - `global String descriptionField`: SObject field which should be used as Pricing Item description 35 | - `global String discountField`: SObject field which should be used as Pricing Item discount(percent) 36 | - `global String firstTaxField`: SObject field which should be used as Pricing Item tax 37 | - `global String secondTaxField`: SObject field which should be used as as a second Pricing Item tax. The taxes are summarized in the pricing table. 38 | -------------------------------------------------------------------------------- /docs/JSONBuilder.md: -------------------------------------------------------------------------------- 1 | # JSONBuilder 2 | 3 | Base class for all custom JSON builders. JSON Builders are used to pass data from Salesforce into PandaDoc. [Here](../README.md#custom-json-builder-examples) you can find more examples. 4 | 5 | # Methods 6 | - `global virtual Map getAttributes(SObject record)`: By default, returns tokens that were selected on `Configure Tokens` page. Can be overridden. 7 | - `global virtual String getDocName(SObject record)`: By default returns document name which was selected on PandaDoc setup page. Can be overridden 8 | - `global abstract List getItems(SObject param0)`: This method should return Pricing Items for Document. Must be implemented. 9 | - `global abstract List getRecipients(SObject param0)`: This method should return Recipients for Document. Must be implemented. 10 | - `global virtual Map getPandaDocMetadata(Id recordId, SObject record)`: Generates document metadata. By default returns metadata to link PandaDoc document and SFDC SObject. 11 | 12 | >PLEASE NOTE: **Link between SFDC and PandaDoc document via metadata was deprecated. Metadata contains SOBject data only for backward capability with old third party triggers** 13 | 14 | - `global virtual SourceNode getSourceNode(SObject record)`: Generates relation between SFDC SObject and PandaDoc document. By default generate single link for `record`. 15 | -------------------------------------------------------------------------------- /docs/Recipient.md: -------------------------------------------------------------------------------- 1 | # Recipient 2 | 3 | Represents recipients, used by [JSON builders](JSONBuilder.md). 4 | 5 | ## Constructors 6 | 7 | - `global Recipient(Recipient.RecipientSettings settings, SObject sObj)`: create Recipient from SObject according to [Recipient.RecipientSettings](#recipientrecipientsettings). This constructor can throw exception in case required fields are not selected or if you have invalid configuration in `RecipientSettings` 8 | - `global Recipient(String first_name, String last_name, String email, String company, String roleName)` 9 | 10 | ## Methods 11 | 12 | - `global static Recipient sObjectToRecipient(SObject sObj)`: converts SObject into Recipient according to [Recipient.RecipientSettings](#recipientrecipientsettings). Returns null if there is an error with configuration or if SOQL request doesn’t have the selected fields for conversion. 13 | 14 | ## Variables 15 | - `global static Map RECIPIENT_SETTINGS_MAP`: Dictionary where key is SObject name in lowercase and value is [Recipient.RecipientSettings](#recipientrecipientsettings) for this object. This dictionary is automatically initiated at first call. 16 | 17 | # Recipient.RecipientSettings 18 | 19 | ## Methods 20 | - `global Set getSoqlFields()`: returns all required fields names to convert SObject into Recipient. These fields should be used into SOQL request to avoid SObject errors with not selected fields. Please note this method does not respect Salesforce field level security. If you need to accept FLS rules you should filter this fields additionally 21 | 22 | ## Variables 23 | - `global String objectName`: name of SObject in lowcase 24 | - `global String companyField`: SObject field name which should be used as recipient company 25 | - `global String emailField`: SObject field name which should be used as recipient email 26 | - `global Boolean filterIfChecked`: If True, the Recipient will be filtered if value in filtering field equals to True. Otherwise filters Recipient if value in filtering field equals to False. 27 | - `global String filteringField`: SObject field name which should be used as recipient filtering field 28 | - `global String firstNameField`: SObject field name which should be used as recipient first name 29 | - `global String lastNameField`: SObject field name which should be used as recipient last name 30 | - `global String phoneField`: SObject field name which should be used as recipient phone 31 | - `global String roleField`: SObject field name which should be used as recipient role 32 | -------------------------------------------------------------------------------- /docs/SourceNode.md: -------------------------------------------------------------------------------- 1 | # SourceNode 2 | Represents an entity which linked with document 3 | 4 | ## Constructors 5 | `global SourceNode(String type, String id)`: Creates a root source node. Type should be a SObject API name in lower case. Id should be a object instance id. 6 | 7 | ## Methods 8 | `global void addChild(String type, String id)`: Adds additional child node to root. Can be used only on root node. Use this if document should be linked with multiple SObjects. 9 | 10 | NOTE: Usually root node represents a SObject which was used for generating document. And child nodes just additional objects for related lists. -------------------------------------------------------------------------------- /docs/TriggerManager.md: -------------------------------------------------------------------------------- 1 | # Trigger Manager 2 | 3 | This class used to control enabling and disabling trigger handlers. See [Trigger handler example](../README.md#trigger-handler-example) 4 | 5 | 6 | ## Methods 7 | 8 | - `global static Boolean isTriggerEnabled(String triggerName)`: Returns true if a trigger with the given name is enabled and should be executed 9 | -------------------------------------------------------------------------------- /docs/TriggerTemplate.md: -------------------------------------------------------------------------------- 1 | # TriggerTemplate 2 | 3 | Class for working with PandaDoc trigger handlers 4 | 5 | # Handler 6 | 7 | Base interface which should be implemented by all trigger handlers. 8 | 9 | ## Methods 10 | - `void setValues(List newValues, Map oldValues)`: This method takes Trigger.new and Trigger.oldMap values. Class should save this values internaly. 11 | - `void handle(TriggerTemplate.TriggerAction param0)`: Main handler method. Takes single argument with action type. See [TriggerAction](#triggeraction) 12 | 13 | # TriggerAction 14 | Enum with possible values: 15 | - `afterdelete` 16 | - `afterinsert` 17 | - `afterundelete` 18 | - `afterupdate` 19 | - `beforedelete` 20 | - `beforeinsert` 21 | - `beforeupdate` 22 | -------------------------------------------------------------------------------- /docs/pandadoc__PandaDocDocument__c.md: -------------------------------------------------------------------------------- 1 | # PandaDoc Document 2 | 3 | Technical SObject which is used to represent PandaDoc document in SFDC. Primarily used for implementing event handlers and storing historical data. API name: `pandadoc__PandaDocDocument__c`. 4 | 5 | ## Fields 6 | - `pandadoc__Account__c`: `Lookup(Account)`: Relation to Account. Has a value if the document is linked to Account. Empty otherwise. 7 | - `pandadoc__Contact__c`: `Lookup(Contact)`: Relation to Contact. Has a value if the document is linked to Contact. Empty otherwise. 8 | - `pandadoc__Lead__c'`: `Lookup(Lead)`: Relation to Lead. Has a value if the document is linked to Lead. Empty otherwise. 9 | - `pandadoc__Opportunity__c`: `Lookup(Opportunity)`: Relation to Opportunity. Has value if the document is linked to Opportunity. Empty otherwise. 10 | - `pandadoc__Custom_Object_Id__c`: `Text(18)`: String representation of SObject id which was used to create a document. 11 | - `pandadoc__InputJSON__c`: `Long Text Area(131072)`: JSON payload of document. Used for documents created in Editor V1 Only 12 | - `pandadoc__InputJSON_EV2__c`: `Long Text Area(131072)`: JSON payload of document. Used for documents created in Editor V2 Only 13 | - `pandadoc__Is_Deleted__c`: `Checkbox`: true if this document was deleted on PandaDoc side 14 | - `pandadoc__ParentId__c`: `Formula (Text)`: Formula which always represents correct ID to linked SObject 15 | - `pandadoc__Status__c`: `Text(255)`: Document status. Possible values: 16 | - `document.draft` 17 | - `document.sent` 18 | - `document.completed` 19 | - `document.viewed` 20 | - `document.waiting_approval` 21 | - `document.rejected` 22 | - `document.approved` 23 | - `document.waiting_pay` 24 | - `document.paid` 25 | - `document.expired` 26 | - `document.declined` 27 | - `pandadoc__UUID__c`: `Text(30)`: PandaDoc ID. 28 | - `Name`: `Text(80)`: Document name as in PandaDoc application. NOTE: 29 | if document name is longer than 80 characters then name be truncated. You can use document name through [DocumentWrapper](DocumentWrapper.md) also. 30 | -------------------------------------------------------------------------------- /examples/.forceignore: -------------------------------------------------------------------------------- 1 | # List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status 2 | # More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm 3 | # 4 | 5 | package.xml 6 | 7 | # LWC configuration files 8 | **/jsconfig.json 9 | **/.eslintrc.json 10 | 11 | # LWC Jest 12 | **/__tests__/** -------------------------------------------------------------------------------- /examples/config/minimal_setup-scratch-def.json: -------------------------------------------------------------------------------- 1 | { 2 | "orgName": "pandadoc_sfdx_example", 3 | "edition": "Developer", 4 | "features": [], 5 | "settings": {} 6 | } -------------------------------------------------------------------------------- /examples/force-app/main/default/classes/CustomPricingItems.cls: -------------------------------------------------------------------------------- 1 | global with sharing class CustomPricingItems extends pandadoc.JsonBuilder { 2 | public CustomPricingItems() { 3 | super(CustomObject__c.getSObjectType(), null); 4 | } 5 | 6 | public override pandadoc.Item[] getItems(SObject record) { 7 | pandadoc.Item[] result = new pandadoc.Item[]{}; 8 | 9 | pandadoc.Item relatedProductItem = getRelatedProductItem(record.Id); 10 | pandadoc.Item predefinedItem = getPredefinedItem(); 11 | 12 | if (relatedProductItem != null) { 13 | result.add(relatedProductItem); 14 | } 15 | result.add(predefinedItem); 16 | 17 | return result; 18 | } 19 | 20 | public override pandadoc.Recipient[] getRecipients(SObject record) { 21 | return null; 22 | } 23 | 24 | private pandadoc.Item getRelatedProductItem(Id objectId) { 25 | Id productId = [SELECT Product__c FROM CustomObject__c WHERE Id = :objectId].Product__c; 26 | 27 | if (productId == null) { 28 | return null; 29 | } 30 | 31 | pandadoc.Item.ItemSettings mappingRules = pandadoc.Item.PRICING_ITEM_SETTINGS_MAP.get('product2'); 32 | 33 | if (mappingRules == null) { 34 | return null; 35 | } 36 | 37 | Set itemFields = mappingRules.getSoqlFields(); 38 | String itemFieldsStr = String.join(new List(itemFields), ','); 39 | 40 | String itemSoql = String.format( 41 | 'SELECT {0} FROM Product2 WHERE Id = \'\'{1}\'\'', 42 | new String[]{itemFieldsStr, productId} 43 | ); 44 | 45 | SObject itemObject = Database.query(itemSoql)[0]; 46 | return new pandadoc.Item(mappingRules, itemObject); 47 | } 48 | 49 | private pandadoc.Item getPredefinedItem() { 50 | return new pandadoc.Item('sku', 'name', 10.0, 25, 'description'); 51 | } 52 | } -------------------------------------------------------------------------------- /examples/force-app/main/default/classes/CustomPricingItems.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 45.0 4 | 5 | 1 6 | 45 7 | pandadoc 8 | 9 | Active 10 | 11 | -------------------------------------------------------------------------------- /examples/force-app/main/default/classes/CustomRecipients.cls: -------------------------------------------------------------------------------- 1 | global with sharing class CustomRecipients extends pandadoc.JsonBuilder { 2 | public CustomRecipients() { 3 | super(CustomObject__c.getSObjectType(), null); 4 | } 5 | public override pandadoc.Item[] getItems(SObject record) { 6 | return null; 7 | } 8 | 9 | public override pandadoc.Recipient[] getRecipients(SObject record) { 10 | pandadoc.Recipient[] result = new pandadoc.Recipient[]{}; 11 | 12 | pandadoc.Recipient userRecipient = getObjectContact(record.Id); 13 | if (userRecipient != null) { 14 | result.add(userRecipient); 15 | } 16 | pandadoc.Recipient predefinedRecipient = getPredefinedRecipient(); 17 | result.add(predefinedRecipient); 18 | 19 | return result; 20 | } 21 | 22 | private pandadoc.Recipient getObjectContact(Id objectId) { 23 | Id contactId = [SELECT Contact__c FROM CustomObject__c WHERE Id = :objectId].Contact__c; 24 | 25 | if (contactId == null) { 26 | return null; 27 | } 28 | 29 | pandadoc.Recipient.RecipientSettings mappingRules = pandadoc.Recipient.RECIPIENT_SETTINGS_MAP.get('contact'); 30 | if (mappingRules == null) { 31 | return null; 32 | } 33 | 34 | Set contactRecipientsFields = mappingRules.getSoqlFields(); 35 | String contactFieldsStr = String.join(new List(contactRecipientsFields), ','); 36 | 37 | String contactSoql = String.format( 38 | 'SELECT {0} FROM Contact WHERE Id = \'\'{1}\'\'', 39 | new String[] { contactFieldsStr, contactId }); 40 | 41 | SObject objectContact = Database.query(contactSoql)[0]; 42 | 43 | return new pandadoc.Recipient (mappingRules, objectContact); 44 | } 45 | 46 | private pandadoc.Recipient getPredefinedRecipient() { 47 | return new pandadoc.Recipient( 48 | 'first_name', 49 | 'last_name', 50 | 'email@email.com', 51 | 'company', 52 | 'roleName'); 53 | } 54 | } -------------------------------------------------------------------------------- /examples/force-app/main/default/classes/CustomRecipients.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 45.0 4 | 5 | 1 6 | 45 7 | pandadoc 8 | 9 | Active 10 | 11 | -------------------------------------------------------------------------------- /examples/force-app/main/default/classes/CustomRelation.cls: -------------------------------------------------------------------------------- 1 | global with sharing class CustomRelation extends pandadoc.JsonBuilder { 2 | public CustomRelation() { 3 | super(CustomObject__c.getSObjectType(), null); 4 | } 5 | 6 | public override pandadoc.Item[] getItems(SObject record) { 7 | return null; 8 | } 9 | 10 | public override pandadoc.Recipient[] getRecipients(SObject record) { 11 | return null; 12 | } 13 | 14 | public override pandadoc.SourceNode getSourceNode(SObject record) { 15 | CustomObject__c customObject = [SELECT Id, Contact__c FROM CustomObject__c WHERE Id = :record.Id]; // Reselect needed because no guarantee that Contact__c field was selected 16 | 17 | String objectType = CustomObject__c.getSObjectType().getDescribe().getName().toLowerCase(); // Lower case is important 18 | String objectId = customObject.Id; 19 | 20 | pandadoc.SourceNode result = new pandadoc.SourceNode(objectType, objectId); 21 | 22 | if (customObject.Contact__c != null) { // If custom object have contact then document be shown on Contact page too 23 | String contactType = Contact.getSObjectType().getDescribe().getName().toLowerCase(); 24 | String contactId = customObject.Contact__c; 25 | result.addChild(contactType, contactId); 26 | } 27 | 28 | return result; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/force-app/main/default/classes/CustomRelation.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /examples/force-app/main/default/classes/DefaultBehaviorBuilder.cls: -------------------------------------------------------------------------------- 1 | global with sharing class DefaultBehaviorBuilder extends pandadoc.JsonBuilder { 2 | private pandadoc.StandardJsonBuilder defaultBuilder; 3 | 4 | public DefaultBehaviorBuilder() { 5 | super(CustomObject__c.getSObjectType(), null); 6 | pandadoc__PandaDoc_JsonBulder_Mapping__c builderSetting = pandadoc__PandaDoc_JsonBulder_Mapping__c.getValues( 7 | CustomObject__c.getSObjectType().getDescribe().getName() 8 | ); 9 | defaultBuilder = new pandadoc.StandardJsonBuilder(CustomObject__c.getSObjectType(), builderSetting); 10 | } 11 | 12 | public override pandadoc.Item[] getItems(SObject record) { 13 | return defaultBuilder.getItems(record); 14 | } 15 | 16 | public override pandadoc.Recipient[] getRecipients(SObject record) { 17 | pandadoc.Recipient[] result = defaultBuilder.getRecipients(record); // all default values 18 | result.add(new pandadoc.Recipient('first_name', 'last_name', 'hardcoded@email.com', 'company', 'role')); 19 | return result; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /examples/force-app/main/default/classes/DefaultBehaviorBuilder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /examples/force-app/main/default/classes/DocumentHandler.cls: -------------------------------------------------------------------------------- 1 | public with sharing class DocumentHandler implements pandadoc.TriggerTemplate.Handler { 2 | public final static String TRIGGER_NAME = 'DocumentHandler'; 3 | 4 | private pandadoc__PandaDocDocument__c newValue; 5 | 6 | public void setValues(SObject[] newValues, Map oldValues) { 7 | // we are simplified this moment but in production please use bulkify approach 8 | this.newValue = (pandadoc__PandaDocDocument__c)newValues[0]; 9 | } 10 | 11 | public void handle(pandadoc.TriggerTemplate.TriggerAction action) { 12 | if (newValue.pandadoc__Opportunity__c == null) { 13 | return; 14 | } 15 | 16 | pandadoc.DocumentWrapper wrapper = pandadoc.DocumentWrapper.parseFromJson( 17 | newValue.pandadoc__InputJSON__c)[0]; 18 | 19 | upsertLineItems(wrapper.data.products); 20 | } 21 | 22 | private void upsertLineItems(pandadoc.DocumentWrapper.DocumentProducts[] products) { 23 | OpportunityLineItem[] result = new OpportunityLineItem[]{}; 24 | 25 | for (pandadoc.DocumentWrapper.DocumentProducts docProduct: products) { 26 | String lineId = (String)docProduct.custom_fields.get('Id'); 27 | if (String.isBlank(lineId)) { 28 | continue; // Line item not from SF 29 | } 30 | 31 | OpportunityLineItem newOppLineItem = new OpportunityLineItem( 32 | Id=lineId, 33 | Quantity=docProduct.qty, 34 | UnitPrice=Decimal.valueOf(docProduct.price)); 35 | 36 | result.add(newOppLineItem); 37 | } 38 | 39 | upsert result; 40 | } 41 | } -------------------------------------------------------------------------------- /examples/force-app/main/default/classes/DocumentHandler.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 45.0 4 | 5 | 1 6 | 45 7 | pandadoc 8 | 9 | Active 10 | 11 | -------------------------------------------------------------------------------- /examples/force-app/main/default/classes/ExtraTokens.cls: -------------------------------------------------------------------------------- 1 | global with sharing class ExtraTokens extends pandadoc.JsonBuilder { 2 | public ExtraTokens() { 3 | super(CustomObject__c.getSObjectType(), null); 4 | } 5 | 6 | public override pandadoc.Item[] getItems(SObject record) { 7 | return null; 8 | } 9 | 10 | public override pandadoc.Recipient[] getRecipients(SObject record) { 11 | return null; 12 | } 13 | 14 | public override Map getAttributes(SObject record) { 15 | Map result = super.getAttributes(record); 16 | result.put('CurrentUserId', UserInfo.getUserId()); 17 | result.put('CurrentDate', Date.today()); 18 | result.put('UltimateAnswer', 42); 19 | return result; 20 | } 21 | } -------------------------------------------------------------------------------- /examples/force-app/main/default/classes/ExtraTokens.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 45.0 4 | 5 | 1 6 | 45 7 | pandadoc 8 | 9 | Active 10 | 11 | -------------------------------------------------------------------------------- /examples/force-app/main/default/classes/MinimalJsonBuilder.cls: -------------------------------------------------------------------------------- 1 | global with sharing class MinimalJsonBuilder extends pandadoc.JsonBuilder { 2 | public MinimalJsonBuilder() { 3 | super(CustomObject__c.getSObjectType(), null); 4 | } 5 | 6 | public override pandadoc.Item[] getItems(SObject record) { 7 | return null; 8 | } 9 | 10 | public override pandadoc.Recipient[] getRecipients(SObject record) { 11 | return null; 12 | } 13 | } -------------------------------------------------------------------------------- /examples/force-app/main/default/classes/MinimalJsonBuilder.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 45.0 4 | 5 | 1 6 | 45 7 | pandadoc 8 | 9 | Active 10 | 11 | -------------------------------------------------------------------------------- /examples/force-app/main/default/flexipages/CustomObject_Record_Page.flexipage-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | collapsed 7 | false 8 | 9 | 10 | numVisibleActions 11 | 3 12 | 13 | force:highlightsPanel 14 | 15 | Replace 16 | header 17 | Region 18 | 19 | 20 | 21 | 22 | relatedListComponentOverride 23 | NONE 24 | 25 | 26 | rowsToDisplay 27 | 10 28 | 29 | 30 | showActionBar 31 | true 32 | 33 | force:relatedListContainer 34 | 35 | Replace 36 | relatedTabContent 37 | Facet 38 | 39 | 40 | 41 | 42 | height 43 | 700 44 | 45 | 46 | mode 47 | LIST 48 | 49 | pandadoc:PandaDoc 50 | 51 | 52 | force:detailPanel 53 | 54 | Replace 55 | detailTabContent 56 | Facet 57 | 58 | 59 | 60 | 61 | body 62 | relatedTabContent 63 | 64 | 65 | title 66 | Standard.Tab.relatedLists 67 | 68 | flexipage:tab 69 | 70 | 71 | 72 | active 73 | true 74 | 75 | 76 | body 77 | detailTabContent 78 | 79 | 80 | title 81 | Standard.Tab.detail 82 | 83 | flexipage:tab 84 | 85 | Replace 86 | maintabs 87 | Facet 88 | 89 | 90 | 91 | 92 | tabs 93 | maintabs 94 | 95 | flexipage:tabset 96 | 97 | Replace 98 | main 99 | Region 100 | 101 | 102 | Replace 103 | sidebar 104 | Region 105 | 106 | CustomObject Record Page 107 | flexipage__default_rec_L 108 | CustomObject__c 109 | 112 | RecordPage 113 | 114 | -------------------------------------------------------------------------------- /examples/force-app/main/default/flexipages/Opportunity_Record_Page.flexipage-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | collapsed 7 | false 8 | 9 | 10 | numVisibleActions 11 | 3 12 | 13 | force:highlightsPanel 14 | 15 | Replace 16 | header 17 | Region 18 | 19 | 20 | 21 | 22 | hideUpdateButton 23 | false 24 | 25 | 26 | variant 27 | linear 28 | 29 | runtime_sales_pathassistant:pathAssistant 30 | 31 | Replace 32 | subheader 33 | Region 34 | 35 | 36 | 37 | 38 | height 39 | 700 40 | 41 | 42 | mode 43 | LIST 44 | 45 | pandadoc:PandaDoc 46 | 47 | 48 | runtime_sales_activities:activityPanel 49 | 50 | Replace 51 | activityTabContent 52 | Facet 53 | 54 | 55 | 56 | force:detailPanel 57 | 58 | Replace 59 | detailTabContent 60 | Facet 61 | 62 | 63 | 64 | forceChatter:recordFeedContainer 65 | 66 | Replace 67 | feedTabContent 68 | Facet 69 | 70 | 71 | 72 | 73 | active 74 | true 75 | 76 | 77 | body 78 | activityTabContent 79 | 80 | 81 | title 82 | Standard.Tab.activity 83 | 84 | flexipage:tab 85 | 86 | 87 | 88 | body 89 | detailTabContent 90 | 91 | 92 | title 93 | Standard.Tab.detail 94 | 95 | flexipage:tab 96 | 97 | 98 | 99 | body 100 | feedTabContent 101 | 102 | 103 | title 104 | Standard.Tab.collaborate 105 | 106 | flexipage:tab 107 | 108 | Replace 109 | tabs 110 | Facet 111 | 112 | 113 | 114 | 115 | tabs 116 | tabs 117 | 118 | flexipage:tabset 119 | 120 | Replace 121 | main 122 | Region 123 | 124 | 125 | 126 | cooper:companyInsightTeaserCard 127 | 128 | 129 | 130 | relatedListComponentOverride 131 | NONE 132 | 133 | 134 | rowsToDisplay 135 | 10 136 | 137 | 138 | showActionBar 139 | true 140 | 141 | force:relatedListContainer 142 | 143 | Replace 144 | sidebar 145 | Region 146 | 147 | Opportunity Record Page 148 | sfa__Opportunity_rec_L 149 | Opportunity 150 | 153 | RecordPage 154 | 155 | -------------------------------------------------------------------------------- /examples/force-app/main/default/installedPackages/pandadoc.installedPackage-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | false 4 | 1.47 5 | -------------------------------------------------------------------------------- /examples/force-app/main/default/layouts/CustomObject__c-CustomObject Layout.layout-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Submit 4 | 5 | false 6 | false 7 | true 8 | 9 | 10 | 11 | Readonly 12 | Name 13 | 14 | 15 | Edit 16 | CustomText__c 17 | 18 | 19 | Edit 20 | Contact__c 21 | 22 | 23 | Edit 24 | Product__c 25 | 26 | 27 | 28 | 29 | Edit 30 | OwnerId 31 | 32 | 33 | 34 | 35 | 36 | false 37 | false 38 | true 39 | 40 | 41 | 42 | Readonly 43 | CreatedById 44 | 45 | 46 | 47 | 48 | Readonly 49 | LastModifiedById 50 | 51 | 52 | 53 | 54 | 55 | true 56 | false 57 | true 58 | 59 | 60 | 61 | 62 | 63 | 64 | false 65 | false 66 | false 67 | false 68 | false 69 | 70 | 00h5D000000PFlC 71 | 4 72 | 0 73 | Default 74 | 75 | 76 | -------------------------------------------------------------------------------- /examples/force-app/main/default/layouts/OpportunityLineItem-Opportunity Product Layout.layout-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | false 6 | true 7 | 8 | 9 | 10 | Required 11 | OpportunityId 12 | 13 | 14 | Required 15 | Product2Id 16 | 17 | 18 | Readonly 19 | ProductCode 20 | 21 | 22 | Readonly 23 | ListPrice 24 | 25 | 26 | Required 27 | UnitPrice 28 | 29 | 30 | Required 31 | Quantity 32 | 33 | 34 | 35 | 36 | Edit 37 | Discount 38 | 39 | 40 | Edit 41 | ServiceDate 42 | 43 | 44 | Readonly 45 | TotalPrice 46 | 47 | 48 | 49 | 50 | 51 | true 52 | false 53 | true 54 | 55 | 56 | 57 | Readonly 58 | CreatedById 59 | 60 | 61 | 62 | 63 | Readonly 64 | LastModifiedById 65 | 66 | 67 | 68 | 69 | 70 | true 71 | false 72 | false 73 | 74 | 75 | 76 | Edit 77 | Description 78 | 79 | 80 | 81 | 82 | 83 | true 84 | false 85 | true 86 | 87 | 88 | 89 | 90 | 91 | 92 | Product2Id 93 | Quantity 94 | UnitPrice 95 | ServiceDate 96 | Description 97 | OpportunityId 98 | false 99 | false 100 | false 101 | 102 | 00h5D000000VxsU 103 | 4 104 | 0 105 | Default 106 | 107 | 108 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/CustomObject__c/CustomObject__c.object-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Accept 5 | Default 6 | 7 | 8 | CancelEdit 9 | Default 10 | 11 | 12 | Clone 13 | Default 14 | 15 | 16 | Delete 17 | Default 18 | 19 | 20 | Edit 21 | Default 22 | 23 | 24 | List 25 | Default 26 | 27 | 28 | New 29 | Default 30 | 31 | 32 | SaveEdit 33 | Default 34 | 35 | 36 | Tab 37 | Default 38 | 39 | 40 | View 41 | Action override created by Lightning App Builder during activation. 42 | CustomObject_Record_Page 43 | Large 44 | false 45 | Flexipage 46 | 47 | false 48 | SYSTEM 49 | Deployed 50 | false 51 | true 52 | false 53 | false 54 | false 55 | false 56 | true 57 | true 58 | true 59 | 60 | 61 | {0000} 62 | 63 | AutoNumber 64 | 65 | CustomObjects 66 | 67 | ReadWrite 68 | Public 69 | 70 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/CustomObject__c/fields/Contact__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Contact__c 4 | SetNull 5 | false 6 | 7 | Contact 8 | CustomObjects 9 | CustomObjects 10 | false 11 | false 12 | Lookup 13 | 14 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/CustomObject__c/fields/CustomText__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | CustomText__c 4 | false 5 | 6 | 255 7 | false 8 | false 9 | Text 10 | false 11 | 12 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/CustomObject__c/fields/Product__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Product__c 4 | SetNull 5 | false 6 | 7 | Product2 8 | CustomObjects 9 | CustomObjects 10 | false 11 | false 12 | Lookup 13 | 14 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/CustomObject__c/listViews/All.listView-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | All 4 | Everything 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/Opportunity.object-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AddInfluence 5 | Default 6 | 7 | 8 | CancelEdit 9 | Default 10 | 11 | 12 | Clone 13 | Default 14 | 15 | 16 | Delete 17 | Default 18 | 19 | 20 | Edit 21 | Default 22 | 23 | 24 | List 25 | Default 26 | 27 | 28 | New 29 | Default 30 | 31 | 32 | SaveEdit 33 | Default 34 | 35 | 36 | Tab 37 | Default 38 | 39 | 40 | View 41 | Action override created by Lightning App Builder during activation. 42 | Opportunity_Record_Page 43 | Large 44 | false 45 | Flexipage 46 | 47 | SYSTEM 48 | true 49 | false 50 | 51 | OPPORTUNITY.NAME 52 | ACCOUNT.NAME 53 | OPPORTUNITY.CLOSE_DATE 54 | OPPORTUNITY.NAME 55 | ACCOUNT.NAME 56 | ACCOUNT.SITE 57 | OPPORTUNITY.NAME 58 | ACCOUNT.NAME 59 | ACCOUNT.SITE 60 | OPPORTUNITY.NAME 61 | ACCOUNT.NAME 62 | ACCOUNT.SITE 63 | OPPORTUNITY.STAGE_NAME 64 | OPPORTUNITY.CLOSE_DATE 65 | CORE.USERS.ALIAS 66 | 67 | ReadWrite 68 | 69 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/AccountId.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | AccountId 4 | false 5 | false 6 | Lookup 7 | 8 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/Amount.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Amount 4 | true 5 | false 6 | 7 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/CampaignId.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | CampaignId 4 | false 5 | false 6 | Lookup 7 | 8 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/CloseDate.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | CloseDate 4 | true 5 | false 6 | 7 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/ContractId.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ContractId 4 | false 5 | false 6 | Lookup 7 | 8 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/Description.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Description 4 | false 5 | false 6 | 7 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/ExpectedRevenue.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ExpectedRevenue 4 | false 5 | 6 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/IqScore.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | IqScore 4 | false 5 | 6 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/IsPrivate.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | IsPrivate 4 | false 5 | false 6 | 7 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/LeadSource.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | LeadSource 4 | false 5 | false 6 | Picklist 7 | 8 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/Name.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Name 4 | true 5 | false 6 | 7 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/NextStep.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | NextStep 4 | false 5 | false 6 | 7 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/OwnerId.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | OwnerId 4 | true 5 | false 6 | Lookup 7 | 8 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/Pricebook2Id.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Pricebook2Id 4 | false 5 | Lookup 6 | 7 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/Probability.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Probability 4 | false 5 | false 6 | 7 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/StageName.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | StageName 4 | true 5 | false 6 | Picklist 7 | 8 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/TotalOpportunityQuantity.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | TotalOpportunityQuantity 4 | false 5 | false 6 | 7 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/Type.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Type 4 | false 5 | false 6 | Picklist 7 | 8 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/fields/pandadoc__TrackingNumber__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | pandadoc__TrackingNumber__c 4 | false 5 | false 6 | 7 | 12 8 | false 9 | false 10 | false 11 | Text 12 | false 13 | 14 | -------------------------------------------------------------------------------- /examples/force-app/main/default/objects/Opportunity/listViews/Default_Opportunity_Pipeline.listView-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Default_Opportunity_Pipeline 4 | Mine 5 | 6 | OPPORTUNITY.CLOSE_DATE 7 | greaterOrEqual 8 | LAST_N_MONTHS:3 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/force-app/main/default/pages/PandaDocForCustomObject.page: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 |
28 | 29 | 39 |
40 | -------------------------------------------------------------------------------- /examples/force-app/main/default/pages/PandaDocForCustomObject.page-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 45.0 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/force-app/main/default/profiles/Admin.profile-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CustomPricingItems 5 | true 6 | 7 | 8 | CustomRecipients 9 | true 10 | 11 | 12 | DocumentHandler 13 | true 14 | 15 | 16 | ExtraTokens 17 | true 18 | 19 | 20 | MinimalJsonBuilder 21 | true 22 | 23 | false 24 | 25 | true 26 | CustomObject__c.Contact__c 27 | true 28 | 29 | 30 | true 31 | CustomObject__c.CustomText__c 32 | true 33 | 34 | 35 | true 36 | CustomObject__c.Product__c 37 | true 38 | 39 | 40 | true 41 | Opportunity.AccountId 42 | true 43 | 44 | 45 | true 46 | Opportunity.Amount 47 | true 48 | 49 | 50 | true 51 | Opportunity.CampaignId 52 | true 53 | 54 | 55 | false 56 | Opportunity.ContractId 57 | true 58 | 59 | 60 | true 61 | Opportunity.Description 62 | true 63 | 64 | 65 | false 66 | Opportunity.ExpectedRevenue 67 | true 68 | 69 | 70 | true 71 | Opportunity.IsPrivate 72 | true 73 | 74 | 75 | true 76 | Opportunity.LeadSource 77 | true 78 | 79 | 80 | true 81 | Opportunity.NextStep 82 | true 83 | 84 | 85 | true 86 | Opportunity.Probability 87 | true 88 | 89 | 90 | true 91 | Opportunity.TotalOpportunityQuantity 92 | true 93 | 94 | 95 | true 96 | Opportunity.Type 97 | true 98 | 99 | 100 | true 101 | Opportunity.pandadoc__TrackingNumber__c 102 | true 103 | 104 | 105 | CustomObject__c-CustomObject Layout 106 | 107 | 108 | OpportunityLineItem-Opportunity Product Layout 109 | 110 | 111 | true 112 | true 113 | true 114 | true 115 | true 116 | CustomObject__c 117 | true 118 | 119 | 120 | true 121 | true 122 | true 123 | true 124 | true 125 | Opportunity 126 | true 127 | 128 | 129 | PandaDocForCustomObject 130 | true 131 | 132 | 133 | CustomObject__c 134 | DefaultOn 135 | 136 | 137 | standard-Opportunity 138 | DefaultOn 139 | 140 | Salesforce 141 | 142 | true 143 | ActivateContract 144 | 145 | 146 | true 147 | ActivateOrder 148 | 149 | 150 | true 151 | ActivitiesAccess 152 | 153 | 154 | true 155 | AddDirectMessageMembers 156 | 157 | 158 | true 159 | AllowUniversalSearch 160 | 161 | 162 | true 163 | AllowViewKnowledge 164 | 165 | 166 | true 167 | ApexRestServices 168 | 169 | 170 | true 171 | ApiEnabled 172 | 173 | 174 | true 175 | AssignPermissionSets 176 | 177 | 178 | true 179 | AssignTopics 180 | 181 | 182 | true 183 | AuthorApex 184 | 185 | 186 | true 187 | BulkMacrosAllowed 188 | 189 | 190 | true 191 | CanInsertFeedSystemFields 192 | 193 | 194 | true 195 | CanUseNewDashboardBuilder 196 | 197 | 198 | true 199 | CanVerifyComment 200 | 201 | 202 | true 203 | ChangeDashboardColors 204 | 205 | 206 | true 207 | ChatterEditOwnPost 208 | 209 | 210 | true 211 | ChatterEditOwnRecordPost 212 | 213 | 214 | true 215 | ChatterFileLink 216 | 217 | 218 | true 219 | ChatterInternalUser 220 | 221 | 222 | true 223 | ChatterInviteExternalUsers 224 | 225 | 226 | true 227 | ChatterOwnGroups 228 | 229 | 230 | true 231 | ConnectOrgToEnvironmentHub 232 | 233 | 234 | true 235 | ContentAdministrator 236 | 237 | 238 | true 239 | ContentWorkspaces 240 | 241 | 242 | true 243 | ConvertLeads 244 | 245 | 246 | true 247 | CreateContentSpace 248 | 249 | 250 | true 251 | CreateCustomizeDashboards 252 | 253 | 254 | true 255 | CreateCustomizeFilters 256 | 257 | 258 | true 259 | CreateCustomizeReports 260 | 261 | 262 | true 263 | CreateDashboardFolders 264 | 265 | 266 | true 267 | CreateLtngTempFolder 268 | 269 | 270 | true 271 | CreateReportFolders 272 | 273 | 274 | true 275 | CreateTopics 276 | 277 | 278 | true 279 | CreateWorkBadgeDefinition 280 | 281 | 282 | true 283 | CreateWorkspaces 284 | 285 | 286 | true 287 | CustomizeApplication 288 | 289 | 290 | true 291 | DataExport 292 | 293 | 294 | true 295 | DelegatedTwoFactor 296 | 297 | 298 | true 299 | DeleteActivatedContract 300 | 301 | 302 | true 303 | DeleteTopics 304 | 305 | 306 | true 307 | DistributeFromPersWksp 308 | 309 | 310 | true 311 | EditActivatedOrders 312 | 313 | 314 | true 315 | EditBrandTemplates 316 | 317 | 318 | true 319 | EditCaseComments 320 | 321 | 322 | true 323 | EditEvent 324 | 325 | 326 | true 327 | EditHtmlTemplates 328 | 329 | 330 | true 331 | EditKnowledge 332 | 333 | 334 | true 335 | EditMyDashboards 336 | 337 | 338 | true 339 | EditMyReports 340 | 341 | 342 | true 343 | EditOppLineItemUnitPrice 344 | 345 | 346 | true 347 | EditPublicDocuments 348 | 349 | 350 | true 351 | EditPublicFilters 352 | 353 | 354 | true 355 | EditPublicTemplates 356 | 357 | 358 | true 359 | EditReadonlyFields 360 | 361 | 362 | true 363 | EditTask 364 | 365 | 366 | true 367 | EditTopics 368 | 369 | 370 | true 371 | EmailMass 372 | 373 | 374 | true 375 | EmailSingle 376 | 377 | 378 | true 379 | EnableCommunityAppLauncher 380 | 381 | 382 | true 383 | EnableNotifications 384 | 385 | 386 | true 387 | ExportReport 388 | 389 | 390 | true 391 | FieldServiceAccess 392 | 393 | 394 | true 395 | GiveRecognitionBadge 396 | 397 | 398 | true 399 | ImportCustomObjects 400 | 401 | 402 | true 403 | ImportLeads 404 | 405 | 406 | true 407 | ImportPersonal 408 | 409 | 410 | true 411 | InstallPackaging 412 | 413 | 414 | true 415 | LightningConsoleAllowedForUser 416 | 417 | 418 | true 419 | LightningExperienceUser 420 | 421 | 422 | true 423 | ListEmailSend 424 | 425 | 426 | true 427 | ManageAnalyticSnapshots 428 | 429 | 430 | true 431 | ManageAuthProviders 432 | 433 | 434 | true 435 | ManageBusinessHourHolidays 436 | 437 | 438 | true 439 | ManageCallCenters 440 | 441 | 442 | true 443 | ManageCases 444 | 445 | 446 | true 447 | ManageCategories 448 | 449 | 450 | true 451 | ManageCertificates 452 | 453 | 454 | true 455 | ManageContentPermissions 456 | 457 | 458 | true 459 | ManageContentProperties 460 | 461 | 462 | true 463 | ManageContentTypes 464 | 465 | 466 | true 467 | ManageCustomPermissions 468 | 469 | 470 | true 471 | ManageCustomReportTypes 472 | 473 | 474 | true 475 | ManageDashbdsInPubFolders 476 | 477 | 478 | true 479 | ManageDataCategories 480 | 481 | 482 | true 483 | ManageDataIntegrations 484 | 485 | 486 | true 487 | ManageDynamicDashboards 488 | 489 | 490 | true 491 | ManageEmailClientConfig 492 | 493 | 494 | true 495 | ManageExchangeConfig 496 | 497 | 498 | true 499 | ManageHealthCheck 500 | 501 | 502 | true 503 | ManageInteraction 504 | 505 | 506 | true 507 | ManageInternalUsers 508 | 509 | 510 | true 511 | ManageIpAddresses 512 | 513 | 514 | true 515 | ManageKnowledge 516 | 517 | 518 | true 519 | ManageKnowledgeImportExport 520 | 521 | 522 | true 523 | ManageLeads 524 | 525 | 526 | true 527 | ManageLoginAccessPolicies 528 | 529 | 530 | true 531 | ManageMobile 532 | 533 | 534 | true 535 | ManageNetworks 536 | 537 | 538 | true 539 | ManagePackageLicenses 540 | 541 | 542 | true 543 | ManagePasswordPolicies 544 | 545 | 546 | true 547 | ManageProfilesPermissionsets 548 | 549 | 550 | true 551 | ManagePropositions 552 | 553 | 554 | true 555 | ManagePvtRptsAndDashbds 556 | 557 | 558 | true 559 | ManageRecommendationStrategies 560 | 561 | 562 | true 563 | ManageRemoteAccess 564 | 565 | 566 | true 567 | ManageReportsInPubFolders 568 | 569 | 570 | true 571 | ManageRoles 572 | 573 | 574 | true 575 | ManageSearchPromotionRules 576 | 577 | 578 | true 579 | ManageSharing 580 | 581 | 582 | true 583 | ManageSolutions 584 | 585 | 586 | true 587 | ManageSubscriptions 588 | 589 | 590 | true 591 | ManageSynonyms 592 | 593 | 594 | true 595 | ManageUnlistedGroups 596 | 597 | 598 | true 599 | ManageUsers 600 | 601 | 602 | true 603 | MassInlineEdit 604 | 605 | 606 | true 607 | MergeTopics 608 | 609 | 610 | true 611 | ModerateChatter 612 | 613 | 614 | true 615 | ModifyAllData 616 | 617 | 618 | true 619 | ModifyDataClassification 620 | 621 | 622 | true 623 | ModifyMetadata 624 | 625 | 626 | true 627 | NewReportBuilder 628 | 629 | 630 | true 631 | Packaging2 632 | 633 | 634 | true 635 | PrivacyDataAccess 636 | 637 | 638 | true 639 | RemoveDirectMessageMembers 640 | 641 | 642 | true 643 | ResetPasswords 644 | 645 | 646 | true 647 | RunReports 648 | 649 | 650 | true 651 | ScheduleReports 652 | 653 | 654 | true 655 | SelectFilesFromSalesforce 656 | 657 | 658 | true 659 | SendExternalEmailAvailable 660 | 661 | 662 | true 663 | SendSitRequests 664 | 665 | 666 | true 667 | ShareInternalArticles 668 | 669 | 670 | true 671 | ShowCompanyNameAsUserBadge 672 | 673 | 674 | true 675 | SolutionImport 676 | 677 | 678 | true 679 | SubmitMacrosAllowed 680 | 681 | 682 | true 683 | SubscribeDashboardRolesGrps 684 | 685 | 686 | true 687 | SubscribeDashboardToOtherUsers 688 | 689 | 690 | true 691 | SubscribeReportRolesGrps 692 | 693 | 694 | true 695 | SubscribeReportToOtherUsers 696 | 697 | 698 | true 699 | SubscribeReportsRunAsUser 700 | 701 | 702 | true 703 | SubscribeToLightningDashboards 704 | 705 | 706 | true 707 | SubscribeToLightningReports 708 | 709 | 710 | true 711 | TransactionalEmailSend 712 | 713 | 714 | true 715 | TransferAnyCase 716 | 717 | 718 | true 719 | TransferAnyEntity 720 | 721 | 722 | true 723 | TransferAnyLead 724 | 725 | 726 | true 727 | UseTeamReassignWizards 728 | 729 | 730 | true 731 | UseWebLink 732 | 733 | 734 | true 735 | ViewAllData 736 | 737 | 738 | true 739 | ViewAllUsers 740 | 741 | 742 | true 743 | ViewDataAssessment 744 | 745 | 746 | true 747 | ViewDataCategories 748 | 749 | 750 | true 751 | ViewDataLeakageEvents 752 | 753 | 754 | true 755 | ViewEventLogFiles 756 | 757 | 758 | true 759 | ViewFlowUsageAndFlowEventData 760 | 761 | 762 | true 763 | ViewHealthCheck 764 | 765 | 766 | true 767 | ViewHelpLink 768 | 769 | 770 | true 771 | ViewMyTeamsDashboards 772 | 773 | 774 | true 775 | ViewPublicDashboards 776 | 777 | 778 | true 779 | ViewPublicReports 780 | 781 | 782 | true 783 | ViewRoles 784 | 785 | 786 | true 787 | ViewSetup 788 | 789 | 790 | true 791 | WorkCalibrationUser 792 | 793 | 794 | -------------------------------------------------------------------------------- /examples/force-app/main/default/profiles/Custom%3A Marketing Profile.profile-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CustomPricingItems 5 | false 6 | 7 | 8 | CustomRecipients 9 | false 10 | 11 | 12 | ExtraTokens 13 | false 14 | 15 | 16 | MinimalJsonBuilder 17 | false 18 | 19 | true 20 | 21 | true 22 | CustomObject__c.Contact__c 23 | true 24 | 25 | 26 | true 27 | CustomObject__c.CustomText__c 28 | true 29 | 30 | 31 | true 32 | CustomObject__c.Product__c 33 | true 34 | 35 | 36 | CustomObject__c-CustomObject Layout 37 | 38 | 39 | CustomObject__c 40 | DefaultOn 41 | 42 | Salesforce 43 | 44 | true 45 | ActivitiesAccess 46 | 47 | 48 | true 49 | AllowViewKnowledge 50 | 51 | 52 | true 53 | ApexRestServices 54 | 55 | 56 | true 57 | ApiEnabled 58 | 59 | 60 | true 61 | AssignTopics 62 | 63 | 64 | true 65 | ChatterInternalUser 66 | 67 | 68 | true 69 | ChatterInviteExternalUsers 70 | 71 | 72 | true 73 | ChatterOwnGroups 74 | 75 | 76 | true 77 | ConvertLeads 78 | 79 | 80 | true 81 | CreateCustomizeFilters 82 | 83 | 84 | true 85 | CreateCustomizeReports 86 | 87 | 88 | true 89 | CreateTopics 90 | 91 | 92 | true 93 | DistributeFromPersWksp 94 | 95 | 96 | true 97 | EditEvent 98 | 99 | 100 | true 101 | EditOppLineItemUnitPrice 102 | 103 | 104 | true 105 | EditTask 106 | 107 | 108 | true 109 | EditTopics 110 | 111 | 112 | true 113 | EmailMass 114 | 115 | 116 | true 117 | EmailSingle 118 | 119 | 120 | true 121 | EnableNotifications 122 | 123 | 124 | true 125 | ExportReport 126 | 127 | 128 | true 129 | ImportPersonal 130 | 131 | 132 | true 133 | LightningConsoleAllowedForUser 134 | 135 | 136 | true 137 | ListEmailSend 138 | 139 | 140 | true 141 | ManageEncryptionKeys 142 | 143 | 144 | true 145 | RunReports 146 | 147 | 148 | true 149 | SelectFilesFromSalesforce 150 | 151 | 152 | true 153 | SendSitRequests 154 | 155 | 156 | true 157 | ShowCompanyNameAsUserBadge 158 | 159 | 160 | true 161 | SubmitMacrosAllowed 162 | 163 | 164 | true 165 | SubscribeToLightningReports 166 | 167 | 168 | true 169 | TransactionalEmailSend 170 | 171 | 172 | true 173 | UseWebLink 174 | 175 | 176 | true 177 | ViewEventLogFiles 178 | 179 | 180 | true 181 | ViewHelpLink 182 | 183 | 184 | true 185 | ViewRoles 186 | 187 | 188 | true 189 | ViewSetup 190 | 191 | 192 | -------------------------------------------------------------------------------- /examples/force-app/main/default/profiles/Custom%3A Sales Profile.profile-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CustomPricingItems 5 | false 6 | 7 | 8 | CustomRecipients 9 | false 10 | 11 | 12 | ExtraTokens 13 | false 14 | 15 | 16 | MinimalJsonBuilder 17 | false 18 | 19 | true 20 | 21 | true 22 | CustomObject__c.Contact__c 23 | true 24 | 25 | 26 | true 27 | CustomObject__c.CustomText__c 28 | true 29 | 30 | 31 | true 32 | CustomObject__c.Product__c 33 | true 34 | 35 | 36 | CustomObject__c-CustomObject Layout 37 | 38 | 39 | CustomObject__c 40 | DefaultOn 41 | 42 | Salesforce 43 | 44 | true 45 | ActivitiesAccess 46 | 47 | 48 | true 49 | AllowViewKnowledge 50 | 51 | 52 | true 53 | ApexRestServices 54 | 55 | 56 | true 57 | ApiEnabled 58 | 59 | 60 | true 61 | AssignTopics 62 | 63 | 64 | true 65 | ChatterInternalUser 66 | 67 | 68 | true 69 | ChatterInviteExternalUsers 70 | 71 | 72 | true 73 | ChatterOwnGroups 74 | 75 | 76 | true 77 | ConvertLeads 78 | 79 | 80 | true 81 | CreateCustomizeFilters 82 | 83 | 84 | true 85 | CreateCustomizeReports 86 | 87 | 88 | true 89 | CreateTopics 90 | 91 | 92 | true 93 | DistributeFromPersWksp 94 | 95 | 96 | true 97 | EditEvent 98 | 99 | 100 | true 101 | EditOppLineItemUnitPrice 102 | 103 | 104 | true 105 | EditTask 106 | 107 | 108 | true 109 | EditTopics 110 | 111 | 112 | true 113 | EmailMass 114 | 115 | 116 | true 117 | EmailSingle 118 | 119 | 120 | true 121 | EnableNotifications 122 | 123 | 124 | true 125 | ExportReport 126 | 127 | 128 | true 129 | ImportPersonal 130 | 131 | 132 | true 133 | LightningConsoleAllowedForUser 134 | 135 | 136 | true 137 | ListEmailSend 138 | 139 | 140 | true 141 | ManageEncryptionKeys 142 | 143 | 144 | true 145 | RunReports 146 | 147 | 148 | true 149 | SelectFilesFromSalesforce 150 | 151 | 152 | true 153 | SendSitRequests 154 | 155 | 156 | true 157 | ShowCompanyNameAsUserBadge 158 | 159 | 160 | true 161 | SubmitMacrosAllowed 162 | 163 | 164 | true 165 | SubscribeToLightningReports 166 | 167 | 168 | true 169 | TransactionalEmailSend 170 | 171 | 172 | true 173 | UseWebLink 174 | 175 | 176 | true 177 | ViewEventLogFiles 178 | 179 | 180 | true 181 | ViewHelpLink 182 | 183 | 184 | true 185 | ViewRoles 186 | 187 | 188 | true 189 | ViewSetup 190 | 191 | 192 | -------------------------------------------------------------------------------- /examples/force-app/main/default/profiles/Custom%3A Support Profile.profile-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CustomPricingItems 5 | false 6 | 7 | 8 | CustomRecipients 9 | false 10 | 11 | 12 | ExtraTokens 13 | false 14 | 15 | 16 | MinimalJsonBuilder 17 | false 18 | 19 | true 20 | 21 | true 22 | CustomObject__c.Contact__c 23 | true 24 | 25 | 26 | true 27 | CustomObject__c.CustomText__c 28 | true 29 | 30 | 31 | true 32 | CustomObject__c.Product__c 33 | true 34 | 35 | 36 | CustomObject__c-CustomObject Layout 37 | 38 | 39 | CustomObject__c 40 | DefaultOn 41 | 42 | Salesforce 43 | 44 | true 45 | ActivitiesAccess 46 | 47 | 48 | true 49 | AllowViewKnowledge 50 | 51 | 52 | true 53 | ApexRestServices 54 | 55 | 56 | true 57 | ApiEnabled 58 | 59 | 60 | true 61 | AssignTopics 62 | 63 | 64 | true 65 | ChatterInternalUser 66 | 67 | 68 | true 69 | ChatterInviteExternalUsers 70 | 71 | 72 | true 73 | ChatterOwnGroups 74 | 75 | 76 | true 77 | ConvertLeads 78 | 79 | 80 | true 81 | CreateCustomizeFilters 82 | 83 | 84 | true 85 | CreateCustomizeReports 86 | 87 | 88 | true 89 | CreateTopics 90 | 91 | 92 | true 93 | DistributeFromPersWksp 94 | 95 | 96 | true 97 | EditEvent 98 | 99 | 100 | true 101 | EditOppLineItemUnitPrice 102 | 103 | 104 | true 105 | EditTask 106 | 107 | 108 | true 109 | EditTopics 110 | 111 | 112 | true 113 | EmailMass 114 | 115 | 116 | true 117 | EmailSingle 118 | 119 | 120 | true 121 | EnableNotifications 122 | 123 | 124 | true 125 | ExportReport 126 | 127 | 128 | true 129 | ImportPersonal 130 | 131 | 132 | true 133 | LightningConsoleAllowedForUser 134 | 135 | 136 | true 137 | ListEmailSend 138 | 139 | 140 | true 141 | ManageCases 142 | 143 | 144 | true 145 | ManageEncryptionKeys 146 | 147 | 148 | true 149 | ManageSolutions 150 | 151 | 152 | true 153 | RunReports 154 | 155 | 156 | true 157 | SelectFilesFromSalesforce 158 | 159 | 160 | true 161 | SendSitRequests 162 | 163 | 164 | true 165 | ShowCompanyNameAsUserBadge 166 | 167 | 168 | true 169 | SubmitMacrosAllowed 170 | 171 | 172 | true 173 | SubscribeToLightningReports 174 | 175 | 176 | true 177 | TransactionalEmailSend 178 | 179 | 180 | true 181 | TransferAnyCase 182 | 183 | 184 | true 185 | UseWebLink 186 | 187 | 188 | true 189 | ViewEventLogFiles 190 | 191 | 192 | true 193 | ViewHelpLink 194 | 195 | 196 | true 197 | ViewRoles 198 | 199 | 200 | true 201 | ViewSetup 202 | 203 | 204 | -------------------------------------------------------------------------------- /examples/force-app/main/default/tabs/CustomObject__c.tab-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | false 5 | Custom61: Castle 6 | 7 | -------------------------------------------------------------------------------- /examples/force-app/main/default/triggers/PandaDocDocumentTrigger.trigger: -------------------------------------------------------------------------------- 1 | trigger PandaDocDocumentTrigger on pandadoc__PandaDocDocument__c (after insert, after update) { 2 | pandadoc.TriggerTemplate.TriggerManager triggerManager = new pandadoc.TriggerTemplate.TriggerManager(); 3 | 4 | if (pandadoc.TriggerManager.isTriggerEnabled(DocumentHandler.TRIGGER_NAME)) { 5 | triggerManager.addHandler( 6 | new DocumentHandler(), 7 | new pandadoc.TriggerTemplate.TriggerAction[] { 8 | pandadoc.TriggerTemplate.TriggerAction.afterupdate, 9 | pandadoc.TriggerTemplate.TriggerAction.afterinsert 10 | } 11 | ); 12 | } 13 | triggerManager.runHandlers(); 14 | } -------------------------------------------------------------------------------- /examples/force-app/main/default/triggers/PandaDocDocumentTrigger.trigger-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 45.0 4 | 5 | 1 6 | 45 7 | pandadoc 8 | 9 | Active 10 | 11 | -------------------------------------------------------------------------------- /examples/sfdx-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageDirectories": [ 3 | { 4 | "path": "force-app", 5 | "default": true 6 | } 7 | ], 8 | "namespace": "", 9 | "sfdcLoginUrl": "https://login.salesforce.com", 10 | "sourceApiVersion": "45.0" 11 | } 12 | -------------------------------------------------------------------------------- /screenshots/01-quick-setup-btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PandaDoc/pandadoc-sfdc-examples/7aed3b987e909665a3e9b918f5c65e7421acc8d9/screenshots/01-quick-setup-btn.png -------------------------------------------------------------------------------- /screenshots/02-adding-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PandaDoc/pandadoc-sfdc-examples/7aed3b987e909665a3e9b918f5c65e7421acc8d9/screenshots/02-adding-screen.png -------------------------------------------------------------------------------- /screenshots/03-builder-setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PandaDoc/pandadoc-sfdc-examples/7aed3b987e909665a3e9b918f5c65e7421acc8d9/screenshots/03-builder-setup.png -------------------------------------------------------------------------------- /screenshots/04-custom-builder-btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PandaDoc/pandadoc-sfdc-examples/7aed3b987e909665a3e9b918f5c65e7421acc8d9/screenshots/04-custom-builder-btn.png -------------------------------------------------------------------------------- /screenshots/05-adding-custom-builder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PandaDoc/pandadoc-sfdc-examples/7aed3b987e909665a3e9b918f5c65e7421acc8d9/screenshots/05-adding-custom-builder.png -------------------------------------------------------------------------------- /screenshots/06-new-trigger-btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PandaDoc/pandadoc-sfdc-examples/7aed3b987e909665a3e9b918f5c65e7421acc8d9/screenshots/06-new-trigger-btn.png -------------------------------------------------------------------------------- /screenshots/07-trigger-setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PandaDoc/pandadoc-sfdc-examples/7aed3b987e909665a3e9b918f5c65e7421acc8d9/screenshots/07-trigger-setup.png --------------------------------------------------------------------------------