Advanced Customization using Script
Workplace Campaigns can be further customized using Scripting.
If you have the Scripting permission, you will see editors for pre and post-processing scripts on the Integration tab of Workplace Campaigns. Pre-processing Script is executed when a Workplace Campaign is accessed before it is displayed. Post-Processing Script is executed after a successful transaction. Note that declined transactions to not execute Post-processing script.
When pre and post-processing script is executed the Context is pre-populated with the following variables:
purchaseOrder
- contains the current transaction being operated on.teamCampaignHome
- container for the Workplace CampaignpublicPurchaseOrderHome
- container for the transaction
Integration Codes
Integration codes can be added to Workplace Campaigns to be used in customizing their appearance, as variables in scripting, in merge tags in emails and in reports. The item is accessible via the context variable:
purchaseOrder.get('custom property name')
- the value of the named custom property on the current transactionpurchaseOrder.campaign
- the Workplace Campaign which created the transactionpurchaseOrder.campaign.get('custom property name')
- the value of the named integration code on the Workplace Campaign which created the current transaction
See Advanced Customization using Scripting for more information.