intacct / intacct-sdk-net

Official repository of the Sage Intacct SDK for .NET
https://developer.intacct.com/tools/sdk-net/
Apache License 2.0
31 stars 45 forks source link

How to input the billing address and shipping address while creating a new customer in Intacct via Intacct SDK #195

Closed ThinkrAstha closed 2 years ago

ThinkrAstha commented 2 years ago

While creating the customer via Intacct SDK , in the request body , there is option to input the primary address but how are we supposed to input the shipping and billing address of a customer.

I do see an option of BillToContactName and ShipToContactName where we can input contact name . How does this work . Do we have to create contacts separately for a company in Intacct or it takes the contact input from already existing customers/vendors/contacts of a company ?

Please find the attached screenshots, which mentions about the fields I am mentioning about in the above query.

CustomerCreateRequest CustomerCreateRequest1

Also, please find the link attached below for IntacctSDk API call to create a customer :

https://intacct.github.io/intacct-sdk-net/class_intacct_1_1_s_d_k_1_1_functions_1_1_accounts_receivable_1_1_abstract_customer.html

ThinkrAstha commented 2 years ago

By creating contacts separately, what I meant, was , to make a separate API call , to create a new contact altogether for a company in Intacct , please find the link below for creating a contact via Intacct SDK API :

https://intacct.github.io/intacct-sdk-net/class_intacct_1_1_s_d_k_1_1_functions_1_1_company_1_1_abstract_contact.html

ThinkrAstha commented 2 years ago

As I am in mid of my development, and there are deadlines to attend to , is it possible, if you could look into this quickly. Appreciate your response.

Thanks

ThinkrAstha commented 2 years ago

Can you please look into this issue for a quicker response . Thank you for your time.

jhorn70 commented 2 years ago

I don't work for Sage. The best way I have found to do this is to create the contacts in separate functions. Give them a name like S and B and then use them in a function to create the customer record in an execute multiple. You can turn on the transaction flag to ensure they all roll back together if there is a failure.

dylan-holt-sage commented 2 years ago

@jhorn70 is correct. So there are 2 things here......

First thing is that, for creating a new customer, the system will automatically use addresses provided in DISPLAYCONTACT for billing/shipping address assuming no others are provided. This will automatically create a CONTACT record as well.

Second thing is that if you want to have different billing/shipping information for a customer, there will need to be an already active contact record there and it would be referenced by the CONTACT name.

For reference: https://developer.intacct.com/api/accounts-receivable/customers/#create-customer

Hope this helps, closing this issue.