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 should be able to update the properties of a person #70

Open
Tracked by #58
tomtitherington opened this issue Feb 25, 2024 · 0 comments
Open
Tracked by #58
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: improvment This will improve a part of the product or codebase.

Comments

@tomtitherington
Copy link
Contributor

tomtitherington commented Feb 25, 2024

Background & Context*

Once a valid Websocket connection has been established, the client should be able to provide person properties which will update the Person.data field.

Current Behaviour

A client can call the identify action on the socket with person data and this will return the state of all flows for the person identified.

Goal*

Implementation Details*

  • List any technical requirements or constraints. Please list them as a task list or bullets.
  • Use code snippets where applicable.

Modify the response to allow for an extra flag, indicating the type of response that the server needs to provide.

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

// Example response include_flows == True
{
  "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)"
      }
    ]
  }
}

// Example response include_flows == False
{
  "request_id": 1519211809934,
  "errors": [],
  "status": 200,
  "data": {}
}

Acceptance Criteria*

Test cases that

  • Asserts when the include_flows flag is included and set to True then the response should be as outlined in the example above.
  • Asserts when the include_flows flag is included and set to False then the response should be as outlined in the example above.
  • Asserts when the include_flows flag is omitted then the response should be as outlined in the example above.

*required field.

This was referenced Feb 25, 2024
@tomtitherington tomtitherington added blocked: conflict/dependency Something else is blocking this. scope: backend Work involving the backend / Django REST project. scope: tests Work relating to tests. type: improvment This will improve a part of the product or codebase. size: hours This should take less than a day. 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: improvment This will improve a part of the product or codebase.
Projects
Status: 🔖 Planned
Development

No branches or pull requests

1 participant