**Source URL:** https://general.veevavault.dev/safety/vault-sdk/references/sample-code.md

# 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`LocalExternalVault to Vault |
| [User-Defined Service](https://github.com/veeva/vsdk-user-defined-service-sample) | Use cases in this project include:User-defined class usageField validationUpdating object record fields`UserDefinedService` usageWhy use a user-defined serviceUser-defined service use casesLocating 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 usageVault to Vault Connections`UserDefinedModel` usageWhy use user-defined modelsUsing 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 defaultingField validationRequired fieldsCreate related recordsInitialize workflowsUpdate roles |
| [Documents](https://github.com/veeva/vsdk-document-sample/wiki) | Use cases in this project include:Update fields on related documentsCreate related object recordsSend 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 charactersDoctype trigger to add a default value to a document fieldDoctype 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 updatesCustom Job Processor UsageWhy use custom job processorsUse cases in which custom job processors can helpCreating custom job processors |
| [Translation Service](https://github.com/veeva/vsdk-translation-service-sample) | Use cases in this project include:Message Catalog usageBulk Translation export and importField validation`TranslationService` usageFetching messages in a message groupFetching translated messageUsing 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 processingUsing Integrations, Integration Points, and User ExceptionsMapping 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 ChangeCreating a new document by reusing an existing document’s source file, attachments, and renditionsCreating 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™ applicationExternal Spark message formatReceiving and processing an external Spark message |

# Tools {#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](/safety/vault-sdk/references/audit)  
