APIs & Integrations

webmaestro
Member

Associate customProperties and dealProperties w Contact during a Transactional Email

SOLVE

We are submitting contactProperties, customProperties and dealProperties when sending Transactional Emails.

 

But we're noticing that the Contacts created do not have their respective customProperties nor the dealProperties associated.

  • Are we doing something wrong?
  • How do we fix this, so we can view the Transactions that our Contacts have made?

We need to associate customProperties & dealProperties with a Contact Record during a Transactional Email. But it isn't happening.

 

Here's some JSON to play with.

 

NOTE:

  • We've got contactProperties (ADD record or UPDATE if it exists), customProperties
  • duplicated some contactProperties & dealProperties fields to use in Transactional Email, since:
  •   a) we want text to reflect what's sent, not HubSpot Contact,
  •   b) dealProperties are not available as Transactional Email fields (!)

{

   "emailId":6824020861,

   "message":{

      "to":"csmith@xyz.tv",

      "sendId":"xyz-receipt-007"

   },

   "contactProperties":[

      {

         "name":"firstname",

         "value":"Jessica"

      },

      {

         "name":"lastname",

         "value":"Rabbit"

      },

      {

         "name":"email",

         "value":"csmith@xyz.tv"

      },

      {

         "name":"email_consent",

         "value":"1"

      },

      {

         "name":"ipaddress",

         "value":"123.45.67.89"

      }

   ],

   "customProperties":[

      {

         "name":"firstname",

         "value":"Jessica"

      },

      {

         "name":"lastname",

         "value":"Rabbit"

      },

      {

         "name":"email",

         "value":"csmith@xyz.tv"

      },

      {

         "name":"address",

         "value":"1234 Main Street, Suite 200, Tustin, CA 92780 USA"

      },

      {

         "name":"amount",

         "value":"100.00"

      },

      {

         "name":"payment_type",

         "value":"VISA"

      },

      {

         "name":"card_last4",

         "value":"7890"

      },

      {

         "name":"transaction_id",

         "value":"1234567890"

      },

      {

         "name":"transaction_datetime",

         "value":"December 21, 2018 - 09:24:01 Pacific Standard Time"

      },

      {

         "name":"comments",

         "value":"Keep the change ya filthy animal!"

      }

   ],

   "dealProperties":[

      {

         "name":"amount",

         "value":"100.00"

      },

      {

         "name":"gift_code",

         "value":"M092018"

      },

      {

         "name":"closedate",

         "value":"20181221-09:24:01"

      },

      {

         "name":"createdate",

         "value":"20181221-09:24:01"

      },

      {

         "name":"hs_analytics_source",

         "value":"email"

      },

      {

         "name":"hs_analytics_source_data_1",

         "value":"https://www.xyz.org/gift/prod"

      },

   ]

}

0 Upvotes
1 Accepted solution
webmaestro
Solution
Member

Associate customProperties and dealProperties w Contact during a Transactional Email

SOLVE

Thank you for your response.

 

"Deal properties can't be sent through this [Single-Send API/Transactional Email] API at all."

 

I'm surprised, because the Transactional Email is sent as a confirmation of the actual Deal (marketing campaign went out, the user clicked the link, and made a donation, and this Transactional Email 'receipt' is the result of the Donation 'Deal').

 

If the process of sending Transactional Email receipt doesn't help move towards a 'Deal' (as we were led to believe), then customers should be instructed on the blessed method of adding the transaction dealProperties to the Contact history.

 

We need to find out how to get that associated with the HubSpot Contact now, and we figured that since the Transaction is happening through HubSpot, it would be a done ‘deal’ if you forgive the pun.

 

Now we have hundreds? Thousands? of transactions that are not associated via dealProperties. Since we don’t require authentication before accepting a donation, we don’t know if they’re Contacts or not, until the 'Deal' is made.

 

We're working with HubSpot support on how to proceed, but I wanted to let others know that Transactional Emails are not linked to Contacts as Deals.

View solution in original post

0 Upvotes
2 Replies 2
cbarley
HubSpot Alumni
HubSpot Alumni

Associate customProperties and dealProperties w Contact during a Transactional Email

SOLVE

Hi @webmaestro , are you specifically using the Single Send API, and not the SMTP API? If you're using the Single Send API, from what you're describing it sounds like everything is working as expected. Contact properties sent through this API will update on a contact record if that contact property exists. Deal properties can't be sent through this API at all. Custom properties sent through this API are properties you want included in the email itself, but wouldn't either a.) make sense to hold in a contact property on a contact in HubSpot, or b.) you don't need to access as persisting contact property information on the actual contact record. If all of this info is necessary to be accessed via the contact record, you might want to create custom properties inside of HubSpot to store the information you're sending through the API, and send all/most info as contactProperties instead of customProperties.

0 Upvotes
webmaestro
Solution
Member

Associate customProperties and dealProperties w Contact during a Transactional Email

SOLVE

Thank you for your response.

 

"Deal properties can't be sent through this [Single-Send API/Transactional Email] API at all."

 

I'm surprised, because the Transactional Email is sent as a confirmation of the actual Deal (marketing campaign went out, the user clicked the link, and made a donation, and this Transactional Email 'receipt' is the result of the Donation 'Deal').

 

If the process of sending Transactional Email receipt doesn't help move towards a 'Deal' (as we were led to believe), then customers should be instructed on the blessed method of adding the transaction dealProperties to the Contact history.

 

We need to find out how to get that associated with the HubSpot Contact now, and we figured that since the Transaction is happening through HubSpot, it would be a done ‘deal’ if you forgive the pun.

 

Now we have hundreds? Thousands? of transactions that are not associated via dealProperties. Since we don’t require authentication before accepting a donation, we don’t know if they’re Contacts or not, until the 'Deal' is made.

 

We're working with HubSpot support on how to proceed, but I wanted to let others know that Transactional Emails are not linked to Contacts as Deals.

0 Upvotes