Skip to main content
Level 2
September 29, 2026
Question

Salesforce-synced Custom Object not showing in Email Script Editor — how to reference it in Velocity?

  • September 29, 2026
  • 4 replies
  • 33 views

Hi all,

I'm trying to reference a Salesforce-synced custom object in an email via Velocity, but it never renders — because the object doesn't appear in the Email Script Editor's "Custom Objects" tree at all.

Setup:

  • Native Salesforce sync.
  • Custom object Producer Lead Detail (Producer_Lead_Detail__c), related to Lead via a Lead__c lookup. Sync is enabled.

What works:

  • It works as filters/triggers (e.g., "Has Producer Lead Detail", "Added to Producer Lead Detail").
  • A smart list on "Has Producer Lead Detail = true" returns the right people, and the records/fields are populated on the person (First Name, Person Source, Lead Created Date, etc.).

What doesn't:

  • In the Email Script Editor, the object is not in the "Custom Objects" section of the tree — it only appears nested under Person, and dragging it inserts ${lead.Producer_Lead_Detail__c} (a scalar), not a custom-object list.
  • No list variable resolves. A dump via a real send returns blank for every variant:
$Producer_Lead_Detail__cList   -> blank
$Producer_Lead_Detail__clist -> blank
$producerLeadDetail_cList -> blank
$lead.Producer_Lead_Detail__c -> blank

The object's fields are marked visible, and the data is confirmed present in Marketo.

Question:

  1. How do I get a synced Salesforce custom object to appear in the Email Script Editor "Custom Objects" tree so it resolves as $Object__cList? Is there a setting I'm missing?

These are additional images that might help: 

  1. the Producer Lead Detail object not showing in the tree on the right hand side of the email scripting window
  1. what i see for the custom object itself on the “Salesforce Objects Sync” page under Admin:  

     

    4 replies

    sandy_logitech
    User Group Leader
    User Group Leader
    September 30, 2026

    Are there any other routes (i.e. chains of references) to this object in SFDC? That is, is there another relationship between this object and, say, Account via another intermediate object?

    aayushp20Author
    Level 2
    September 30, 2026

    Yes there are multiple routes. The same SFDC object (Producer_Lead_Detail__c) is synced into Marketo three times, via three different relationship fields:

    1. Producer Lead Detail (Producer_Lead_Detail__c) — Lead, relationship field Producer_Lead_Detail__c(Lead)
    2. Producer Lead Detail 2 (the one my smart list uses) — Lead, relationship field Lead__c(Producer Lead Detail) 
    3. Producer Lead Detail — Contact, relationship field Contact__c(Producer Lead Detail)

    All three show the same 134 SF rows / 27 Marketo rows. When I drag the object's field in the Script Editor it inserts ${lead.Producer_Lead_Detail__c}  which matches object #1's relationship field, not the Lead__c object (#2) that actually holds the data in my smart list.

    Could these multiple/duplicate routes be why the object won't surface in the email Script Editor "Custom Objects" tree? And if so, is the fix to consolidate to a single relationship (e.g., keep only the Lead__c route) so it exposes cleanly for scripting?

    aayushp20Author
    Level 2
    September 30, 2026

    ​@sandy_logitech Update: 

    I did see something here in the documentation that might be worth noting: 

    "To use an SFDC custom object, the object must have only one relationship to the Marketo lead. Objects are often linked through both the contact and account. Sync only objects that have the lead/contact relationship enabled."

     

    So i tried to disable the sync for Objects #1 and #3 i mentioned in my reply (after disabling the global SF sync first), but the button is greyed out for some reason. Any idea if its a permission issue?