Next, you need to create and schedule the deployment for the Map/Reduce script.
- Navigate to Customization → Scripting → Scripts.
- Use the Type filter to show only Map/Reduce scripts.
- In the search bar, find PayPack Generate Statement Link MR and click View.
- On the script page, click Deploy Script.
This will take you to the Script Deployment page. If you use multiple Stripe accounts, you must create a separate deployment for each one. On the deployment page, locate the Stripe Account Id parameter and enter the internal ID of the corresponding PayPack Stripe Accounts Configuration record.
Schedule the Script
You can run the script once or schedule it to run on a recurring basis.
- For the First Run (or a single execution):
- Navigate to Customization → Scripting → Script Deployments.
- Find the PayPack Generate Statement Link MR deployment and click Edit.
- (For multi-stripe setups) On the Parameters subtab, ensure the correct Stripe Account ID is entered.
- Hover over the Save button and select Save & Execute.
- For Recurring Runs:
- On the script deployment page, click Edit.
- Go to the Schedule subtab.
- Set the frequency (Daily, Weekly, Monthly, etc.), Start Date, and repeat interval.
- Check the No End Date box or set a specific End Date.
- Click Save.