Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A client can identify a person and retrieve their flows #66

Open
Tracked by #58
tomtitherington opened this issue Feb 25, 2024 · 0 comments
Open
Tracked by #58

A client can identify a person and retrieve their flows #66

tomtitherington opened this issue Feb 25, 2024 · 0 comments
Labels
blocked: conflict/dependency Something else is blocking this. scope: backend Work involving the backend / Django REST project. scope: tests Work relating to tests. size: hours This should take less than a day. type: feature A piece of functionality of the product.

Comments

@tomtitherington
Copy link
Contributor

tomtitherington commented Feb 25, 2024

Background & Context*

Once a client has a valid Websocket connection to the server, they should be able to retrieve details of a person and the state of their flows.

Goal*

  • A client should be able to specify that they want to identify the specified person using the person key/email.
  • A client should be able to provide person data that will update and override the Person.data field with the JSON data provided (if it is valid).

Implementation Details*

Calls to this endpoint should be idempotent. Calling this endpoint multiple times with the same parameters should always result in the same outcome.

// Example request
{
    "action": "identify",
    "request_id" : Date.now(),
    "data": {
        "person_key": "string",
        "properties": "object"
    }
}

// Example response from "identify" action
{
  "request_id": 1519211809934,
  "errors": [],
  "status": 200,
  "data": {
    "person_id": "string",
    "flows": [
      {
        "flow_instance_id": "string",
        "flow_schema_identifier": "string",
        "state": "string (active, inactive, completed, exited)"
      }
    ]
  }
}

Acceptance Criteria*

Test cases that

  • Assert that given a valid Person.id the server will respond with a 200 / status OK.
  • Assert that given a valid Person.id the server will provide a JSON response in the format and structure defined above.
  • Assert that an invalid Person.id will indicate that the Person.id was invalid or general 404.
  • Assert that JSON data that does not adhere to the structure defined in Person.schema will return an invalid error and unsuccessful response.

Dependencies

Blockers:

Additional Details

Subscribing to flow / step state changes are not covered by this issue. A client will need to send another request type to subscribe to these changes.

*required field.

@tomtitherington tomtitherington added scope: backend Work involving the backend / Django REST project. scope: tests Work relating to tests. size: hours This should take less than a day. blocked: conflict/dependency Something else is blocking this. type: feature A piece of functionality of the product. labels Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: conflict/dependency Something else is blocking this. scope: backend Work involving the backend / Django REST project. scope: tests Work relating to tests. size: hours This should take less than a day. type: feature A piece of functionality of the product.
Projects
Status: 🔖 Planned
Development

No branches or pull requests

1 participant