Troubleshooting¶
This document intends to help you find solutions to common errors that may occur when Lime CRM and Lime Field are integrated. A complete guide to troubleshooting the queueing systems used by CRM and Field are not a part of this document, even though this guide scratches a bit on the surface of these.
Before you start¶
- Ensure you are working in the right CRM database by logging out and then in again on the CRM side
- Ensure you are working in the right Lime Field installation by checking the URL and/or the name
in the title bar of the desktop application. Start over by navigating to
https://<field installation>.remotex.net
to be sure.
Symptom: Edits made in Lime Field are not showing up in Lime CRM¶
- Task: Check the log in Lime Field
- If there are no error messages
- Task: Check that the integration is configured and running
- Task: Check that the integration has the right subscriptions
- Check Queues on the Lime Field side on the dashing dashboards
- If the queue has stopped
- Check kibana for errors related to the queue
- If the queue hasn't stopped
- This means that the traffic is flowing through the system, double check logs, subscriptions and configuration.
- If the queue has stopped
- Try re-initialize subscriptions using Task: Re-register subscriptions
Symptom: Case type is reverted in Lime Field after synchronizing/reloading¶
- Cause: The chosen case type in Lime Field has no corresponding helpdesktype in the Lime CRM application
- Task: Verify case/helpdesk type mapping
Symptom: Edits made in Lime CRM are not showing up in Lime Field¶
- Task: Check the log in Lime Field
- If there are no error messages
Task: Verify case/helpdesk type mapping¶
- Go to
https://<field installation>.remotex.net/configurator2/#picklists/picklists/cases/types
- Open up the Helpdesk Type tab of the Lime CRM application
- Add the Lime Field ID column to the list of helpdesk types if not present in the view
- Verify that there exists exactly one helpdesk type record in Lime CRM for each case type in Lime Field
Task: Check the integration log¶
The log shown in the management app of Lime Field can tell, on a general level, when the integration have trouble updating data in either of the two systems.
Errors:
- Missing limeobject
- Value too long
- Related data does not exist
- Missing option key
- Internal error
- Missing entity
- Missing entity relation
- Duplicate hierarchy
- Unable to find resource
Where to find the log?¶
The log is found at:
https://<field installation>.remotex.net/management/#/integration/crm
Errors from CRM¶
Missing limeobject¶
Example:
GET CRM: resource/1002/ Field: 170824-0001
Causes:
- The Object has been deleted from CRM
- The value of the CRMSystemId attribute in Lime Field has been tampered with
- The CRM application has been restored from a backup that doesn't contain the referenced object
- More than one CRM application is connected to the same integration
Solution:
Manually update the entity in Lime Field and do one of the following:
- Unset the CRMSystemId attribute to have the integration create the missing object in Lime CRM
- Unset the CRMSystemId attribute and deactivate the entity in Lime Field to mark it as deleted in both systems
- Update the CRMSystemId attribute with the correct CRM object id to re-connect the object with the entity in Lime Field
Value too long¶
Example:
PUT CRM: resource/1029/ Field: email: value too long (valuetoolong)
Causes:
- The value stored in Lime Field was too long to fit the field in CRM
Solution:
- Make sure the field in CRM can store the required amount of data
Related data does not exist¶
Example:
POST CRM: Field: 18042500154 The workorder "1229" does not exist.
Causes:
A limeobject cannot be updated in CRM due to an invalid relation. The related entity in Lime Field references a limeobject that does not exists (the related entity has an invalid CRMSystemId).
Solution:
Either disconnect the relation (if possible) or fix the CRMSystemId for the related entity.
See also:
Missing option key¶
Example:
PUT CRM: workorder/1220/ Field: The option key System.Picklist.Workorder.Activity.belysning does not exist on OptionProperty activity.
Causes:
- Option field keys has been added to Lime Field without adding them to CRM
Solution:
- Add a new option item to the field in CRM with the missing key
- Update an existing option item in CRM with the missing key
Internal error¶
Example:
PUT CRM: helpdesk/1245/ Field: 180425-1012 INTERNAL SERVER ERROR
Causes:
- Some service in Lime CRM needs to be restarted
- A customization in the Lime CRM application is causing the Lime CRM REST API to fail
Solution:
- Restart CRM services
- Make contact with consultant responsible for customizations in the connected CRM application for further investigation
Unprocessable Entity¶
Example:
POST /v1/subscription/ 422 UNPROCESSABLE ENTITY Completed
Causes:
- Some lime type or event needed by the integration is missing in the CRM solution
Solution:
- Go to https://crmserver-url/crmapplication-name/api/v1/subscription/available/ and verify that the CRM solution has all required limetypes and events required by the integration (see config.md for more information)
- Create each missing limetype in the CRM solution
- Retry registering the webhooks
Errors from Lime Field¶
Missing entity¶
The limefieldid field in CRM has an invalid entity reference.
Example:
WorkOrder event from CRM UpsertCase, UpsertWorkOrder Target: workorders/180423-0950-1, Cannot find case for Case parameter value: cases/180423-0952-1
Causes:
- The data in the limefieldid field in CRM has been tampered with
- More than one CRM application is connected to the same integration
- The referenced entity has been deleted from Lime Field but the link still exists in CRM
Solution:
- Also delete the limeobject in CRM that has the invalid reference
- Unset the limefieldid field in CRM to have the integration create a new entity in Lime Field
- Find the correct entity in Lime Field and update the limefieldid field in CRM
Missing entity relation¶
Example:
object.update UpsertUnit Target: object:9208, Invalid hierarchy: property:1252
Causes:
- A related object in CRM does not yet exist in Lime Field
Solution:
- Touch the related object in CRM, and then the object with errors, to retry the operation
See also:
Duplicate hierarchy¶
Example:
property.update UpsertHierarchy, UpsertUnit, ClearDefaultResource Target: property:1588, Hierarchy title already exists: Hede 3:12 Target: property:1588, Invalid hierarchy: property:1588
Causes:
- The mapping of the Title attribute for a hierarchy in Lime Field is resulting in multiple hierarchies using the same title
- Someone has manually created an hierarchy in Lime Field that was meant to be created by the integration
Solution:
- Make sure the mapping used for the hierarchy title attribute doesn't result in duplicates
- Remove the manually created hierarchy from Lime Field and touch the limeobject to try again
Unable to find resource¶
Example:
property.update UpsertHierarchy, UpsertUnit, SetDefaultResource Target: property:1633, Unable to find resource: resource:1002
Causes:
- The resource related to a unit (default resource) in CRM is missing in Lime Field
See also:
Task: Check that the integration is configured and running¶
- Look up the kolli for the integration in the field-configurations repo
- Use the name of the virtual directory to find out the URL to the integration
- Navigate to the URL: https://integrationservernamehere/virtualdirectory/configuration/
- Make sure the returned response have no errors
Task: Check that the integration has the right subscriptions¶
Verify subscriptions in Lime Field¶
- Navigate to https://limefield-url/api/subscriptions
- Ensure you find a subscription pointing to the URL of the integration for both EntityAdd and EntityUpdate events.
The subscriptions should point to both
/limefield
and/limefieldfiles
Verify the subscriptions in Lime CRM¶
- Log in to the CRM web client at https://crmserver-url/client/
- Navigate to https://crmserver-url/crmapplication-name/api/v1/subscription/
- Make sure a subscription exists that targets the url of the integration
- Make sure the subscription contains the events of all used limetypes
Task: Restart the Lime Webhooks service¶
Important:
-
The service needs to be restarted when tables/fields have been modified using Lisa
-
Restart the windows service called 'Lime CRM Webhook Service'
- Check there are no errors in the most recent log at
C:\ProgramData\Lundalogik\LIME Pro Server\Lime CRM Webhook Service\logs
- Check that queues exist for the CRM application using the RabbitMQ UI at
http://server-name:15672/cli/
Task: Ensure the Lime Webhooks service has credentials added (if using Legacy version)¶
If you are using the legacy version of the webhooks serice, they need credentials. Enter the Limeservice credentials in here.
Task: Re-register subscriptions¶
- Go to the management app in Lime Field -> Integrations -> CRM
- Click the Install button
- Done!
Using the command line¶
Call the endpoint using your choice of command line shell
Powershell
(iwr -Uri https://customerfieldurl/crmservice/configuration/install -Method POST -Headers @{"Content-Length" = "0"} -Credential (get-credential)).Content
Curl
curl -X POST -H "Content-Length: 0" https://customerfieldurl/crmservice/configuration/install -u username:password
Make sure the output includes "IsSuccessful":true
Example output:
{
"IsSuccessful":true,
"FieldSuccessful":true,
"FieldSubscriptions":["subscriptions/EntityUpdate/a48d76b8-47b5-4cc6-8135-2e1380d92b8c","subscriptions/EntityAdd/2ee6fbbe-81a0-4214-aa37-9dbfa3c895f8","subscriptions/EntityUpdate/b2c2fb0a-a069-4e68-8132-7109ff62aa7b"],
"CrmSuccessful":true,
"CrmHookId":"773caa0f-1db4-4738-afd7-080c2935bd2f"
}
Note that the output contains references to the subscription IDs used in the Lime Field API and the RabbitMQ server in CRM. These can be used to find data in the Lime Field API, Kibana and the RabbitMQ UI.
Other known issues¶
Request rejected¶
Example:
Request Rejected
The requested URL was rejected. Please consult with your administrator.
Causes:
- The customers firewall classifies our request as malformed json when the payload contains non-printable ASCII characters
Solution:
- The customer has to add an exception to the URI
https://crmserver-url/crmapplication-name/api/
in the firewall
Notes: * If the customer is using BIG-IP the exception is made in the ASM module