1

I am new to suitetalk API and Netsuite. I need to programatically create a customer deposit? Work orders are already created and in pending fulfillment status. I have internal Id and I can search for this work order from netsuite. How to create a customer deposit?

the following documentation link has documentation for credit deposit at page 75 but that information is not good enough for me to understand how to code this.

https://docs.oracle.com/cloud/latest/netsuitecs_gs/NSTWR/NSTWR.pdf

A code sample to refer to would be great help or any pointer would be of help.

LMKN
  • 101
  • 1
  • 1
  • 6

1 Answers1

0

Using the netsuite ruby gem here's how to create a customer deposit linked to an existing SalesOrder.

In many cases, you'll need more parameters passed to the API call, but this is the bare minimum!

ns_sales_order_id = 15126934

ns_customer_deposit = NetSuite::Records::CustomerDeposit.new(
  external_id: 'a_unique_id',
  sales_order: { internal_id: ns_sales_order_id },
  payment: '100.0'
)

NetSuite::Utilities.backoff { ns_customer_deposit.upsert }

ns_customer_deposit.internal_id
iloveitaly
  • 2,053
  • 22
  • 21