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

feat: subscribe to initial queue position in botonic #2975

Open
wants to merge 3 commits into
base: master-lts
Choose a base branch
from

Conversation

vanbasten17
Copy link
Contributor

Description

  • Allow subscribe to new helpdesk event Initial Queue Position.

To document / Usage example

// routes

export const routes = (request) => {
  console.log("REQUEST", request);
  return [
    {
      path: "initial_queue_position",
      type: "case_event_initial_queue_position",
      action: InitialQueuePosition,
    },
    { path: "agent", text: /^handoff$/i, action: TransferAgent },
    { path: "thanks-for-contacting", action: Thanks },
  ];
};

// action

export default class extends React.Component {
  static async botonicInit(request) {
    const input = request.input;
    console.log("INPUT", input);
    return {
      input,
    };
  }
  render() {
    return (
      <Text>
        QUEUE POSITION: {"\n"}
        Current: {this.props.input.current_queue_position} {"\n"}
        Total waiting: {this.props.input.total_queue_waiting_cases_number}
      </Text>
    );
  }
}

Testing

The pull request...

  • has unit tests
  • has integration tests
  • doesn't need tests because... [provide a description]

@pull-request-size pull-request-size bot added size/M and removed size/S labels Jan 31, 2025
Comment on lines +87 to +89
if (request.input.type === INPUT.EVENT_INITIAL_QUEUE_POSITION) {
// TODO: Think how we will get this content
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we not gonna implement this now?

Copy link
Contributor Author

@vanbasten17 vanbasten17 Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I'm leaving it here after I can try with the whole integration backend/fbuilder app and this, we ara going to implement it with @Iru89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants