Related
Collapse
X
-
{$originalLead.utmcampaign} but didn't work
this is how it came in on the other machine:
{"id":"643873f2c29205e5a","type":"contact","lea dId ":"64386bd691f6f89db","createdAt":"2023-04-13 21:28:18","modifiedAt":"2023-04-13 21:28:48","fbc":"{$originalLead.fbc}","fbp":"{$ori ginalLead.fbp}","ga_pseudo_id":"{$originalLead.gap seudoid}","ipAddress":"{$originalLead.ipaddress}", "utm_campaign":"{$originalLead.utmcampaign}"," utm_ medium":"{$originalLead.utmmedium}","utm_source":" {$originalLead.utmsource}","utm_content":"{$origin alLead.utmcontent}","utm_term":"{$originalLead.utm term}","page-path":"{$originalLead.pagepath}"}
As you can see above, all related entity variables are not working, but own contact's variables are ok
ThanksComment
-
Russ,
Try to define variables beforehand. Create Execute Formula Script Action and paste the following:
Code:$originalLeadFbc = originalLead.fbc; $originalLeadFbp = originalLead.fbp; $originalLeadGapseudoid = originalLead.gapseudoid; $originalLeadIpaddress = originalLead.ipaddress; $originalLeadUtmcampaign = originalLead.utmcampaign; $originalLeadUtmmedium = originalLead.utmmedium; $originalLeadUtmsource = originalLead.utmsource; $originalLeadUtmcontent = originalLead.utmcontent; $originalLeadUtmterm = originalLead.utmterm; $originalLeadPagepath = originalLead.pagepath;
Code:{ "id": "{$id}", "type": "contact", "leadId": "{$originalLeadId}", "createdAt": "{$createdAt}", "modifiedAt": "{$modifiedAt}", "fbc": "{$$originalLeadFbc}", "fbp": "{$$originalLeadFbp}", "ga_pseudo_id": "{$$originalLeadGapseudoid}", "ipAddress": "{$$originalLeadIpaddress}", "utm_campaign": "{$$originalLeadUtmcampaign}", "utm_medium": "{$$originalLeadUtmmedium}", "utm_source": "{$$originalLeadUtmsource}", "utm_content": "{$$originalLeadUtmcontent}", "utm_term": "{$$originalLeadUtmterm}", "page-path": "{$$originalLeadPagepath}" }
As for why related entities data is not pulled into the payload, it seems to me that this is quite logical. I am starting from the article on attributes: https://docs.espocrm.com/administrat...ing/#attribute. There are no fields in the format originalLead.ipaddress (for example). That is, from the related entities in the payload, we can only pull out the id and name.
But these are just assumptions, I don't use HTTP requests very often in my work and I may not know some details. When I clarify this information with the developers, I will definitely supplement this post with it. In the meantime, I suggest you use the solution I gave you above, with the variables defined in advance.
Last edited by lazovic; 04-20-2023, 07:01 AM.Comment
Comment