**Source URL:** https://limited.veevavault.dev/regulatory/vault-sdk/references/sample-code

# Sample Code

We've created sample code for various use cases. Feel free to use these as starting points for your own custom Vault extensions.

These projects are available at the [Veeva GitHub](https://github.com/veeva)™.

If you need help, please join [Vault for Developers on Veeva Connect](http://devcommunity.veevavault.com/).

| Project | Description |
| --- | --- |
| [Service Basics](https://github.com/veeva/vsdk-service-basics/wiki) | Services demonstrated in this project include: `RecordService`; `QueryService`; `HTTPService`;  Local; External; Vault to Vault |
| [User-Defined Service](https://github.com/veeva/vsdk-user-defined-service-sample) | Use cases in this project include: User-defined class usage; Field validation; Updating object record fields; `UserDefinedService` usage;  Why use a user-defined service; User-defined service use cases; Locating and using user-defined services |
| [User-Defined Model](https://github.com/veeva/vsdk-user-defined-model-sample) | Use cases in this project include: User-defined model creation and usage; Vault to Vault Connections; `UserDefinedModel` usage;  Why use user-defined models; Using user-defined models with `HTTPService`; Using user-defined models with `JsonService`; Using user-defined models with `QueryService` |
| [Object Records](https://github.com/veeva/vsdk-object-sample/wiki) | Use cases in this project include: Field defaulting; Field validation; Required fields; Create related records; Initialize workflows; Update roles |
| [Documents](https://github.com/veeva/vsdk-document-sample/wiki) | Use cases in this project include: Update fields on related documents; Create related object records; Send notifications |
| [Doctype Triggers](https://github.com/veeva/vsdk-hello-doctype-trigger) | Use cases in this project include: Doctype trigger to prevent document names that start with lowercase characters; Doctype trigger to add a default value to a document field; Doctype trigger to start a job whenever a document field changes |
| [Job Service](https://github.com/veeva/vsdk-job-service-sample) | Use cases in this project include: Bulk Object Record updates; Custom Job Processor Usage Why use custom job processors; Use cases in which custom job processors can help; Creating custom job processors |
| [Translation Service](https://github.com/veeva/vsdk-translation-service-sample) | Use cases in this project include: Message Catalog usage; Bulk Translation export and import; Field validation; `TranslationService` usage;  Fetching messages in a message group; Fetching translated message; Using translated message for error text |
| [Vault to Vault using Integration Rules](https://github.com/veeva/vsdk-spark-integration-rules-sample) | Demonstrates the use of Spark Messaging to move and mapping data from a source Vault to a target Vault: Spark message with "Poke and Pull" transaction processing; Using Integrations, Integration Points, and User Exceptions; Mapping field data using Integration Rules and Reference Lookups |
| [Vault to Vault Document Copy](https://github.com/veeva/vsdk-spark-doc-copy-sample) | Demonstrates copying a document from a source Vault to a target Vault: Spark Message initiated from a Document Lifecycle State Change; Creating a new document by reusing an existing document’s source file, attachments, and renditions; Creating new versions of existing documents |
| [External Integration](https://github.com/veeva/vsdk-spark-external-aws-sample/wiki) | Demonstrates the use of Spark messaging to move data from a source Vault to an external AWS™ system: Creating an AWS™ application; External Spark message format; Receiving and processing an external Spark message |

# Tools

We've created the following tools to assist developers in utilizing the Vault Java SDK.

| Tool | Description |
| --- | --- |
| [Maven Plugin](https://github.com/veeva/vaultjavasdk-maven-plugin) | Provides commands to package, validate, import, and deploy Vault Java SDK source code through the use of Maven build goals. |
| [Vault Log Analyzer](https://github.com/veeva/vault-log-analyzer) | A command line tool that simplifies the process of analyzing Vault API and Vault Java SDK logs. |

---

**Previous:** [Vault Audit Logs](/regulatory/vault-sdk/references/audit)  
