logo

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>

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 NameTypeValueRequiredDescription
u_nonceStringRandomYesRandom number, dynamic for higher security
u_timestampStringTimestampYesCurrent timestamp (13 digits milliseconds)
u_customer_token/u_email/u_cellphoneStringCustomer IDYesUnique identifier for the customer, using customer_token or email or phone number
u_signatureStringEncryption algorithmYesSignature encryption algorithm

Signature Encryption Algorithm

  1. 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

  1. Calculate the signature string using SHA1.

sign_str = sha1(sign_str);

  1. 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 NameTypeValueRequiredDescription
u_customer_tokenStringAuth tokenNo
u_emailStringCustomer emailNo
u_cellphoneStringCustomer phone numberNo
u_descriptionStringCustomer descriptionNo
u_organizationStringCustomer companyNo
u_owner_idStringCustomer responsible person IDNo
u_owner_group_idStringCustomer responsible group IDNo
u_customer_tagsStringCustomer tagsNoPass in ticket tags, separated by commas such as: "xx,xx"
u_SelectField_xxxStringCustomer custom fieldNoUnique identifier for customer custom field, can be viewed in custom fields

Ticket Parameters

Parameter NameTypeValueRequiredDescription
u_subjectStringTicket subjectNo
u_contentStringTicket contentNo
u_status_idStringTicket status IDNo
u_priority_idStringTicket priority IDNo
u_company_tagsStringTicket tagsNoPass in ticket tags, separated by commas such as: "xx,xx"
u_TextField_xxxStringTicket custom fieldNoUnique identifier for ticket custom field, can be viewed in custom fields

Usage Notes

  1. User-defined request parameters should not start with u_ to avoid duplication with preset parameters.

  2. When URL parameters conflict with form parameters (customer custom parameters), the system will prioritize the parameters preset in the URL.

  3. 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.