SuiteBundle scripts and searches
SuiteBundle scripts
| Type | Script ID | Functional Area | What It Does |
|---|---|---|---|
| User Event Script | customscript_ns_gc_cust_mandate_setup_ue | Mandates | Runs on Customer records. Displays the GoCardless mandate sublist and the Request Mandate Link button. When a customer's mandate changes, triggers the Update Mandate on Invoice Map/Reduce script so all open invoices for that customer are updated with the new mandate. Triggers the mandate link email if "Send mandate link automatically" is enabled. |
| Suitelet | customscript_ns_gc_mandate_info | Mandate link requests | Serves the mandate link request popup on Customer records, invoked by the Customer Mandate Setup user event script. |
| Map/Reduce Script | customscript_ns_gc_update_invoice_mr | Mandate updates on invoices | Updates all open invoices for a customer with the customer's new mandate and GoCardless account when the mandate changes.
Two deployments: a standard deployment triggered by a single customer's mandate change, and a bulk deployment triggered by a Mandate Sync. |
| User Event Script | customscript_ns_gc_mandate_actions_ue | Mandates | Runs on the GoCardless Mandate custom record. Manages field behaviour and UI on the mandate record. Validates mandate-to-customer relationships on save. |
| Client Script | customscript_ns_gc_mandate_validation_cs | Mandate validations | Client-side validation on the GoCardless Mandate custom record. Tracks when the customer field changes and validates mandate-to-customer assignments on save. |
| Client Script | customscript_ns_gc_invoice_validation_cs | Invoice, payment cancellation, and payment refund validations | Client-side validation on Invoice and Credit Memo records. Invoices: Checks that a valid active mandate exists when "Pay with GoCardless" is checked. Validates that a GoCardless account is populated. Displays confirmation dialogs for the Cancel Payment and Retry Payment buttons. Credit Memos: blocks "Refund with GoCardless" if an invoice is already applied. |
| User Event Script | customscript_ns_gc_invoice_actions_ue | Invoice buttons and fields | Invoices: Adds and controls the Cancel Payment and Retry Payment buttons on invoices. Resets GoCardless fields when an invoice is copied. Configuration records: Triggers the bulk mandate update script when a Mandate Sync is performed from the Configuration record. |
| Suitelet | customscript_ns_gc_retry_payment | Invoice payment retries | Serves the Retry Payment options popup invoked from the Invoice record. Handles the retry flow initiation. |
| Map/Reduce Script | customscript_ns_gc_invalid_mandate_mr | Invoice mandate validations | Runs on a schedule. Identifies approved invoices with "Pay with GoCardless" enabled that have an invalid or missing mandate, and updates their integration status so they can be identified and corrected. |
| Map/Reduce Script | customscript_ns_gc_process_reconcile | Payout reconciliation | Processes GoCardless Payout Reconciliation custom records. For each record: creates a GoCardless fees Journal Entry (if applicable), creates a Customer Deposit record grouping the associated payments, and updates the Payout Reconciliation record with the processing status (Processed/Failed), journal ID, and deposit ID. |
SuiteBundle saved searches
| Name & Search ID | Functional Area | What It Does |
** Script use ** Open Invoices customsearch_ns_gc_open_invoices_search | Mandates on invoices | Used by the Update Mandate on Invoice Map/Reduce script (single-customer deployment) to find open invoices that need to be updated when an individual customer's mandate changes. |
** Script use ** Open Invoices BULK customsearch_ns_gc_open_invoices_ss_bulk | Mandates, invoice payments | Used by the Update Mandate on Invoice Map/Reduce script (bulk deployment) to find open invoices across all customers when a Mandate Sync record is performed. |
** Script use ** Invoice with invalid mandate search customsearch_ns_gc_inv_invld_mndt_search | Invoice payments | Used by the Invalid Mandate Check Map/Reduce script to identify approved invoices with "Pay with GoCardless" enabled that have an invalid or missing mandate, so they can be flagged for correction. |
GoCardless | Celigo | Invoice sync search customsearch_ns_gc_inv_search | Invoice payments | The invoices that meet this saved search's criteria will be picked up for processing (the integration runs the search every 5 minutes). Returns open, approved invoices with "Pay with GoCardless" enabled and a valid active mandate. |
GoCardless | Celigo | Get Invoice Payment status customsearch_ns_gc_inv_paym_status | Invoice payment events | Used by the integration during webhook processing to look up a NetSuite invoice by its GoCardless payment ID. Returns the invoice's current payment status, NetSuite status, amount, and customer ID. |
Payment exists search customsearch_ns_gc_payment_exists | Invoice payment events | Used by the integration to check whether a Customer Payment record already exists in NetSuite for a given GoCardless payment ID, preventing duplicate payments from being created. |
Accounts Receivable search customsearch_ns_gc_acct_receivable | Invoice payment events | Used by the integration to retrieve the correct Accounts Receivable account for a given customer and subsidiary combination for the Customer Payment record creation. |
Payment data search customsearch_ns_gc_payment_data | Invoice payment events | Used by the integration during webhook processing to look up NetSuite Customer Payment records by their GoCardless payment ID. |
GoCardless | Celigo | Refund lookup customsearch_ns_gc_refund_lookup | Refunds | Used by the integration to check whether a refund record already exists in NetSuite for a given GoCardless payment, preventing duplicate refunds from being created. |
Credit Memo data search customsearch_ns_gc_cm_data | Payment cancellation, refunds | Used by the integration to retrieve Credit Memo details needed during payment cancellation and refund processing. |
Invoice accounting preference search customsearch_ns_gc_inv_acct_preference | Payment cancellation | Used by the integration to retrieve the "void using reversing journals" accounting preference setting from an invoice, which determines whether a cancellation routes to a Credit Memo or an Invoice Void. |
GoCardless | Celigo | Payout Reconciliation customsearch_ns_gc_payout_reconcile_mr | Payout reconciliation | Returns Payout Reconciliation custom records including payout data, payout items, fees, and reference. Used by the Payout Reconciliation Map/Reduce script as its input source. |