Work Market Developer Portal

WorkMarket Developer Portal

We are building the modern work market,
a frictionless exchange between businesses and workers.
See API Docs

    

Relay Sequence

It seems like most of the business processes in our jobs require some type of actions in a sequence - we plan, review, execute, analyze and continue the procedure again. Much of your time is probably spent making sure that all of these events occur in order and are confirmed throughout. The Relay Sequence features work as a project manager for you, making sure that all of the actions are executed in the appropriate order and are reported to you if there is a problem.

Contact Us

Feel free to reach out to Work Market's Solutions Engineering team at solutions@workmarket.com. Someone from the team will contact you within 48 hours.

How does it work?

With a basic webhook, you can target an external system with a URL, HTTP method, headers and (if POST) a body payload. But unless the receiving API is programmed to take that one request and perform multiple tasks with it, this will only accomplish one thing.

Before the Rules Engine, the answer was to create multiple webhooks which would fire on the same event. The problem is that these always execute in parallel. What if you need Task A to happen before Task B?

The following code will send an email saying “Assignment X has been created” to james and mary@example.com, then send the assignment to a talent pool, and, finally, email james and mary again saying “Assignment X has been sent”.

Event: On created
POST https://relay.assignmentportal.com/co/112233/relay
Content-type: application/json

[{
    "action": "sendEmails",
    "relayId": "56219467",
    "relayAccessToken": "yGBau6NVNe3hThTB",
    "emails": ["james@example.com", "mary@example.com"],
    "subject": "Assignment created!",
    "body": "https://www.workmarket.com/assignments/details/${assignment_id}",
    "bodyHtml": "<a href='https://www.workmarket.com/assignments/details/${assignment_id}'>https://www.workmarket.com/assignments/details/${assignment_id}</a>",
    "wmAssignmentId": "${assignment_id}"
},{
    "action": "wm_sendAssignment",
    "relayId": "12345678",
    "relayAccessToken": "83WNVNe3hTBh4uRA",
    "wmAssignmentId": "${assignment_id}",
    "groupId": "8765"
}, {
    "action": "sendEmails",
    "relayId": "56219467",
    "relayAccessToken": "yGBau6NVNe3hThTB",
    "emails": ["james@example.com", "mary@example.com"],
    "subject": "Assignment sent to group 8765",
    "body": "https://www.workmarket.com/assignments/details/${assignment_id}",
    "bodyHtml": "<a href='https://www.workmarket.com/assignments/details/${assignment_id}'>https://www.workmarket.com/assignments/details/${assignment_id}</a>",
    "wmAssignmentId": "${assignment_id}"
}]