2

My users will be using Distributed Marketing quick send from the standard Contact record. I need to pull User data into a content template for the email signature. Right now I'm just trying to get the phone number from the user sending the email.

Can't seem to figure out if there is some kind of additional access that needs to be granted or if I am missing something else.

User_Salesforce_1 is my synchronized User object DE living in a child BU. Email is the standard Email field on User I'm using to match @sendFromEmail on the main QS Journey DE.

I have multi-org connected.

%%[

var @rows, @row, @senderemail, @phone

set @senderemail = AttributeValue("sendFromEmail")
set @rows = LookupRows("User_Salesforce_1","Email",@sendFromEmail)
set @row = Row(@rows, 1)
set @phone = Field(@row,"Phone")

]%%

<p>
%%=(@phone)=%%
</P>

Here is the Error

The subscriber preview failed to generate. Review the details, correct all issues, and try again. The Data Extension name for a LookupRows function call is invalid. A Data Extension of this name does not exist. Data Extension Name: User_Salesforce_1 Function Call: LookupRows("User_Salesforce_1","Email",@sendFromEmail) Parameter Name: DataExtensionName Parameter Ordinal: 1

Adam Spriggs
  • 626
  • 8
  • 23
DOC Oclock
  • 21
  • 2
  • You'll get a lot more eyes on your SFMC questions over at [salesforce.stackexchange.com](http://salesforce.stackexchange.com), specifically with the [marketing-cloud](http://salesforce.stackexchange.com/questions/tagged/marketing-cloud) and [ampscript](http://salesforce.stackexchange.com/questions/tagged/ampscript) tags. – Adam Spriggs Dec 14 '20 at 23:32
  • Synchronized SF DEs are integrated at the parent level and likely require the `ent.` prefix, but I'm not 100% sure about how the multi-org config affects it. – Adam Spriggs Dec 14 '20 at 23:35
  • You could alternatively retrieve the phone value using the [RetrieveSalesforceObjects](https://ampscript.guide/RetrieveSalesforceObjects) function, but it's not very performant. – Adam Spriggs Dec 14 '20 at 23:37
  • I did try appending the ENT. prefix and received the following. Access to a Data Extension was denied.Member ID: [child BU number]Job ID: 0Data Extension ID: e9287a1d-f73b-eb11-b815-48df37e41d3dData Extension Name: User_Salesforce_1Data Extension Template: (null)Partner API Object Type ID: 911Operation: View – DOC Oclock Dec 15 '20 at 22:37
  • You'll either need to use the SF function or mirror the user data in the child BU. The `ent.` prefix used to work in AMPscript, until SF removed the functionality for security reasons. – Adam Spriggs Dec 15 '20 at 23:31
  • When you say 'mirror the user data in the child BU', do you mean add the user data to a different DE instead of a synched data extension? The synched data extension 'User_Salesforce_1' is in the child BU already – DOC Oclock Dec 16 '20 at 00:09
  • Oh, right, duh. If you move your `User_Salesforce_1` DE to a shared folder does it work? Also, two SF folks weighed in on a similar question to yours on SFSE: https://salesforce.stackexchange.com/a/262201/5202 – Adam Spriggs Dec 16 '20 at 12:08
  • Well I ended up moving the content, DE and journey into the parent BU then referenced a similar synched data extension on the User object and viola got passed this issue. Seems like there is a setting somewhere that might allow me to access the child BU synched data extensions from the child or parent but I have yet to find it. Now on to troubleshooting why it works in preview but when combined with a DM content block I get an error in the sales cloud quick send UI...Thanks for the help thinking through different parts of this @AdamSpriggs much appreciated – DOC Oclock Dec 16 '20 at 19:08
  • @DOCOclock I'm getting the same error you mentioned at the end of your comment, the preview is working, but the edit mode is not. Did you figure out why? thnks – Rachid Mamai Nov 08 '21 at 10:01

1 Answers1

1

You many need to reach out to support and ask them to enable the AMPSCRIPT_ENT_LEVEL_DE_SHARING business rule in your account. This setting is not available via the standard Admin/Setup UI within Marketing Cloud.

This business rule was introduced a few years ago and impacts the way data can be pulled from Synchronized DE's within an instance.

Also, as others have mentioned, you will likely need to use the ENT. prefix when referencing the DE in the lookup.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
Scott T.
  • 11
  • 1