Endpoint: /automation/v2/workflows/{workflowID}/enrollments/contacts/{email}
Some cases I am getting this response:
{ “status”: “error”, “message”: “com.hubspot.apicaller.exceptions.ApiErrorResponseException: Api[name=automationplatform, httpMethod=POST, subPath=/automationplatform/v1/enrollments/flow/enroll/from-classic] Failed to process your request. Error code was ‘412’. Error message was:\n{\“status\”:\“error\”,\“message\”:\“Unable to enroll object PortalFlowObject{portalId=, flowId=, objectTypeId=ObjectTypeId{legacyObjectType=CONTACT}, objectId=, flowObjectType=CONTACT} due to membership in unenrollment list UnenrollmentListEvaluationResult{status=MATCHES_UNENROLL, list=AssociatedListBase{portalId=, listId=, flowId=, listType=CLASSIC_GOAL_LIST}}\”,\“correlationId\”:\”\“,\“type\”:\“GOAL_LIST\”}”, “correlationId”: “”, “type”: “GOAL_LIST” }
What does this mean? I can’t find any information on it.
Endpoint: /automation/v2/workflows/{workflowID}/enrollments/contacts/{email}
In some cases I am getting this response:
{ “status”: “error”, “message”: “com.hubspot.apicaller.exceptions.ApiErrorResponseException: Api[name=automationplatform, httpMethod=POST, subPath=/automationplatform/v1/enrollments/flow/enroll/from-classic] Failed to process your request. Error code was ‘412’. Error message was:\n{\“status\”:\“error\”,\“message\”:\“Unable to enroll object PortalFlowObject{portalId=, flowId=, objectTypeId=ObjectTypeId{legacyObjectType=CONTACT}, objectId=, flowObjectType=CONTACT} due to membership in unenrollment list UnenrollmentListEvaluationResult{status=MATCHES_UNENROLL, list=AssociatedListBase{portalId=, listId=, flowId=, listType=CLASSIC_GOAL_LIST}}\”,\“correlationId\”:\”\“,\“type\”:\“GOAL_LIST\”}”, “correlationId”: “”, “type”: “GOAL_LIST” }
What does this mean? I can’t find any information on it.
Issue was that the goal in the workflow was already completed for the user I was trying to enroll. This code returned when I tried to add the client back into the work and they were instantly flagged as complete because of the goal set.