How to programmatically turn on Einstein email tracking settings in scratch org

einsteinemail-trackingsalesforcedx-cliscratch-org

EDIT: my question is prob a diff way to ask this

I get this error in my CLI when pushing source:

In field: field – no CustomField named ListEmail.DeliveryRate

and I've discovered that the error is resolved if I

  1. manually launch my scratch org and go into the setup
  2. Navigate:
    Einstein > Einstein Sales > Inbox > Setup Assistant
  3. Turn on Make Inbox Available to Users
  4. Turn on Email Tracking

I'm already using a shape-based org – is there some technique to help me navigate this issue in a more automated CI-pipeline friendly way?

Best Answer

This worked for me insofar as it turned on the Salesforce Inbox feature and turned on the email tracking checkbox - IDK how much of this is influenced by my org shape versus adding these settings below, I only know once I added this section is when it started to work properly

  "settings": 
  {
    ...
    "emailIntegrationSettings":{
      "enableContactAndEventSync": true,
      "enableProductivityFeatures": true,
      "doesGmailStayConnectedToSalesforce": true,
      "enableOutlookIntegration": true,
      "enableGmailIntegration": true,
      "isLayoutCustomizationAllowed": true,
      "doesEmailLogAsEmailMessageInOutlook": false,
      "shouldUseTrustedDomainsList": false,
      "enableEmailTrackingInMobile": true,
      "enableSupplementalContactInfoInMobile": false,
      "enableEngageForOutlook": true
    },

FWIW - I copied the default values from the XML example shown on this page

my salesforce inbox settings (I am about to push source and will update this answer if it indeed fully works as I expected)