How to Use a Function to Assign a Tag to Contacts in CRM
Within the CRM, I have multiple contacts that will be associated with a Deal (we call them Opportunities). Contacts may be added even after the Deal is closed. For email campaigns and reporting, it would be helpful to be able to tag contacts as they are added to deals (we only have a few different types of deals).
Using a workflow that triggers whenever a deal is created/edited. I think a function is the trick.
The function should work something like this:
Function looks at the Deal Type (this is a short list) on the Deal.
It then adds tag (same name as deal type) to all associated contacts that are linked to that deal.
I tried manipulating a function I found on the Community forums:
headermap = Map();
headermap.put("Authorization","xxxxxx");
mp = Map();
mp.put("tag_names",supplier);
response = invokeurl
[
type :POST
parameters:mp
headers:headermap
];
info response;
My Argument Mapping is below.
Function ArgumentsI'll save you a post and say I know that tags don't work in Sandbox. Thanks for any help/suggestions I can get.