Data Flow | Stripe Refund to NetSuite Credit Memo Add and Customer Refund Add On Demand |
Flow Type | Scheduled |
NS Record | NetSuite Credit Memo, Customer Refund |
Description:
The flow “Stripe Refund to NetSuite Credit Memo Add and Customer Refund Add” gets the refund id(ids) from settings and creates a credit memo and customer refund in NetSuite
- Once the refund id is given and saved in the settings, this flow triggers a webhook to get the data of that refund(refunds) from Stripe
- Once the flow is triggered, flow performs stripe lookup on the refund with the id and gets the refund data from Stripe.
- Performs a lookup in Stripe to get the charge with the charge ID available in the refund data.
Credit Memo
- Creates a credit memo that is linked to the existing invoice in NetSuite which will be found using dynamic lookup with the invoice in the charge data.
Customer Refund
- Creates a customer refund in the NetSuite by applying the credit memo created in the previous step.
Configure IO Settings:
- Click on Settings - Refunds - Stripe to NetSuite.
- To run the on-demand flow, provide the stripe refund id in the settings as shown below, multiple refunds (up to 100 Ids) can be provided with a comma as a separator.
IO Mappings:
-
Import Credit Memo into NS
- Uses a dynamic lookup to map the invoice internal id to created from using the filter ["custbody_nm_stripe_invoice_id","is","{{{new_charge_invoice}}}"]
- Mapping Stripe Refund id to id from Stripe
- Mapping External id to id from Stripe
-
Create a Customer Refund from Credit Memo in NS
- Mapping account and refund method
- Mapping Credit:Apply to “true”
- Mapping customer internal id using a dynamic lookup using the following filter ["custentity_nm_stripe_customer_id","is","{{{chargeInfo.customer}}}"]
-
Update Stripe Refund Metadata with NetSuite Customer Refund Id
Add the mappings as mentioned below
- Source record field (Stripe)
- Give the name of the field you want to get the value from
- Destination record field (Stripe)
- Enter metadata followed by the name you wish to give to the field (metadata.<anyNameForTheField>)