Sample Transactions

Included in this topic:

The Sample Transaction object within the Veeva CRM application is the only location of storage for all of the various types of Sample Transactions performed: These Sample Transaction Types are controlled by Record Type and include the following:

  • Adjustment
  • Return
  • Disbursement
  • Transfer
  • Receipt

In order to comply with PDMA and 21 CFR requirements, the access and privileges of users to modify and delete records within the Sample Transaction is controlled through various aspects of the Security Model. To prevent deletes and edits of Sample Transaction records, an Apex trigger resides on the Sample Transaction object to restrict the deletion of these records if the Status field of the Sample Transaction record is equal to Submitted.

If a Sample Transaction needs to be modified or deleted, an Admin user with access privileges to the Unlock check box field on the Sample Transaction object will have access to an Unlock Button for the Submitted Sample Transaction. The Unlock Button sets the Status of the Sample Transaction record to “Saved”, at which point the Sample Transaction can be modified and deleted. All Edits and Deletes to a Sample Transaction are logged via an Apex Trigger to the Sample Transaction Audit object, which is read-only, to provide historical visibility of modifications and deletes of Sample Transaction records. The Apex Trigger creates a complete copy of the Sample Transaction record and indicates the User that made the modification or deletion as well as the date and time of the change.

The ability for Users to create the various types of Sample Transactions can be controlled by managing the User’s Profile access to the Record Types within the Sample Transactions for Adjustment, Return, and Transfer Sample Transactions. These Sample Transaction Record Types can only be created via the New button on the Sample Inventories Tab and the New Adjustment, New Return, and New Transfer buttons, and links in the Samples Management module. If a User clicks on one of these buttons or links and does not have access to the corresponding Record Type, the User is presented with a Screen indicating their lack of privileges to perform the action. By default, the Disbursement and Receipt Record Types are not provided to User’s profiles as these Record Types are created based on other events within the System and should not be allowed as an option when creating a new Sample Transaction record.

Grouping Sample Transactions

The multi-line sample transaction functionality provides a way for users to add multiple samples and lots to a sample transaction.

To configure multi-line sample transactions, the following fields must be added to the sample transaction object:

  • Group_Transaction_Id_vod
  • Zvod_Sample_Lines_vod

Only the Zvod_Sample_Lines_vod field needs to be added to the page layout.

The zvod_Sample_Lines_vod field allows users to enter multiple sample lot line items as one transaction. Configuration of other fields in the Sample Information section of the Sample Transaction is not supported.

The following field needs to be added to the sample transaction audit object as well:

  • Group_Transaction_Id_vod

The Group_Transaction_Id_vod field is populated if multi-line sample transactions are enabled (regardless of whether the sample transaction contains single or multiple lines). This field groups the sample transactions together. If a sample transaction is unlocked that has the Group_Transaction_Id_vod field populated, then all sample transactions related to that group will be unlocked.

When a transfer sample transaction is submitted, if the Shipment_Id_vod field is not populated by the user, the field is populated with the Group_Transaction_Id_vod.

On sample receipt records, the Shipment_Id_vod field should be transferred into the Group_Transaction_Id_vod field when submitted. If the Shipment_Id_vod field is populated when loading sample receipt records through the data loader, receipts with the same shipment Id are grouped together.

The call name should be copied into the Group_Transaction_Id_vod field on sample disbursements when submitted.

Once the fields listed above have been added to the corresponding objects and the Zvod_Sample_Lines_vod field has been added to the sample transaction layouts, the user will be able to add multiple lines to a sample transaction as shown in the screen shot below.

Users can add additional samples using the Add Line Item link, as well as delete lines using the Del link. Both the Add Line Item and Del link display in edit view only. There is a limit of 10 lines per sample transaction.

Return Sample Transactions

Return Sample Transactions provide users with the ability to create transactions that correspond to a Return of Samples in the case that specific Sample Lots have expired or were destroyed in the shipment process.

A Return Sample Transaction requires that a Return To recipient be defined. By default, the Return To picklist is populated with a single value of HQ. The Return To picklist should be populated by a System Administrator to indicate all possible locations that a Sample Lot could be returned to, including Distribution Centers and/or any 3rd party company managing the organization’s Samples.

Sample Returns are auto-populated with the return address based on a reps selection of destination. For example, selecting HQ as the destination address populates the street, city and zip code fields to increase the chance a sample is returned to the correct address. Return addresses are stored in the Rep Roster and can be modified there. The pick list values must match the Username External ID field in order for the address to populate.

Similar to Sample Inventories, a user can create a Return on behalf of another user by utilizing the Adjust For field. Selection of a user from the Adjust For field clears and repopulates the Sample and Lot # picklists on the Return Sample Transaction based on the newly selected user. A user can only create Return Sample Transactions for users that they have access to their Sample Lot data. Data access can be controlled by the Role Hierarchy and Data Sharing Rules. By default, District Managers have access to all reporting Sales Reps and can perform Return Sample Transactions accordingly. If a user attempts to create a Return Sample Transaction for a user where the user does not have access to the other user’s Sample Lots, the Sample and Lot # fields will not have values populated. Since the Sample and Lot # fields are required for a Return, the Return Sample Transaction cannot be submitted.

The Return Sample Transaction effective date can be backdated by a user by utilizing the Adjusted Date field. To allow the backdating of non-Active Sample Lot Returns, the list of Samples and Lots for a Return Sample Transaction are not filtered based on the Active flag for a Sample Lot.

Key administration components of the Return Sample Transaction include:

  • Management of values contained in the Return To picklist Field
  • Creation of Role Hierarchy and Data Sharing Rules to determine Adjust For functionality

Adjustment Sample Transactions

Adjustment Sample Transactions provide users with the ability to create transactions that correspond to a user’s needs to adjust the Calculated Quantity of a Sample Lot.

A Sample Adjustment can be recorded in the case that a Sample Lot has been lost or stolen. The list of available Reasons for an Adjustment Sample Transaction can be controlled by modifying the picklist values for the Reason field on Sample Transaction.

By default, the Quantity field for an Adjustment Sample Transaction can be greater than, less than, or equal to zero. The value entered for the Quantity is the direct value that the Adjustment Sample Transaction will have on the Calculated Quantity for the Sample Lot.

An organization is able to modify the behavior of the Quantity field and its related Inventory Impact for an Adjustment Sample Transaction by defining Validation Rules that restrict the user from entering in values into the Quantity field that are less than 1 (Reference the Validation Rules for the Transfer Sample Transaction). Additionally, the Formula that defines the Inventory Impact field can be modified to account for the Reason selected by the user as well and the Quantity entered.

Similar to Sample Inventories, a user can create an Adjustment on behalf of another user by utilizing the Adjust For field. Selection of a user from the Adjust For field clears and repopulates the Sample and Lot # picklists on the Adjustment Sample Transaction based on the newly selected user. A user can only create Adjustment Sample Transactions for users that they have access to their Sample Lot data. Data access can be controlled by the Role Hierarchy and Data Sharing Rules.

By default, District Managers have access to all reporting Sales Reps and can perform Adjustment Sample Transactions accordingly. If a user attempts to create an Adjustment Sample Transaction for a user where the they do not have access to the other user’s Sample Lots, the Sample and Lot # fields will not have values populated. Since the Sample and Lot # fields are required for an Adjustment, the Adjustment Sample Transaction cannot be submitted.

The Adjustment Sample Transaction effective date can be backdated by a user by utilizing the Adjusted Date field. To allow the backdating of non-Active Sample Lot Adjustments, the list of Samples and Lots for an Adjustment Sample Transaction are not filtered based on the Active flag for a Sample Lot.

Key administration components of the Adjustment Sample Transaction include:

  • Management of values contained in the Reason picklist Field
  • Definition of Validation Rules for Adjustments (if required)
  • Definition of Inventory Impact Formula to account for above modifications
  • Creation of Role Hierarchy and Data Sharing Rules to determine Adjust For functionality

Disbursement Sample Transactions

Disbursement Sample Transactions record all Sample information pertaining to a Sample Drop as part of a Call Report. Each Sample that is dropped is represented by a Disbursement Sample Transaction.

Disbursement Sample Transactions are created when saving a Call Report where Samples have been selected. The Disbursement Sample Transaction records are generated by an Apex trigger that resides on the Call object. The logic in the trigger only creates Disbursement Sample Transactions in the case that the Call has been Submitted and no previously existing Disbursement Sample Transactions exist for the Call. This check is utilized to prevent the creation of duplicate Disbursement Sample Transactions in the case that an Admin unlocks a Call Report and Re-submits the Call.

The Record Type of Disbursement for Sample Transactions is by default, disabled for the Primary Sales Rep profile. Access to the Disbursement Record Type should not be given to users as this allows a user to create a Disbursement Sample Transaction that is not based on a Call.

A Disbursement Sample Transaction is created for both paper-based Sampling as well as Electronic Signature Sampling from the Veeva CRM application. By supporting Disbursement Sample Transactions for both paper and Electronic Signatures, an organization can utilize all other aspects of the Veeva CRM Samples Management module, such as Inventories, Transfers, Returns, and Adjustments.

Reference the Veeva CRM Call Report Sampling and Veeva CRM Mobile Call Report Sampling sections for information related to the types of Sampling supported for each solution.

Receipt Sample Transactions

Receipt Sample Transactions represent a user’s Receipt of a Sample Lot from either a Transfer Sample Transaction or a Sample Receipt record that was created as part of a 3rd Party or Back-office integration.

The Receipt Sample Transaction is created on the Confirmation of a Sample Receipt record. A Receipt Sample Transaction is populated with a Ref Transaction Id that corresponds to the Transfer Sample Transaction that created it. The Ref Transaction Id field for a Receipt Sample Transaction will not be populated if the Receipt Sample Transaction was created by a confirmation of a Sample Receipt record based on an integration to a 3rd Party or Back-office integration.

Confirmation of a Sample Receipt record performs the following actions:

  • Creates a Receipt Sample Transaction for the User
  • Updates the related Transfer Sample Transaction with the following fields:
  • Received Check box
  • Receipt Comments
  • Ref Transaction Id [Receipt Sample Transaction Id]
  • Confirmed Quantity

You can determine whether the Quantity field on a Sample Receipt record is defaulted for the user or if the user will need to enter in the quantity received for each line item. The default behavior for Sample Receipt confirmation is to have the confirmed quantity value be defaulted. This feature can be configured by the DISABLE_SAMPLE_RECEIPT_DEFAULT Veeva Setting. Additionally, admins can enable Sample Receipt Grouping to allow users to confirm all line items associated with a shipment at once. See Sample Receipt Grouping for more information.

Organizations can leverage the Sample Receipt object to load data for Sample Transactions for Users from a 3rd party or back-office system. The process to load Sample Receipts data involves the following two steps:

  1. Create/Update of Sample Lot for the User that the Sample Receipt will be created for
  2. Insert of Sample Receipt Records

The Sample Receipt object should be utilized if integration to a 3rd Party, Distribution, or Back-office application is required to automate the shipment and confirmation of Samples to users. The following are the two steps required as part of the integration to create a Sample Receipt record for a User:

  • Create/Update of Sample Lot record for the User that will be receiving the Sample
  • Insert a Sample Receipt record that corresponds to the Sample Lot for the User

Users need Create/Update/Read permission to the Sample_Receipt_vod object to confirm receipt of Sample and to send a Sample Receipt.

Transfer Sample Transactions

Transfer Sample Transactions provide users with the ability to create transactions that correspond to a user’s need to transfer a quantity of a Sample Lot to another user.

The Transfer To field for a Transfer Sample Transaction indicates the user that is the recipient of the Sample Lot being transferred. Selection of a User from the Transfer To field, queries the Rep Roster object for a matching User. The query against the Rep Roster object is based on the Username External Id field, which must be an exact match to the Username field on the corresponding record for the user in the user object. If a matching user is identified, then the Address fields from the Rep Roster record are copied into the Address fields of the Transfer Sample Transaction. The Rep Roster object should be maintained to guarantee that a Rep Roster exists for every Active User record.

An Apex Trigger resides on the Sample Transaction object that upon Submit of a Transfer Sample Transaction, the following actions are performed:

  • The Sample Lot being transferred is created/updated for the Transfer To User of the Transfer
  • A Sample Receipt record is created for the Transfer To User
  • Reference to the Transfer Sample Transaction is maintained in the Ref Transaction Id field in order to update the Confirmed Quantity, Receipt Comments, and Received checkbox from the Transfer To User

The Discrepancy for a Transfer Sample Transaction is based on the difference between the Quantity and Confirmed Quantity fields on the Sample Transaction record. The Discrepancy formula is not calculated unless the Received check box on the Transfer Sample Transaction record has been updated by the confirmation of the Sample Receipt record by the Transfer To User.

Similar to Sample Inventories, a user can create a Transfer on behalf of another user by utilizing the Transfer From field. Selection of a user from the Transfer From field clears and repopulates the Sample and Lot # picklists on the Transfer Sample Transaction based on the newly selected user. A user can only create Transfer Sample Transactions for users that they have access to their Sample Lot data. Data access can be controlled by the Role Hierarchy and Data Sharing Rules. By default, District Managers have access to all reporting Sales Reps and can perform Transfer Sample Transactions accordingly. If a user attempts to create a Transfer Sample Transaction for a user where the user does not have access to the other user’s Sample Lots, the Sample and Lot # fields will not have values populated. Since the Sample and Lot # fields are required for a Transfer, the Transfer Sample Transaction cannot be submitted.

The Sample Lots displayed for a Transfer Sample Transaction are only for the currently Active Sample Lots.

Key administration components of the Transfer Sample Transaction include:

  • Discrepancy is only calculated if the Received checkbox has been updated by the Sample Receipt confirmation.
  • Creation of Role Hierarchy and Data Sharing Rules to determine Transferred From functionality