lennmedia / crisp-whmcs

Add Crisp to your WHMCS installation and chat live with your customers from your website.
GNU General Public License v3.0
2 stars 3 forks source link

Client ID not showing. #5

Closed webhostsg closed 1 year ago

webhostsg commented 1 year ago

Hi, I've just signed up for Crisp and install this plugin. Have sync'ed all the clients. But when I test chat, the client ID is now showing. When I click on View Account, WHMCS opens in new tab, but it shows client not found. View products work, but View Account, View Tickets, and Login as client does not work.

I'm on WHMCS 8.7.3, PHP 8.1 and ionCube 12

UPDATE: Upon further checking, View products does not work too...

CleanShot 2023-06-26 at 01 36 35 CleanShot 2023-06-26 at 01 37 08

tope-pd commented 1 year ago

I am experiencing the same issue. I noticed the ID of the client is not passed in the URL.

P.S: Is it possible to sync only active accounts from WHMCS to Crisp?

webhostsg commented 1 year ago

I am experiencing the same issue. I noticed the ID of the client is not passed in the URL.

P.S: Is it possible to sync only active accounts from WHMCS to Crisp?

It does not show the client ID for all my clients.. Does it show on yours? CleanShot 2023-06-27 at 18 26 54

tope-pd commented 1 year ago

I am experiencing the same issue. I noticed the ID of the client is not passed in the URL. P.S: Is it possible to sync only active accounts from WHMCS to Crisp?

It does not show the client ID for all my clients.. Does it show on yours? CleanShot 2023-06-27 at 18 26 54

No, it doesn't show as well. I see the same thing as the screenshot

lennarttd commented 1 year ago

Thank you for letting us know about this issue. We’re on to it and investigating why this happens. Please know the widget only works for Client IDs and not for User IDs (as one User can be assigned to multiple Clients).

We’re currently syncing all clients, too make sure the Crisp CRM is always consistent with the WHMCS database. When you have a lot of Clients this might be unnecessary. We will add an option to only sync Active Clients in an upcoming release. @tope-pd How would you like to treat already synced clients that get to an Inactive state?

tope-pd commented 1 year ago

Hi @lennarttd,

Thank you so much for your response. I think allowing the widget to work for client IDs only is fine if you sync only client IDs and not user IDs. You also add a segment to users and clients, so that works fine as one can easily differentiate between the two.

Yes, we do have a lot of clients, which is why it is a concern for us. I think using the custom data status can help. That will allow us to filter the data of inactive clients. Will that be fine or do you use that for something else?

lennarttd commented 1 year ago

We're trying to reproduce the issue. Do the synced contacts contain any custom data like "client_id" or "status"?

@tope-pd In Crisp CRM under "Contacts" you can create a filter based on "Contact custom data", there you might be able to filter on the "status" Active. We'll include an option to only sync active clients in the upcoming release. Thanks for the suggestion!

webhostsg commented 1 year ago

We're trying to reproduce the issue. Do the synced contacts contain any custom data like "client_id" or "status"?

@tope-pd In Crisp CRM under "Contacts" you can create a filter based on "Contact custom data", there you might be able to filter on the "status" Active. We'll include an option to only sync active clients in the upcoming release. Thanks for the suggestion!

custom data in WHMCS or Crisp?

Crisp screenshot:

CleanShot 2023-06-28 at 18 25 24 In WHMCS the only think that i can think of at the moment is: CleanShot 2023-06-28 at 18 27 17

tope-pd commented 1 year ago

@webhostsg , it will be custom data on Crisp. This will allow you to filter clients that are inactive and you can delete them. They can't use custom data on WHMCS, as it will have to be created.

@lennarttd will you be setting inactive client status as inactive? This will allow us filter these clients easily

webhostsg commented 1 year ago

@tope-pd I also notice an issue when a client is not logged in to WHMCS and initiate a chat and Crisp ask for email address. It will create another client in CRM with a + in front of the email. Hence, creating a duplicate entry in CRM that cannot be merged automatically. See screenshot: CleanShot 2023-07-02 at 14 36 38 CleanShot 2023-07-02 at 14 36 50

tope-pd commented 1 year ago

@webhostsg I noticed the +account creation too. I wasn't able to figure out what was causing it. I did notice it as well. I created a filter to delete those accounts, but it is a hassle.

Thanks for figuring it out.

lennarttd commented 1 year ago

Please see #6

Regarding the client ID, we have this under investigation with the Crisp team and hope to update you shortly.

tope-pd commented 1 year ago

Thank you @lennarttd

lennarttd commented 1 year ago

We have just pushed an update on Crisp so the widget is only shown when there is a client ID. This should avoid confusion when there is no client ID associated with the user. Reload/restart Crisp to see the changes.

webhostsg commented 1 year ago

Reloaded, nothing now CleanShot 2023-07-04 at 22 40 37

tope-pd commented 1 year ago

Hi @lennarttd ,

Reloaded several times. But nothing shows.

lennarttd commented 1 year ago

@webhostsg That might be correct when this is a user and not a client. Are you sure this is a client instead of an user?

webhostsg commented 1 year ago

@lennarttd CleanShot 2023-07-04 at 22 45 11 CleanShot 2023-07-04 at 22 45 54

lennarttd commented 1 year ago

Then it should show. We've been able to reproduce the issue after truncating the data on our test environment and are developing a fix as we speak. Hang in there! We hope to release the fix by the end of tomorrow.

tope-pd commented 1 year ago

Thank you @lennarttd

lennarttd commented 1 year ago

We've fixed this issue in v2.13 ready for download now. Please make sure to perform a full resync from the Addon page in WHMCS to make sure all client_id's are synced.