WEBWebUserFindOrganizationsByDomain

 
 

WEBWebUserFindOrganizationsByDomain

The WEBWebUserFindOrganizationsByDomain web method can be used to find any organization with a specific domain in their URL address(es). The method will return a list of any organizations whose URL contains the domain specified in the search parameter.

This method can be used as part of the process for adding a new customer in eWeb to allow the user to link themselves to an organization with a similar domain.

Obviously, personal email addresses with common domains (gmail, yahoo, hotmail, aol, msn, etc.) will not work well with this web method as the method does NOT try to filter out these consumer-oriented domains. Therefore be sure to let users know that they should enter their business/company address and not their personal address.

The parameter domainToMatch should contain all or part of the domain to search. Most commonly, this method will be used to search the domain portion of an email address. For example, if a user enters their email address of first.last@somewhere.com, then you would provide somewhere.com as the parameter. The method would return a list of any organizations whose domain includes somewhere.com preceded by the period character (.) or the forward slash character (/) and with a wildcard character at the end. Any of these would be a successful match with somewhere.com:

  • http://www.somewhere.com
  • www.somewhere.com
  • http://www.somewhere.com/default.htm
  • http://global.somewhere.com
  • global.somewhere.com
  • http://somewhere.com

These URLs would not match because they are not preceded by a period or forward slash:

  • http://www.ILiveSomewhere.com
  • somewhere.com

Parameters

The request contains the following parameters:

Name Type Occurs Description
domainToMatch string 1..1 The domain to search, e.g. avectra.com.

 

Response

XML Results. The results contain the following fields:

Name Description Datatype Notes
cst_key Customer Key string (in guid format) The Customer Key of the matched organization.
cst_sort_name_dn Sort Name string The organization's Sort Name.

 

Sample Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.avectra.com/2005/">
<soapenv:Header>
<ns:AuthorizationToken>
<ns:Token>2306bae2-4f6f-499c-8b8b-daffb79abb9b</ns:Token>
</ns:AuthorizationToken>
</soapenv:Header>
<soapenv:Body>
<ns:WEBWebUserFindOrganizationsByDomain>
<ns:domainToMatch>avectra.com</ns:domainToMatch>
</ns:WEBWebUserFindOrganizationsByDomain>
</soapenv:Body>
</soapenv:Envelope>

Sample Response

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<AuthorizationToken xmlns="http://www.avectra.com/2005/">
<Token>2306bae2-4f6f-499c-8b8b-daffb79abb9b</Token>
</AuthorizationToken>
</soap:Header>
<soap:Body>
<WEBWebUserFindOrganizationsByDomainResponse xmlns="http://www.avectra.com/2005/">
<WEBWebUserFindOrganizationsByDomainResult>
<Results recordReturn="2">
<Result>
<cst_key>dfffe73c-8acb-4dfd-b4b8-0784804f60fa</cst_key>
<cst_sort_name_dn>OLB Test Org 01</cst_sort_name_dn>
</Result>
<Result>
<cst_key>1f5acff2-9a7b-49f6-b068-69394af53828</cst_key>
<cst_sort_name_dn>Avectra</cst_sort_name_dn>
</Result>
</Results>
</WEBWebUserFindOrganizationsByDomainResult>
</WEBWebUserFindOrganizationsByDomainResponse>
</soap:Body>
</soap:Envelope>

 

JSON Method

POST /xWeb/JSON/WEBWebUserFindOrganizationsByDomain


DATA: JSON
{
    "WEBWebUserFindOrganizationsByDomain": {
        "domainToMatch": "{{domainNameWEBWebUserFindOrganizationsByDomain}}"
    }
}

SAMPLE RESULT
HTTP STATUS: 200
DATA: JSON
{
    "Results": {
        "@recordReturn": "2",
        "Result": [
            {
                "cst_key": "0b1089bc-6dce-485d-a7ba-f6cc7573434a",
                "cst_sort_name_dn": "Muller Corp"
            },
            {
                "cst_key": "b4299b1a-bcf9-48c2-b9b3-355dca30da60",
                "cst_sort_name_dn": "Fritsch Corp"
            }
        ]
    }
}

 

Technical Notes

This web method uses a stored procedure to return the results. By default, the SP is co_organization_select_by_domain. You may optionally provide your own custom SP by entering the name of the SP in the system option CustomOrganizationDomainMatchSP. As long as the SP is coded to accept a single parameter that the method will pass, then you can use your own search logic and even return different fields in the custom SP. You are advised to return the same fields as the default to ensure that any current uses of the method are not broken.

Was this article helpful?
0 out of 0 found this helpful