Test Basic + Detailed Workflow
  • 09 Nov 2022
  • 6 Minutes To Read
  • PDF

Test Basic + Detailed Workflow

  • PDF

REQUIRED USER ROLE
Developer or Administrator 

Use the Basic + Detailed Workflow debugger tool to understand what happens when Agents manually link a Customer to an external system. U sing this tool, you can look up specific Customer Profiles to test, check for errors, view custom attributes, show query attributes, and more.

Before you start

Before you use the Basic + Detailed Workflow debugger tool, we recommend you first review the following:

  • Users who only have the Developer role cannot create or search Customer Profiles. Assign either the Task User with the Developer role to inherit this permission.
  • Review What is the Lookup Adapter Debugger for information on when to use the debugger, access requirements, and more.
  • See the Lookup Adapter Basic Search FAQs for common issues experienced with Basic Search.

How to use the debugger

  1. Click the menu icon on the top left corner of the screen.
  2. Click Settings.
  3. Under the App Developer Tools category, click Lookup Adapter Debugger
  4. From the Lookup Adapter Debugger page, under Basic + Detailed Workflow, click Test Workflow.

Here, you can search and detect issues that may prevent manually linking a Customer to an external system.

Search for a Customer

First, enter the Customer's email address and/or phone number to find them in Gladly.

  1. Enter the Customer's email address and/or phone number (country code + area code + phone number) in the Search for Customer in Gladlysection. This helps search and ensure the Customer exists in Gladly.
    • If you enter both the Customer's email address and phone number when searching, Gladly will attempt first to find the Customer by email, then by phone, then fail if the Customer can't be found.
  2. From the Debug Lookup Adapter section, select the Lookup Adapter (e.g., Shopify, a custom Lookup Adapter) you want to search. 
    • Depending on the Lookup Adapter selected, other lookup fields may appear specific to each Lookup Adapter which can be used as additional search attributes to test. For example, you can enter the Customer's email address as a query to test the Lookup Adapter.
      • Attributes (and the labels) that appear depend on the Search Query Attributes configured. For example, if in your Custom Lookup Adapter Search Query Attribute, the attribute/label shows searchLoyalty / Loyalty Number and searchMemberID / Member ID, then the additional attributes that appear in the Debug Lookup Adapter section search are Loyalty Number and Member ID.
  3. Click Test.


What happens next depends on whether a Customer is matching your search.

Timed out

Lookup Adapter search requests times out in 15 seconds if it receives no response from your external system. Possible causes include slow internet connection or there's a large payload. If you continue to experience timeout issues, there might  be something improperly configured with their Lookup Adapter preventing the search to complete.

Customer not found

If the Customer is not found in Gladly using the email address you entered, the error "Customer not found in Gladly. Please try again with a different email." and a toast notification indicating "There was an error fetching debug data." appears. Check to ensure the attribute you entered is correct, and try again.

If the Customer is not in Gladly, you can create a new Customer Profile and try searching again. Note that this requires having additional permissions through another role beyond Developer.

Customer found

Gladly tests the Basic Search Workflow and provides results if a matching Customer is found based on the search attributes you used for the query.

  1. You'll see the following if a Customer is found.
    • [A] – Shows the parameters (attributes) used to query the Customer. Click Expand the request to see the full request payload sent to the Lookup Adapter.
    • [B] – Click Expand the response to see the detailed response from the Lookup Adapter along with any errors found.
    • [C] – Select the Customer you want to continue testing.
  2. From [C], select the Customer to continue testing, then click Continue.
  3. Gladly proceeds to test the Detailed workflow for the Customer selected and provides results.

Next, check to see if there are errors found or not.

Check for errors

No errors found

If no errors are found, this confirms that the Lookup Adapter can find the Customer attributes.

Errors found

If there are errors, the tool provides which query parameters were used to search, along with attributes that are not matching that could be causing the error.

  1. You'll see the following if an error is found.
    • [A] – Shows the query parameters used to create a Detailed lookup request. Click Expand the request to see the full request payload sent to the Lookup Adapter.
    • [B]  Displays errors encountered with the Detailed Lookup. These are attributes configured in the Lookup Adapter used to search and link to custom attributes in your external system. Use this information to troubleshoot if you have issues manually linking a Customer Profile from Gladly. Click Expand the request to see the full response payload returned from the Lookup Adapter.

Common errors and suggested actions

Below are common errors that may appear and suggested steps you can take to fix the error.

An unexpected error occurred

What you should do:

  • This means that we encountered an unexpected error with processing the Lookup Adapter response. Make sure that custom attribute values are sent as strings. For example, make sure you’re sending:

ExternalCustomerId is missing from result %d. This must be included in each result.

What you should do:

  • Note that this warning could mean that the attribute is coming from a different Lookup Adapter. However, if you were expecting this custom attribute to be updated from this Lookup Adapter, expand the response to check for spelling mistakes and update your Lookup Adapter to make sure you are sending the attribute.

The results array should be the first element in the JSON. Expand the response to verify the structure error

What you should do:

  • Occurs during any lookup where the response does not contain an array of results, with results being the only key in the response. Make sure your response is structured correctly. All of your results should be returned in an array (even if only one match is returned). For example, the structure should look like:
     

The email field must be plural.

What you should do:

  • Validate that the email field in your adapter is labeled emails (plural).

Custom attribute object must be a set of single-level-key-value pairs.

What you should do:

  • Make sure the custom attribute object is using the correct format (ex. an array). 

Unreadable JSON.

What you should do:

  • Validate that you are sending us valid JSON.

Custom attribute X is not configured in the Profile but is included in the response.

What you should do:

  • The custom attribute is sent from your Lookup Adapter but won’t be displayed in the Customer Profile because it is not configured in Gladly. Use the Custom Attributes tool to confirm. To add missing attributes, contact Gladly Support.
  • Make sure to double-check the spelling of the custom attribute in the configuration and in your Lookup Adapter response.

Customer not found in Gladly. Please try again with a different email.

What you should do:

  • Try again with a different email for a Customer that does exist.
  • Create a Customer Profile in Gladly for the email you are trying to use.

Customer attribute X is displayed in the Profile but is not in the response. This attribute will not be updated when data is refreshed from this adapter.

What you should do:

  • Note that this warning could mean that the attribute is coming from a different Lookup Adapter. However, if you were expecting this custom attribute to be updated from this Lookup Adapter, expand the response to check for spelling mistakes and update your Lookup Adapter to make sure you are sending the attribute.

Custom attribute X is invalid. Custom attributes must be sent as strings.

What you should do:

  • All custom attribute values should be sent as strings. For example, make sure you’re sending:

%d results returned. Detailed Lookup allows only one result.

What you should do:

  • For lookupLevel: DETAILED, there should only be one result returned from your Lookup Adapter. Update your Lookup Adapter.

The response must return an array of JSON objects.

What you should do:

  • Validate your results array only contains JSON responses. Results should return an empty array if no Customer data is returned from the lookup results:[]}.

Was this article helpful?