Customer Contact Records

SOLVED

Hello.

We need to update a number of customer records each with new contact records. 

I figure it's a simple insert query into tciContact. To get the next CntctKey number I use:

declare @contctkey int

exec spGetNextSurrogateKey 'tciContact',@cntctkey output

select @cntctkey

Does this sound right? Does anyone already have a script to help out with this? 

Thanks!

Parents
  • 0
    verified answer
    I would recommend looking into using the Data Import Manager (DIM) process for Customers as it should update existing customer records and add the new contacts for you without any coding needed. If you want to build a custom solution for this, review stored procedure spARapiCustomerIns as this is what DIM uses when it processes data and the staging tables you need to fill in order to have it properly execute.
Reply
  • 0
    verified answer
    I would recommend looking into using the Data Import Manager (DIM) process for Customers as it should update existing customer records and add the new contacts for you without any coding needed. If you want to build a custom solution for this, review stored procedure spARapiCustomerIns as this is what DIM uses when it processes data and the staging tables you need to fill in order to have it properly execute.
Children