Udesk Feedback Tags
Udesk feedback tags are suitable for embedding in third-party systems, where third-party systems can add parameters to the feedback tags submission interface to modify/add customer and generate ticket information.
Basic Usage
Embedded Code Example
<body>
<!-- Web page content. Please copy the specific code from the channel management feedback tag section in the management center. -->
<script src="xxxx://xxxx.xxx.cn/im_client/js/udesk_feedback.js"></script>
<style type="text/css" media="screen, projection">
@import url(xxxx://xxxx.xxx.cn/im_client/css/udesk_feedback.css);
</style>
<script type="text/javascript">
if ("undefined" !== typeof(UdeskFeedback)) {
UdeskFeedback.init({
url: "xxxx://xxxx.xxxx.cn",
mode: "knowledge_search",
color: "rgb(175, 56, 56)",
title: "Feedback Tags",
position: "right",
"u_customer_token": "abcdefghijklmn",
"u_nick_name": "Customer Name Tom",
"u_email": "test@udesk.cn",
"u_cellphone": "187xxxxxxxx",
"u_organization": "Udesk",
"u_description": "Simple description",
"u_customer_tags": "vip",
"u_owner_id": "3",
"u_owner_group_id": "62",
"u_TextField_xxx": "",
"u_SelectField_xx": "",
"u_subject": "Feedback Subject",
"u_content": "Feedback Content",
"u_status_id": "3",
"u_priority_id": "2",
"u_company_tags": "",
"u_nonce":"694db2645b3f69a8",
"u_signature":"315345C77C73A128CF9850EAD777F7A71D423A36",
"u_timestamp":"1465878579000",
"u_email":"feedback@udesk.cn"
});
}
</script>
</body>
Link Example
http://rd-dota.udesk.cn/im_client/feedback_tab/new.html?u_nick_name=Customer Name Tom&u_cellphone=187xxxxxxxx&u_organization=Udesk&u_customer_tags=vip&u_owner_id=3&u_owner_group_id=62&u_TextField_xxx=&u_SelectField_xx=&u_subject=Feedback Subject&u_content=Feedback Content&u_status_id=3&u_priority_id=2&u_company_tags=&u_nonce=694db2645b3f69a8&u_signature=315345C77C73A128CF9850EAD777F7A71D423A36&u_timestamp=1465878579000&u_customer_token=abcdefghijklmn&u_email=feedback@udesk.cn&u_description=Simple description&
Customer Authentication - Request Parameters
When passing customer_token, customer email, or phone number, it will be considered as a logged-in customer, and customer authentication will be performed. If it is a visitor, customer authentication is not required. If it is a customer, please refer to the encryption algorithm below. The order of customer identification is: u_customer_token->u_email->u_cellphone. Customer identification validity period: 1 hour.
Authentication Parameters
Parameter Name | Type | Value | Required | Description |
---|---|---|---|---|
u_nonce | String | Random | Yes | Random number, dynamic for higher security |
u_timestamp | String | Timestamp | Yes | Current timestamp (13 digits milliseconds) |
u_customer_token/u_email/u_cellphone | String | Customer ID | Yes | Unique identifier for the customer, using customer_token or email or phone number |
u_signature | String | Encryption algorithm | Yes | Signature encryption algorithm |
Signature Encryption Algorithm
- Concatenate characters according to the subsequent parameters and order, in the form of key=value&: u_nonce, u_timestamp, u_customer_token (u_email) (u_cellphone), im_user_key.
sign_str = u_nonce=value&u_timestamp=valuie&u_customer_token/u_email/u_cellphone=value&im_user_key
- Calculate the signature string using SHA1.
sign_str = sha1(sign_str);
- Convert the string to uppercase.
sign_str = sign_str.toUpperCase();
Example:
sign_str = "u_nonce=9ca6fff5a509fb887ac72cf5c92010e7&u_timestamp=1455675719000&u_email=feedback@udesk.cn&b476f9f8-5309-4d0a-a2d4-af08c4507a15";
sign_str = sha1(sign_str);
sign_str = sign_str.toUpperCase();
Parameter Example
{
"u_nonce":"694db2645b3f69a8",
"u_signature":"315345C77C73A128CF9850EAD777F7A71D423A36",
"u_timestamp":"1465878579000",
"u_email":"feedback@udesk.cn"
}
Customer Parameters
Parameter Name | Type | Value | Required | Description |
---|---|---|---|---|
u_customer_token | String | Auth token | No | |
u_email | String | Customer email | No | |
u_cellphone | String | Customer phone number | No | |
u_description | String | Customer description | No | |
u_organization | String | Customer company | No | |
u_owner_id | String | Customer responsible person ID | No | |
u_owner_group_id | String | Customer responsible group ID | No | |
u_customer_tags | String | Customer tags | No | Pass in ticket tags, separated by commas such as: "xx,xx" |
u_SelectField_xxx | String | Customer custom field | No | Unique identifier for customer custom field, can be viewed in custom fields |
Ticket Parameters
Parameter Name | Type | Value | Required | Description |
---|---|---|---|---|
u_subject | String | Ticket subject | No | |
u_content | String | Ticket content | No | |
u_status_id | String | Ticket status ID | No | |
u_priority_id | String | Ticket priority ID | No | |
u_company_tags | String | Ticket tags | No | Pass in ticket tags, separated by commas such as: "xx,xx" |
u_TextField_xxx | String | Ticket custom field | No | Unique identifier for ticket custom field, can be viewed in custom fields |
Usage Notes
-
User-defined request parameters should not start with u_ to avoid duplication with preset parameters.
-
When URL parameters conflict with form parameters (customer custom parameters), the system will prioritize the parameters preset in the URL.
-
In the feedback tag form settings, the ticket template option acts as the default template displayed after generating the ticket. In reality
, other templates' custom fields can be filled in when populating parameters.