WEBContactRequestInsert

 

WEBContactRequestInsert

Initial Build 2008.01
xWeb Web Method
Response Type XML results

The WEBContactRequestInsert web method inserts a new Customer Request. A Customer Request is an inbound inquiry or request from a customer to the organization (i.e. the netFORUM client). Most websites might have a "Contact Us" page where a user can fill out a simple request, and the organization will then respond to the request later. The Customer Request feature can serve that role.

Customer Requests require at least six different codes to be set. If the situation needs a simple page where a user just fills out a single textarea, then your application can set any number of those six or more codes based on logic you determine, without user input.

Certain of these values, such as origin (cor_cro_code), priority (cor_crp_code) and status (crp_crs_code) are internal codes that shouldn't be presented to an end user. Therefore, you'll need to set those values behind-the-scenes.

The only codes you might want to prompt end users to select are the Activity Code and the Reason Code(s) for each parent Activity Code. You might want to have a pair of dropdownlists, and when the user selects an Activity Code, populate the Reason Code(s) for the selected Activity Code.

Parameters

The request contains the following parameters:

Name Type Occurs Description
oFacadeObject ContactRequestType 1..1  

In the ContactRequestType, in the Contact_Request element, are the following elements:

       
Name Description Datatype Notes 
cor_key Primary Key string (in guid format) Primary Key. Do not set this value; leave it null or do not include the element in the request. This value will be set automatically by netFORUM.
cor_cst_key Customer Key string (in guid format) Customer Key of the individual.
cor_cro_code Origin Code string Origin Code. List of available codes can be retrieved by calling WEBContactRequestGetOriginations.
cor_rat_code Activity Code string Activity Code. The List of available codes can be retrieved by calling WEBContactRequestGetRequestTypeReasons.
cor_crr_code Reason Code string Reason Code. Reason codes are subcodes of Activity Codes. To get a list of Reason Codes for a particular Activity Code, call WEBContactRequestGetRequestTypeReasons and filter the results that are returned by selecting only those whose crr_rat_code match that of the selected Reason code (rat_code).
cor_crp_code Priority Code string Priority code (typically Low, Medium, High, Critical). To get a list of priority codes, call WEBContactRequestGetPriorities.
cor_crs_code Status Code string To get a list of status codes, call WEBContactRequestGetStatuses. You'll probably have one "default" status for each netFORUM site. That status will likely be Pending or Open or something similar. Work with your client to know which status should be the default. Then, create a configuration variable for this value so you don't need to call this web method unnecessarily.
cor_summary Summary string Summary for the request.. 50-character maxium.
cor_detail Detail string Detail of the request. Unlimited length.
cor_email_notif_flag Email Notify Flag bit Set to 1 if the customer should get email notifications.
cor_fax_notif_flag Fax Notify Flag bit Set to 1 if the customer should get fax notification (no longer supported). Leave null or don't include element in request.
cor_date_completed Date Completed string (in DateTime format) Completed Date. Leave null or don't include element in the request since the request presumably should be starting out in pending/open status.
cor_notif_sent_date Notification Sent Date string (in DateTime format) Leave blank or don't include element in the request.
cor_auto_assign_flag Auto-Assign Flag bit Generally you should set this value to 1 so that Assignments are automatically added to staff people based on the selected Activity Code. The underlying setup for this is one in NetForum as described in Managing Activity Request Roles .
cor_add_date Add Date string (in DateTime format) Leave blank or don't include element in the request; this value will get set automatically by NetForum.
cor_add_user Add User string Leave blank or don't include element in the request; this value will get set automatically by NetForum.
cor_change_date Change Date string (in DateTime format) Leave blank or don't include element in the request; this value will get set automatically by NetForum.
cor_change_user Change User string Leave blank or don't include element in the request; this value will get set automatically by NetForum.
cor_delete_flag Delete Flag string Leave blank or don't include element in the request; this value will get set automatically by NetForum.
cor_entity_key Entity Key string (in guid format) Leave blank or don't include element in the request; this value will get set automatically by NetForum.
cor_ixo_org_cst_key Organization Customer Key string (in guid format) Customer Key of Organization, if any. This can associate the request with an individual's organization.
cor_key_ext Extender Key string (in guid format) Leave blank or don't include element in the request; this value will get set automatically by NetForum.
cor_recno Record Number string Leave blank or don't include element in the request; this value will get set automatically by NetForum.
cor_sfo_key Sales Opportunity Key string (in guid format) Leave blank or don't include element in the request unless you are associating this request with a Sales Opportunity, which is unlikely.
cor_cct_key Correspendence Template Key string (in guid format) Not use; leave blank or don't include element in the request.
cor_number Number string Leave blank or don't include element in the request; this value will get set automatically by NetForum.

 

Response

Boolean:

  • True if the insert succeeds.
  • False or an xWeb Exception if the insert fails.

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>************************</ns:Token>
</ns:AuthorizationToken>
</soapenv:Header>
<soapenv:Body>
<ns:WEBContactRequestInsert>
<ns:oFacadeObject>
<ns:Contact_Request>
<ns:cor_cst_key>3ce2c530-2a15-41cf-b2db-ab8c9b326823</ns:cor_cst_key>
<ns:cor_cro_code>Web</ns:cor_cro_code>
<ns:cor_rat_code>Membership</ns:cor_rat_code>
<ns:cor_crr_code>Membership Inquiry</ns:cor_crr_code>
<ns:cor_crp_code>Medium</ns:cor_crp_code>
<ns:cor_crs_code>Open</ns:cor_crs_code>
<ns:cor_summary>Summary of Request</ns:cor_summary>
<ns:cor_detail>Detail of request</ns:cor_detail>
<ns:cor_email_notif_flag>1</ns:cor_email_notif_flag>
<ns:cor_fax_notif_flag>0</ns:cor_fax_notif_flag>
<ns:cor_date_completed></ns:cor_date_completed>
<ns:cor_notif_sent_date></ns:cor_notif_sent_date>
<ns:cor_auto_assign_flag>1</ns:cor_auto_assign_flag>
<ns:cor_add_date></ns:cor_add_date>
<ns:cor_add_user></ns:cor_add_user>
<ns:cor_change_date></ns:cor_change_date>
<ns:cor_change_user></ns:cor_change_user>
<ns:cor_delete_flag></ns:cor_delete_flag>
<ns:cor_entity_key></ns:cor_entity_key>
<ns:cor_ixo_org_cst_key>c08611b3-8d26-41a8-bdaf-46ec028f0c87</ns:cor_ixo_org_cst_key>
<ns:cor_key_ext></ns:cor_key_ext>
<ns:cor_recno></ns:cor_recno>
<ns:cor_sfo_key></ns:cor_sfo_key>
<ns:cor_cct_key></ns:cor_cct_key>
<ns:cor_number></ns:cor_number>
</ns:Contact_Request>
</ns:oFacadeObject>
</ns:WEBContactRequestInsert>
</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>6e9b1f2e-a3ab-4a8f-8590-534c9ff54406</Token>
</AuthorizationToken>
</soap:Header>
<soap:Body>
<WEBContactRequestInsertResponse xmlns="http://www.avectra.com/2005/">
<WEBContactRequestInsertResult>true</WEBContactRequestInsertResult>
</WEBContactRequestInsertResponse>
</soap:Body>
</soap:Envelope>

 

JSON Method

POST /xWeb/JSON/WEBContactRequestInsert


DATA: JSON
{
    "WEBContactRequestInsert": {
        "oFacadeObject": {
            "Contact_Request": {
                "cor_cst_key": "{{indCstKeySample}}",
                "cor_cro_code": "{{croCodeContactRequestOrigin}}",
                "cor_rat_code": "{{ratCodeContactRequestType}}",
                "cor_crr_code": "{{crrCodeContactRequestTypeReason}}",
                "cor_crp_code": "{{crpCodeContactRequestPriority}}",
                "cor_crs_code": "{{crsCodeContactRequestStatus}}",
                "cor_summary": "{{corSummaryContactRequestInsert}}",
                "cor_detail": "{{corDetailContactRequestInsert}}",
                "cor_email_notif_flag": "1",
                "cor_fax_notif_flag": "0",
                "cor_auto_assign_flag": "0"
            }
        }
    }
}

SAMPLE RESULT
HTTP STATUS: 200
DATA: JSON
true

 

Recommendations

Many of the codes have values that are static and almost never change. Therefore, in order to improve the speed of your application, you should cache these values. For codes that you don't prompt the user, you can safely create a constant configuration value for these since once the value is known for a particular netFORUM site, it will likely never change. These include:

  • Origin - will change rarely
  • Priority - will change rarely
  • Status - will change rarely
  • Activity Code - new codes may be added from time to time
  • Activity Reason - new codes may be added from time to time
Was this article helpful?
0 out of 0 found this helpful