I have a Journey Builder Interaction in which after a decision split, I am sending 2 emails one after the other without wait. The issue is that:

The 1st Email is not taking any subscribers,

The 2nd Email is taking all subscribers that passed through the decision split.

When I check the Send section for that Journey Builder email, I see:

4,478 Emails are Queued and 17 have Errored.

I have already check the Email for Content Detective and Validation; both passed. Also journey is running fine.

Is there anything else that can be checked for email or journey? Or a way to check why the emails are queued for that email only?


I have this AMPScript in the email which is failing:

UpsertDE("Account Updates", 1, "EventinstanceId", EventinstanceId, "Journey Status", Now())   

Below is the error i am getting on that - Got it from SFMC support

Pls advise on error as i am unable to understand

Sql Text:
UPDATE [C7215610].[Account Updates] SET [Journey Status] = @p0_0 
WHERE [EventinstanceId] = @p0_1;
 INSERT INTO [C7215610].[Account Updates] ([EventinstanceId],[Journey Status])
  VALUES (@p0_2,@p0_3);

Sql Parameters:
  0: [NVarChar] @p0_0 = 10/18/2016 5:57:46 AM
  1: [NVarChar] @p0_1 = 1ede7fb6-bea0-4415-87d1-5f04d87d7ee3
  2: [NVarChar] @p0_2 = 1ede7fb6-bea0-4415-87d1-5f04d87d7ee3
  3: [NVarChar] @p0_3 = 10/18/2016 5:57:46 AM

 - from OMMCommon --> 

 --- inner exception 1---


Error[0]:  -- Number: 515 Class: 16 State: 2 Source: .Net SqlClient Data Provider Server: XTGAP4CL12D6.XT.LOCAL\I6,10006 Line: 4
   Message: Cannot insert the value NULL into column 'CustomerId', table 'ExactTarget752.C7215610.Account Updates'; column does not allow nulls. INSERT fails. 

Error[1]:  -- Number: 3621 Class: 0 State: 0 Source: .Net SqlClient Data Provider Server: XTGAP4CL12D6.XT.LOCAL\I6,10006 Line: 4
   Message: The statement has been terminated.

 - from .Net SqlClient Data Provider

I am unable to understand that in UpsertDE, we are updating Account Updates DE then why the error is mentioning CustomerId column

Cannot insert the value NULL into column 'CustomerId'
  • Is there personalization or AMPScript in the email? Oct 18, 2016 at 11:50
  • @AdamSpriggs - Yes there is personalization and AMPscript in the email. But it is the usual one which is in every email. What could be the issue here Oct 18, 2016 at 11:59
  • No idea since you have provided any details about the scripting. Oct 18, 2016 at 12:08
  • @AdamSpriggs - I have added details now. Did not have details earlier. Took long time to connect to support and get the info. Oct 18, 2016 at 12:20
  • I've updated my answer with a scripting suggestion. Oct 18, 2016 at 13:21

1 Answer 1


Emails configured in Journey Builder are Triggered Sends, which you can find in the Interactions tab in SFMC.

You can pause the trigger corresponding to your email and download the queued subscribers or clear the queue. You can also pause and restart the trigger definition in case one email is holding up the queue.

I'm guessing there's some issue with the data coming over in the payload that isn't handled in the email scripting.


I'd revise your AMPScript to make it more fault-tolerant and to include the CustomerID which is required in the DE you're updating:


var @eid, @js, @cid

set @eid = AttributeValue("EventInstanceId")
set @cid = AttributeValue("CustomerId")

if empty(@cid) then
  set @cid = "0"

set @js = now()

UpsertDE("Account Updates", 1, "EventInstanceId", @eid , "CustomerID", @cid, "Journey Status", @js) 


It's a good practice to code your email assuming that any of the incoming values can be null. The AttributeValue() function will return an empty string if the personalization string is undefined.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .