Skip to main content

Attaching a Hook to a Thread

Every Hook that depends on previous stages in a Workflow must use the match_thread function. This is how the Hook matches the incoming information to a thread waiting in that Stage.

Consider a Workflow for contract signature with four stages:

  1. Fill Contract - filling the necessary information with a Form
  2. Send Contract - generating the document and sending it to the client
  3. Await Signature - awaiting for the document to be sent back
  4. Send Confirmation - notifying the people involved that the process has been completed

Contract Signing

After the Fill Contract and Send Contract stages, threads stay waiting in the Await Signature stage until the Hook acknowledges a contract has been signed to resume the process. To do so, use the match_thread function.

info

Don't forget to check out the SDK reference.