Solved

WorkItems from API with client tasks that send 0 days after start date



Show first post

29 replies

Userlevel 7
Badge +19

I’m mostly self-taught as well. :) Though, I have benefited from the W3 schools course.

Are you able to scrub your python of all tokens and other private data and share it here? I’ll test it out myself and play around with it and post back my results. 

I ran into an issue before with contact types where I wasn’t capitalizing them correctly and was getting all kinds of errors. 

Userlevel 2
Badge +1

the GET is an excellent idea, thanks @max!

 

I tried two experiments, one before the client tasks had been sent and one after:

 

both returned a json object with None as its ClientTaskRecipient field

 

And per @Rowan’s super helpful answer, I just passed “Contact” into the LinkType field and got two different results depending on how I ran it through the requests library (with/without an ‘application/json’ in the header):

 

a new workItem with no recipient:

 

or a 400:

 

{'error': {'code': '4005', 'message': 'Required payload data is missing: workItem'}}

 

I am a self-taught python developer, I apologize; I am baffled!

The link type is the contact type of the recipient. The main values would be 'Contact' and 'Organization'.

 

"ClientTaskRecipient":

{
  "RecipientKey": "",
  "LinkType": "Organization", 
  "EmailAddress": ""},

 

RecipientKey = contact key

LinkType = Organization/Contact

EmailAddress = email address

 

It should be noted that client tasks will send automatically when using this option.

Userlevel 7
Badge +19

@Rowanthis sounds like something you and I talked about.

I have not messed with client task emails in the API, so I’m curious to see how others implement it.

@Mike Richardsonhave you tried pulling the information with a GET request to see what’s populated in the fields of an existing work item that’s been manually setup to be what you want to achieve with the API?

 

[EDIT]

Upon further reading of the docs, it doesn’t seem like there’s a way to GET this kind of information and the dummy information in Postman isn’t helpful.

Reply