Is there any way to check the zendesk agent is online or not?
I am using react-native-zendesk-chat
for chat support, Now I have to check the agent's online offline status in mobile sdk, So that i can activate/deactivate the chatbot.
do you know?
how many words do you know
See also questions close to this topic
-
how to change prettier format for react native
my code formatting prettier didn't works well for react native, i don't understand where to config it but it works well with flutter
from this code
import { View, Text } from 'react-native' import React from 'react' export default function App() { return ( <View> <Text>Apps</Text> </View> ) }
it's formatted to this
import { View, Text } from 'react-native' import React from 'react' export default function App() { return ( < View > < Text > Apps < /Text> < /View> ) }
-
Command failed: xcrun instruments -s
I want to run my react native app on a real ios device with this line :
npx react-native run-ios --udid SOME-UDID
but i got this error :
xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find instruments 2> /dev/null' failed with exit code 17664: (null) (errno=No such file or directory) xcrun: error: unable to find utility "instruments", not a developer tool or in PATH error Command failed: xcrun instruments -s xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find instruments 2> /dev/null' failed with exit code 17664: (null) (errno=No such file or directory) xcrun: error: unable to find utility "instruments", not a developer tool or in PATH
everything is ok on simulator
I'm using XCODE 13
-
How to maintain global states created dynamically
I am trying to Display list of items with then name and button to download its respective file Same list are available in different other screens. When I click on download
State info sharing: It should start download and the state/progress of the download should be visible to same item available in different other screens.unique identifier is item id
There can be parallel downloads
Problem statement:
- Unable to share the information for same item if we use state within the same item
- On use of redux its solving problem 1 however Parallel download information is getting overwritten as its writing to same reducer state
Any idea or approach is appreciated. Thanks
-
Received JSONDecode Error from Zendesk API request
I'm following this tutorial ("Getting data from your Zendesk product") and I got a Response [200], which supposedly means that my request was successful. However when I did
data = response.json()
, I received the JSONDecoder errorJSONDecodeError: Expecting value: line 1 column 1 (char 0)
. I've tried debugging with the different solutions from other Stackoverflow solutions, but it hasn't worked. Please illuminate me! -
How Does Email Forwarding Works In Customer Support Ticketing Systems?
I have observe that when you sign up for customer support ticketing systems like Zendesk they provide you with a unique email address something like
support@mygoodshop.zendesk.com
where you can forward emails from customers to this address and these forwarded emails are converted to tickets in Zendesk.I have googled for days but couldn't find any good explanation how this works so i decided to post here for some help.
My questions is::
- How do they generate such unique emails for each business that signs up? Do they use some form of internal email server that generate these emails addresses?
It would be much appreciated if someone explain to me in detail how this system works. Any links to tutorials/articles or open source projects where i can learn more will also be appreciated.
-
Zendesk API: Update Multiple Tickets at once using PUT Method? How does it look like? Javascript/Google Script
I'm currently trying to do an API call to update multiple tickets at once using ticket IDs. These ticket IDs are stored on google Sheets since I have the script running there. I would appreciate someone sharing how to use the REST method and get it working! Thank you!
Problem: I'm not sure how to update multiple tickets using the following
If I try with 1 ticket ID, example
PUT https://company.zendesk.com/api/v2/tickets/12345
This is from https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#update-ticket. This will only update 1 ticket, fair.Original Code:
PUT /api/v2/tickets/{ticket_id}
I know to just replace {ticket_id} with a ticket number. If I put something like https://company.zendesk.com/api/v2/tickets/{ticket_id} it will throw me an error.When it comes to multiple: (Source: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#update-many-tickets). How do I write the code in a way I can read multiple ticket ids at once without having to repeat it 10 time if there are 10 tickets?
PUT https://company.zendesk.com/api/v2/tickets/update_many
Zendesk's example is saying it like this:
{ "tickets": [ { "id": 1, "status": "solved" }, { "id": 2, "status": "pending" } ] }
-
Limiting Loop Range to 100 Rows at at time
I have the following script that takes data from my Sheet and updates records via a POST API call; however there is a limit of 100 calls at a time so I'm looking for a way to add that to my script if possible. I also need to ensure that the header row (row1) is sent. So essentially the first loop is rows 1-101, second loop is row 1 and rows 102-201 etc. Not even sure this is possible
function updateManyUsers() { var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Sheet1'); var [headers, ...rows] = sheet.getDataRange().getDisplayValues(); Logger.log([headers,rows]); var users = rows.map(r => { var temp = {}; headers.forEach((h, j) => { if (r[j] != "") temp[h] = r[j]; }); return temp; }); var url = 'https://redaccted.zendesk.com/api/v2/users/update_many.json'; var user = 'morris.coyle@redacted_still/token'; var pwd = 'Every_redacted'; var options = { 'method': 'PUT', 'headers': { 'Authorization': "Basic " + Utilities.base64Encode(user + ':' + pwd) }, 'payload': JSON.stringify({ users }), 'contentType': 'application/json', 'muteHttpExceptions': true }; var response = UrlFetchApp.fetch(url, options); Logger.log(response.getContentText()); }
Thanks in advance.
Moz
-
Zendesk App Tools Uncaught ReferenceError: ZAFClient is not defined in sandbox
In the Zendesk sandbox I'm getting the following error running a custom app on the zat server:
Uncaught ReferenceError: ZAFClient is not defined at main.js:1:14
Which is the following line:
var client = ZAFClient.init();
It happens on startup and refreshing the webpage. I'm currently running version
3.8.9
for zat (zendesk app tools) and rbenv version1.2.0
.Previously, I was able to fix this issue by changing the version in the manifest.json file to
1.0
, however this is not working anymore}, "version": "1.0", "frameworkVersion": "2.0" }
If anyone has ideas on how to fix this that would be much appreciated!
-
Zendesk integration with Flutter
I am creating mobile app with flutter and I want to integrate Zendesk SDK using flutter as i have done research and i get to know that zendesk can not provide support to hybrid apps the only provide native SDK but still there are some plugins which provide support but its too older and not working for me below is the plugins which i have tried.
Here is the code from second plugin
await Zendesk.initialize(<account key>, <application id>);
But I am not able to run app in android below is the error which i am facing
FAILURE: Build failed with an exception. * What went wrong: Could not determine the dependencies of task ':app:processDebugResources'. > Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. > Could not resolve com.zendesk:chat:3.1.0. Required by: project :app > project :zendesk_plugin > Could not resolve com.zendesk:chat:3.1.0. > Could not get resource 'https://google.bintray.com/exoplayer/com/zendesk/chat/3.1.0/chat-3.1.0.pom'. > Could not HEAD 'https://google.bintray.com/exoplayer/com/zendesk/chat/3.1.0/chat-3.1.0.pom'. Received status code 502 from server: Bad Gateway > Could not resolve com.zendesk:messaging:5.1.0. Required by: project :app > project :zendesk_plugin > Could not resolve com.zendesk:messaging:5.1.0. > Could not get resource 'https://google.bintray.com/exoplayer/com/zendesk/messaging/5.1.0/messaging-5.1.0.pom'. > Could not HEAD 'https://google.bintray.com/exoplayer/com/zendesk/messaging/5.1.0/messaging-5.1.0.pom'. Received status code 502 from server: Bad Gateway > Could not resolve com.zendesk:chat-providers:3.1.0. Required by: project :app > project :zendesk_plugin > Could not resolve com.zendesk:chat-providers:3.1.0. > Could not get resource 'https://google.bintray.com/exoplayer/com/zendesk/chat-providers/3.1.0/chat-providers-3.1.0.pom'. > Could not HEAD 'https://google.bintray.com/exoplayer/com/zendesk/chat-providers/3.1.0/chat-providers-3.1.0.pom'. Received status code 502 from server: Bad Gateway * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 43s Running Gradle task 'assembleDebug'... [!] Gradle threw an error while downloading artifacts from the network. Retrying to download... FAILURE: Build failed with an exception. * What went wrong: Could not determine the dependencies of task ':app:processDebugResources'. > Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. > Could not resolve com.zendesk:chat:3.1.0. Required by: project :app > project :zendesk_plugin > Could not resolve com.zendesk:chat:3.1.0. > Could not get resource 'https://google.bintray.com/exoplayer/com/zendesk/chat/3.1.0/chat-3.1.0.pom'. > Could not HEAD 'https://google.bintray.com/exoplayer/com/zendesk/chat/3.1.0/chat-3.1.0.pom'. Received status code 502 from server: Bad Gateway > Could not resolve com.zendesk:messaging:5.1.0. Required by: project :app > project :zendesk_plugin > Could not resolve com.zendesk:messaging:5.1.0. > Could not get resource 'https://google.bintray.com/exoplayer/com/zendesk/messaging/5.1.0/messaging-5.1.0.pom'. > Could not HEAD 'https://google.bintray.com/exoplayer/com/zendesk/messaging/5.1.0/messaging-5.1.0.pom'. Received status code 502 from server: Bad Gateway > Could not resolve com.zendesk:chat-providers:3.1.0. Required by: project :app > project :zendesk_plugin > Could not resolve com.zendesk:chat-providers:3.1.0. > Could not get resource 'https://google.bintray.com/exoplayer/com/zendesk/chat-providers/3.1.0/chat-providers-3.1.0.pom'. > Could not HEAD 'https://google.bintray.com/exoplayer/com/zendesk/chat-providers/3.1.0/chat-providers-3.1.0.pom'. Received status code 502 from server: Bad Gateway * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 12s [!] Gradle threw an error while downloading artifacts from the network. Retrying to download... Exception: Gradle task assembleDebug failed with exit code 1
can any one please tell me how to solve this or any other way to integrate Zendesk with flutter
Thanks
-
Zendesk SDK JwtAuthentication not working
I have the SDK for android and I try to setup JWT Identity for chat and support modules.
I have a webhook defined as in the doc. It work. I see in the log that zendesk is sending the user token I give him in the JwtIdentity and it returns a jwt as specified in the doc with name, email, jti and iat.
Code of the webhook :
router.post('/jwt', async (req, res, next) => { try { console.log(req.body) const user_token = req.body.user_token const user = await usersService.findByTokend(user_token) if (typeof user === "undefined" || user === null) { return res.status(404).send('No user found').end() } const token = jwt.sign({ name: `${user.lastname} ${user.firstname}`.toLowerCase().trim(), email: user.email.toLowerCase().trim(), }, JWT_SECRET, { expiresIn: '12h', jwtid: uuidv4() }) console.log(token) return res.status(200).send({ jwt: token }).end() } catch (err) { console.log(err) next(err) } })
Nothing goes wrong in the log of my webhook and in my SDK implementation during initialisation. It's when I call the activity and it try to authenticate the user that it fail.
For chat instance I have defined a JwtAuthenticator as follow :
public class ZendeskJwtAuthenticator implements JwtAuthenticator { private String user_token; public void setUserToken(String user_token) { this.user_token = user_token; } @Override public void getToken(JwtCompletion jwtCompletion) { try { OkHttpClient client = new OkHttpClient(); JSONObject jsonBody = new JSONObject(); jsonBody.put("user_token", user_token); RequestBody requestJsonBody = RequestBody.create( jsonBody.toString(), MediaType.parse("application/json") ); Request postRequest = new Request.Builder() .url(url) .post(requestJsonBody) .build(); client.newCall(postRequest).enqueue(new Callback() { @Override public void onFailure(@NotNull Call call, @NotNull IOException e) { jwtCompletion.onError(); } @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try { String body = response.body().string(); JsonObject jsonObject = JsonParser.parseString(body).getAsJsonObject(); if (jsonObject.has("jwt")) { jwtCompletion.onTokenLoaded(jsonObject.get("jwt").getAsString()); } else { jwtCompletion.onError(); } } catch (Exception e) { jwtCompletion.onError(); } } }); } catch (Exception exception) { jwtCompletion.onError(); } } }
I call set identity as follow :
private void setUserIdentity(String user_token) { Identity identity = new JwtIdentity(user_token); ZendeskJwtAuthenticator autenticator = new ZendeskJwtAuthenticator(); autenticator.setUserToken(user_token); Zendesk.INSTANCE.setIdentity(identity); Chat.INSTANCE.setIdentity(autenticator); }
It is called after init :
Zendesk.INSTANCE.init(appContext, zendeskUrl, appId, clientId); Chat.INSTANCE.init(appContext, chatKey, chatAppId); Support.INSTANCE.init(Zendesk.INSTANCE); this.setUserIdentity(options);
In the log I have that when I open chat :
I/okhttp.OkHttpClient: --> POST https://id.zopim.com/authenticated/web/jwt (318-byte body) I/ReactNativeJNI: Memory warning (pressure level: TRIM_MEMORY_RUNNING_CRITICAL) received by JS VM, running a GC I/okhttp.OkHttpClient: <-- 400 https://id.zopim.com/authenticated/web/jwt (2412ms, 63-byte body) W/JwtLoginDetailsProvider: Error fetching authentication token. There may be an issue with your JWT. Chat will proceed unauthenticated: 400
And when I open help center :
I/okhttp.OkHttpClient: --> GET https://<company>.zendesk.com/hc/api/mobile/fr/article_tree.json?category_ids=§ion_ids=&include=categories%2Csections&limit=5&article_labels=&per_page=1000&sort_by=created_at&sort_order=desc I/okhttp.OkHttpClient: --> POST https://<company>.zendesk.com/access/sdk/jwt (22-byte body) I/okhttp.OkHttpClient: <-- 403 https://<company>.zendesk.com/access/sdk/jwt (3350ms, unknown-length body) I/okhttp.OkHttpClient: <-- 400 Response body was null, failed to auth user. https://<company>.zendesk.com/hc/api/mobile/fr/article_tree.json?category_ids=§ion_ids=&include=categories%2Csections&limit=5&article_labels=&per_page=1000&sort_by=created_at&sort_order=desc (3359ms, 2-byte body)
-
Unable to access Zendesk ZAF Sdk from webapp built using Google App Script
I am trying to host an HTML form(build using Google AppScript) in Zendesk sidebar iframe. The form loads successfully. However I am facing issue with accessing the ZAF_sdk from
P.S : I have added this code in HTML file.
<script src="https://static.zdassets.com/zendesk_app_framework_sdk/2.0/zaf_sdk.min.js" crossorigin="anonymous"></script>
<script> console.log("Hello, World!"); var client = ZAFClient.init(); client.get('ticket.requester.name').then(function(data) { console.log(data); }); client.get('ticket.requester.email').then(function(data) { console.log(data); }); client.get('ticket.id').then(function(data) { console.log(data); }); </script>
It gives error
client.get is not a function
When I host the same code on our server, the sdk is properly loaded and all the functions are recognized and correct value is returned.
Is there a different way to load zaf_sdk in Google App Script webapp?
Thanks in advance.