Account Credit Request Form
use an account credit request form to let logged in b2b customers request credit for one or more items from a recent purchase this is useful when customers need to report damaged items, missing items, incorrect products, quality issues, pricing issues, or other order problems with sparklayer forms, you can collect the request from the customer, ask for the right supporting details, review the request internally, and trigger follow up actions such as emails or api requests what you’ll build in this guide, you’ll create a form that lets customers select a recent purchase add one or more line items they want credit for choose a reason for each line item provide extra details depending on the reason upload photos or supporting files submit the request for review you’ll also create internal fields so your team can track the request status assign the request to a team member approve or decline the request record approved credit amounts add internal notes trigger actions when a request is approved or declined how the process works a typical account credit request process looks like this the customer opens the credit request form the customer selects the purchase they want to query the customer adds each affected line item the customer chooses a reason for each line item the form shows extra fields based on the selected reason the customer uploads photos or files if needed the customer submits the request your team reviews the request internally the request is approved, declined, or sent to another system for action you can start with a simple version and add more automation later a simple version might only collect the request and notify your team an advanced version might also use internal approval buttons, automatic credit application to the account on approval, and send data to other systems before you start this setup works best when customers are logged in before opening the form that allows sparklayer to identify the customer and, where available, use their customer data, purchase data, and customer group data before building the form, decide which purchase or order data customers should be able to select from which credit reasons you want to support what evidence is required for each reason who reviews requests internally whether customers should receive confirmation emails what should happen after approval or decline for example, approval might send the request to your erp, helpdesk, finance system, or customer support team build the customer form create a new form called account credit request in the form builder, go to form and add the main customer facing fields recommended fields field type notes purchase / order select let the customer choose the purchase this request relates to credit request items field group mark this group repeatable so customers can add multiple line items sub fields inside the group reason category select or radio example reasons damaged, missing, incorrect item, quality issue, pricing issue, other line item select options should come from the selected purchase quantity affected number useful when only part of a line item needs credit reason for credit request long text let the customer explain the issue supporting files file upload use for photos, delivery notes, or other evidence preferred resolution select or radio optional example credit note, replacement, contact me for the repeatable group add a group field name it credit request items enable repeatable add the line item, reason, quantity, description, and file upload fields inside the group a repeatable group is useful here because one purchase can have more than one item that needs credit at this point, the form field setup might look like this example form fields setup add purchase and line item options the purchase / order field should use a data source instead of manual options for the purchase / order field select the field open options choose data source click on "select data source " , then in the reference picker popup click "see advanced options" to see all options and not just the form fields add a reference from sparklayer purchase data for the current entry customer sparklayer > purchasing > entry customer's purchases (click select) then, choose a clear label, by clicking on "option label field" reference for instance you might want to use the purchase identifiers > visible id field for the line item field inside the repeatable group select the line item field open options choose data source find the reference for the selected purchase (under advanced options again) sparklayer > purchasing then under "specific purchase by sparklayer id" input click reference select the purchase / order field you setup previously now scroll down and click the select button for the "all packages' line items" option then, choose a clear label for the line item select by clicking on "option label field" reference button a good option might be "line item identifiers > sku" optional show extra questions based on reason use display logic to show only the fields that matter for each reason examples reason extra fields to show damaged item photo upload, damage description missing item missing quantity, delivery note upload incorrect item received expected item, item received, photo upload quality issue description, photo upload pricing issue expected price, explanation other general explanation to set this up select the field you want to show conditionally open display logic add a rule based on credit reason choose when the field should be shown example show damage photos when credit reason equals damaged item add validation add validation rules for important fields recommended validation field validation purchase / order required line item required credit reason required quantity affected required, greater than 0 description required for “other” or complex reasons supporting files required for damaged or quality issue requests fields can be marked as required by clicking the checkbox in the basic properties tab to add more advanced validation, use the validation rules docid\ ijhtaqjo7czjcri98gsxf feature optional add internal review fields you might handle the review and approval of credit requests in your erp or other existing system, and in that case you might not need internal admin fields however, if you want to manage internal processes for this form inside sparklayer, you can utilise the internal fields feature internal fields are for the administrative users who will be reviewing and working with the form submissions they are not shown to the customer internal fields show up next to each form submission entry in the sparklayer dashboard go to internal fields and add fields such as internal field type purpose review status select new, in review, approved, declined, actioned assigned to text or select who is handling the request decision select approved or declined approved credit amount number amount approved by the reviewer reviewer notes textarea internal comments external reference id text ticket, erp, or finance system reference approval button button used to trigger the approval workflow decline button button optional button to trigger a decline workflow internal fields keep the customer facing form simple while giving your team a structured administrative info fields area customers do not see these internal review fields what happens after submission after the customer submits the form, the request appears as a form entry your team can open the entry, review the submitted details, check uploaded files, and update the internal fields a typical internal process might be review the request set review status to in review add reviewer notes set a decision enter an approved credit amount if approved click an internal approval or decline button let a workflow handle the next action notify your team on submission when we created the form, we ticked the "receive new submission notifications?" toggle this creates a "new submission notifications" workflow which by default sends out new submission email notifications to the store administrator email automatically optional send the customer a confirmation you may also want to send the customer a confirmation email you can do this by modifying the "new submission notifications" workflow and adding an extra email step see the workflows & automations docid\ kfk4kgojugqv3bolye b documentation for more information optional keep dependent fields clean if the line item options depend on the selected purchase, clear the selected line items when the purchase changes this prevents customers from selecting an order, choosing line items, then changing the order while keeping line items from the old order create a workflow called reset credit items when purchase changes setup part value trigger answer updated watched field purchase / order step 1 clear answer target credit request items flow trigger answer updated ↓ purchase / order changed ↓ clear answer credit request items ↓ customer selects line items again from the new purchase this is a good example of using workflows to keep dependent fields clean and accurate approve requests once your team has reviewed a request, you can use a workflow to handle the next action for example, clicking an internal approval button can send the approved request to another system, email the customer, and update the entry status create a workflow called credit request approved option a use an internal button part value trigger internal button clicked button approval button step 1 condition step 2 api request or send email step 3 update entry or row option b use a status field part value trigger internal field updated watched field review status condition review status equals approved step 1 api request or send email step 2 update entry or row common approval actions send the approved request to an erp or finance system using the api request step create a support ticket by calling an external api email the customer update the review status to actioned update the customer record using the update customer step please see the workflows & automations docid\ kfk4kgojugqv3bolye b documentation for more information decline requests if you want a structured decline process, create a second workflow create a workflow called credit request declined setup part value trigger internal button clicked, or internal field updated condition decision equals declined step 1 send email step 2 update entry or row common decline actions email the customer update review status to declined add an internal note store the date the request was declined keep the customer message simple and clear if the request needs a personal explanation, ask the reviewer to fill in an internal note and include it in the email optional send approved requests to another system if your finance, erp, helpdesk, or support system accepts api requests, you can send approved credit requests to that system automatically use an api request workflow step after approval the api request can include customer details purchase or order details requested line items reasons uploaded file references approved amount reviewer notes entry link external reference id use the template editor and reference picker to build the api request payload and insert the right values you do not need to type reference paths manually use the data references docid\ bj9tb3gn vybi1 ehm4rd system you can use the template editor loop function to loop over a list of credit request item repeatable group field, and output the data for each item in the api request json payload for more advanced use cases, conditional logic inside the template is also supported publish, embed, and test when the form, internal fields, and workflows are ready, publish your changes then decide where customers should access the form common options add it to an account page link to it from an order or support page share the form link with selected customers use the preview tab to check the customer experience before publishing please note that in this case the preview tab is less useful as it won't have the logged in customer context and so in this case and with any more advanced form, you will need to first embed the form on your ecommerce store within a page where the sparklayer core script is available and customers can login and see the sparklayer account and cart widgets to embed the form, you can use the various options outlined on the embed tab testing checklist before launching, test the full process check that a logged in customer can open the form the purchase field shows the expected options the line item field updates based on the selected purchase, where available changing the purchase clears old line item selections reason specific fields show and hide correctly required fields block incomplete submissions file uploads work as expected a submitted request appears as an entry the correct internal administrative submission fields are visible next to entries submission notification emails are sent approval and decline workflows run correctly api requests send the expected data, if used test with more than one customer account if customer specific purchase data is used best practices keep the customer facing form short ask for the purchase, affected line items, reason, and evidence use a repeatable group for line items this avoids asking customers to submit separate forms for each item use display logic for reason specific fields only show extra questions when they are needed use file upload for evidence photos are especially useful for damaged or quality related requests use internal fields for review do not expose admin only statuses, notes, or approval decisions to customers clear dependent fields when source fields change if line item options depend on the selected purchase, clear line items when the purchase changes use workflows for background logic, repeatable admin steps and automation notifications, approvals, api requests, and status updates are good workflow use cases start simple you can launch with manual review first, then add api integrations later test with real customer accounts make sure purchase and line item options show the expected data