# Zendesk - Brand

**URL:** <https://community.exalate.com/t/zendesk-brand/5511>\
**Category:** General Questions\
**Tags:** zendesk, configuration, migrated\_question\
**Created:** [November 4, 2024, 8:09am UTC](https://community.exalate.com/t/zendesk-brand/5511 "2024-11-04T08:09:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 8:09am UTC](https://community.exalate.com/t/zendesk-brand/5511/1 "2024-11-04T08:09:37Z")

</div>

_Originally asked by Jillani Fazal on 19 June 2023 [(original question)](https://oldcommunity.exalate.com/questions/58502932)_

* * *

I have couple of questions.

I was able to get the Brand solution working, I just had to adjust the last line of code as brand\_id was a double for some reason.

```auto
replica."brand_id" = brand_id.toFloat().toInteger().toString()

```

Would it be possible to add firstSync to Zendesk outgoing? Would only like to send brand\_id of the first sync.

I only want it outgoing on first sync to avoid a call to be made on every synchronization, though I can live with this if not possible.

----------------------------------------------

```auto
replica.addedAttachments.collect

{it.internal = true; it}

```

worked wonderfully, attachments are only added as internal notes in Zendesk, thanks.

However, attachments added as internal notes in Jira are still sent to Zendesk and added as internal notes in Zendesk. I tried to update Jira outgoing as follows as I have with comments, but it did not have any effect. How can I only send attachments added in internal notes from Jira to Zendesk?

```auto
replica.attachments = issue.attachments.findAll{!it.internal)

```

-------------------------------------------------

For the following line of code where “Contact reasons” is a custom drop-down field.

```auto
issue.customFields."Contact reasons".value = "account_closure"

```

How can we set value for custom drop-down fields in Zendesk?

I would appreciate if the following questions are addressed. Thank you!

_(Asked on behalf of the client)_

* * *

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 8:09am UTC](https://community.exalate.com/t/zendesk-brand/5511/2 "2024-11-04T08:09:38Z")

</div>

_Answer by Support on 26 October 2023_

Hello, Account Management , might I ask you to replace the getPreviousJson function with this

```auto
def getPreviousJson = {
    def ttRepo = (syncHelper).twinTraceRepository
    def await = { f -> scala.concurrent.Await$.MODULE$.result(f, scala.concurrent.duration.Duration.apply(1, java.util.concurrent.TimeUnit.MINUTES)) }
    def orNull = { opt -> opt.isEmpty() ? null : opt.get() }
    def ttOptFuture = ttRepo.getTwinTraceByLocalIssueKeyFuture(connection, issueKey)
    def ttOpt = await(ttOptFuture)
    def tt = orNull(ttOpt)
//com.exalate.api.domain.twintrace.ITwinTrace tt = orNull(ttOpt)
    def lr = tt?.localReplica
    !lr ? null : ({
        def js = new groovy.json.JsonSlurper()
        def previousPayload = js.parseText(lr.payload)
        previousPayload.hubIssue
    })()
}

```

Please, let me know how it goes

* * *

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 8:09am UTC](https://community.exalate.com/t/zendesk-brand/5511/3 "2024-11-04T08:09:45Z")

</div>

_Answer by Account Management on 31 July 2023_

Hi Serhiy,

Thanks for the workaround.

I am getting the following error when trying to use the workaround.

Please see screenshot attached.

Please let us know how to fix this.

Thanks,

BR,

Svein Tvedt

```auto
No such property: twinTraceRepository for class: zendesknode.services.node.hubobjects.NodeHelper 

```

 ![](https://europe1.discourse-cdn.com/flex018/uploads/exalate1/original/1X/0045ead771b590222d57caa0d1437975a9f79928.png)

* * *

#### Comments:

> **Serhiy Onyshchenko commented on 09 August 2023**
>
> > Might I ask you to change the script a bit:
> 
> ```auto
> def getPreviousJson = {
> def ttRepo = (syncHelper).twinTraceRepository
> // com.exalate.persistence.twintrace.TwinTraceRepository ttRepo = ((com.exalate.replication.services.processor.SyncHelper)syncHelper).twinTraceRepository
> def tt = ttRepo.getTwinTraceByLocalIssueKey(connection, issueKey)
> //com.exalate.api.domain.twintrace.ITwinTrace tt = orNull(ttOpt)
> def lr = tt?.localReplica
> !lr ? null : ({
> def js = new groovy.json.JsonSlurper()
> def previousPayload = js.parseText(lr.payload)
> previousPayload.hubIssue
> })()
> }
> 
> def previousReplica = getPreviousJson()
> def firstSync = (previousReplica == null)
> 
> ```
> 
> Note, how nodeHelper.twinTraceRepository is replaced by (syncHelper).twinTraceRepository

> **Account Management commented on 10 August 2023**
>
> > Thanks Serhiy Onyshchenko
> 
> I do not have that error anymore, now I have new error with the this workaround.
> 
> The following line produced the following error as per screenshot attached. Checked line by line to find out that the issue is with this line. Can you please check it out?
> 
> def tt = ttRepo.getTwinTraceByLocalIssueKey(connection, issueKey)
> 
> ![](https://dub1.discourse-cdn.com/flex018/download/attachments/58502932/image-2023-8-10_11-32-24.png?version=1&modificationDate=1691659940924&api=v2)

> **Jillani Fazal commented on 11 August 2023**
>
> > Hi Account Management
> 
> It seems that the twintrace is missing for this local issue key; hence I would suggest you unexalate and then re-exalate to see if that makes any difference or not. Let me know the outcome.
> 
> BR,  
> Jillani

> **Account Management commented on 24 October 2023**
>
> > Hi Jillani Fazal and Serhiy Onyshchenko ,
> 
> Unexalate an reexalate did not make a difference.
> 
> What do I need to do?
> 
> Thanks,
> 
> BR,  
> Svein Tvedt

> **Account Management commented on 26 October 2023**
>
> > Hi Support ,
> 
> This function works perfectly, and now I am able to call Zendesk brand id on firstSync when it is the only time it is required.
> 
> Thank you very much _(old community)_
> 
> BR,
> 
> Svein Tvedt

> **Jillani Fazal commented on 31 October 2023**
>
> > Account Management
> 
> Sounds great and you are most welcome. _(old community)_

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 8:09am UTC](https://community.exalate.com/t/zendesk-brand/5511/4 "2024-11-04T08:09:45Z")

</div>

_Answer by Account Management on 07 August 2023_

bumping thread

* * *

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 8:09am UTC](https://community.exalate.com/t/zendesk-brand/5511/5 "2024-11-04T08:09:46Z")

</div>

_Answer by Serhiy Onyshchenko on 31 July 2023_

UPDATED on Aug 9th due to feedback: [Zendesk - Brand](https://oldcommunity.exalate.com/questions/58502932/zendesk---brand)_(old community)_  
Hello, Account Management ,

Thanks a lot for asking this in community!  
I’ve got a work-around which may break in the future (since it relies on some private APIs) However the chances of this happening anytime soon are slim, since it has been working for the past 4 years:

```auto
def getPreviousJson = {
    def ttRepo = (syncHelper).twinTraceRepository
// com.exalate.persistence.twintrace.TwinTraceRepository ttRepo = ((com.exalate.replication.services.processor.SyncHelper)nodeHelper).twinTraceRepository
    def tt = ttRepo.getTwinTraceByLocalIssueKey(connection, issueKey)
//com.exalate.api.domain.twintrace.ITwinTrace tt = orNull(ttOpt)
    def lr = tt?.localReplica
    !lr ? null : ({
        def js = new groovy.json.JsonSlurper()
        def previousPayload = js.parseText(lr.payload)
        previousPayload.hubIssue
    })()
}

def previousReplica = getPreviousJson()
def firstSync = (previousReplica == null)

```

Happy Exalating!

* * *

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 8:09am UTC](https://community.exalate.com/t/zendesk-brand/5511/6 "2024-11-04T08:09:47Z")

</div>

_Answer by Jillani Fazal on 31 July 2023_

Hi Account Management

Please try this in order to send the attachments in Zendesk as internal:

[Attachment in internal Zendesk comment ?](https://oldcommunity.exalate.com/display/exacom/questions/11340525/attachment-in-internal-zendesk-comment-)_(old community)_

For setting a value, please check this:

[How to fill a default value for custom field in Zendesk…?](https://oldcommunity.exalate.com/questions/58502267/how-to-fill-a-default-value-for-custom-field-in-zendesk...)_(old community)_…

* * *

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 8:09am UTC](https://community.exalate.com/t/zendesk-brand/5511/7 "2024-11-04T08:09:47Z")

</div>

_Answer by Account Management on 31 July 2023_

bumping thread

* * *

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 8:09am UTC](https://community.exalate.com/t/zendesk-brand/5511/8 "2024-11-04T08:09:48Z")

</div>

_Answer by Account Management on 24 July 2023_

bumping thread

* * *

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 8:09am UTC](https://community.exalate.com/t/zendesk-brand/5511/9 "2024-11-04T08:09:49Z")

</div>

_Answer by Account Management on 17 July 2023_

bumping thread

* * *

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 6, 2024, 8:10am UTC](https://community.exalate.com/t/zendesk-brand/5511/10 "2024-11-06T08:10:24Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
