Configure - Stripe Charge to NetSuite Invoice Add On Demand

  • Updated



Data Flow Stripe Charge to NetSuite Invoice Add On Demand
Flow Type Realtime
NS Record Stripe Invoice Id, Invoice

 

Description:

 

Gets the charge id(ids) from setting and Import(imports) as NetSuite Invoice

 

  • Once the charge id is given and saved in the settings, this flow triggers a webhook to get the data fo that charge(charges) from Stripe
  • Before passing the charge records to the next step it uses an output filter to check if the status is “succeeded” and the invoice is empty (i.e direct charge payment without creating a invoice)
  • Using a stripe lookup it gets the customer details from Stripe

Customer

  • The process efficiently manages customer details by checking their existence in NetSuite using a filter condition: [["custentity_nm_stripe_customer_id","is","{{{customer}}}"],"OR",["email","is","{{{customerInfo.email}}}"]]. This condition compares the provided Stripe customer ID or email address with existing records in NetSuite. If a match is found, customer details are updated with the latest information from Stripe. Otherwise, a new customer entry is created in NetSuite using data retrieved from Stripe. 

Invoice

  • Creates a new invoice in NetSuite for the Stripe charge
  • The flow updates the Invoice Internal ID in NetSuite to match the Stripe invoice metadata. This happens when the Stripe charge id is filled in the NetSuite invoice as the Stripe Invoice Id and the "Update NetSuite Invoice ID to Stripe Metadata" checkbox is marked in the settings.

Configure IO Settings:

 

  •  Click on Settings - Invoices - Stripe to NetSuite 

 

  • Enter the Stripe Charge Id to import the invoice to NetSuite
  • Select the item internal id to create the invoice
  • Check Update NetSuite Invoice Id to Stripe Metadata checkbox to populate the invoice internal id to stripe metadata

IO Mappings: 

  • Create or Update Customer record in NetSuite (Charge)

    • Updates the first name, last name, email address and subsidiary for the customer
    • Updates the Stripe Customer Id field in NetSuite with the customer id from Stripe
    • Updates if the customer is either individual or a company
    • Updates the external id(unique identifier)  with the customer id from Stripe
    • NetSuite Customer Portal URL: This URL holds the stripe customer portal  link. After a set number of days the existing link expires then the suitelet is triggered to get the new link in place of the existing link. 

The suitelet is by default NOT DEPLOYED with the bundle installation. User has to manually deploy the script to run.This is the suitelet script for it: novamoduleStripeCustomerPortalLink. Once the script is deployed an external url is generated, add “&strCustId={{customer}}” to the generated url and  map this updated external url against NetSuite Customer Portal URL in mappings. This URL redirects to the Stripe Customer Portal where the customer has access to the invoices, payment methods and billing information.

 

Note:

Make sure that the Stripe Customer Portal URL is populated, if not run the Add/Update Stripe Customer Portal URL on the Customer record in NetSuite flow so that the field gets populated.

 

  • Create Invoice in NetSuite

    • Updates the Stripe Charge Id and Stripe Invoice Id with the charge id from Stripe
    • Updates billing, shipping and email addresses
    • Updates the items to be added for the invoice

 

  • Update Stripe Charge Metadata with NetSuite Invoice 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>)