Skip to main content
Solved

Automatically Update Assets "Used By" Relationship When Updating "Used By" Assignment

  • March 4, 2025
  • 1 reply
  • 50 views

Forum|alt.badge.img+1

One of the default fields for Asset Management/Inventory is "Used By" (Global Settings > Asset Types > Default Fields > Assignment > Used By)

When building Relationships for Assets, there is a similar Downstream Relationship for "Used By" (or Upstream Relationship for "Uses").

The "Used By" relationship does not automatically appear after assigning an asset to a requester/agent as "Used By." Currently, we have to duplicate our work by manually adding/updating the "Used By" relationship separately/in addition to the asset assignment.

Is there a way for Freshservice to please make the process of assigning/updating an asset as "Used By" an agent/requester to then automatically create/update the "Used By" relationship?

Or is there any known way that one of our system admins could create a workflow to accomplish this in Freshservice?

Respectfully,
-Christopher L.

 

 

 

 

 


 

 

Best answer by christopherl

See relevant discussion with Freshservice Product Specialist below re: potential solution using workflow settings...

 

 

Rishikesh L, said 21 hours ago

Hi Christopher,

 

I hope this message finds you well. I wanted to take a moment to inform you that, unfortunately, we are unable to automate the process you inquired about at this time. However, I would be happy to raise a feature request for consideration, so we can explore the potential for automation in the future.

Thank you for your understanding, and please feel free to reach out if you have any further questions or concerns.

 

Check your ticket status - https://support.freshservice.com/support/tickets/17613043

Rishikesh L

Product Specialist

support@freshservice.com

01-Freshworks-brand-mark-%5BRecovered%5D-02.png

Explore our products

Chat with us for quicker resolution

 

 

Christopher L, said 4 hours ago

Yes.  A feature request would be appreciated.  Thanks.

I did find an interesting post on the forum from 2 years ago re: "Add relationship as part workflow": https://community.freshworks.com/automations-11378/add-relationship-as-part-workflow-25105?tid=25105&fid=11378

That post discusses "using a series of the “Web Request” nodes in the workflow."  Are you able to shed any further light on if this type of solution is still viable in the latest version of Freshservice and if it might be applicable for my goal?

 

 

Rishikesh L, said 3 hours ago

Hi Christopher,


I wanted to let you know that the proposed solution is indeed viable and can be integrated into the workflow using the Web Request node. I suggest following the outlined steps in the community as they are very clear.

 

Let me refine it for you.


Step 1: Use the Web Request node with the following settings:

- Request type: GET  
- Endpoint: https://mycompany.freshservice.com/api/v2/requesters/{{ticket.requester.id}}

Step 2: Utilize the JSON Parser node and set the Web Request response body as the source.

 

You can take a look at the following documentation to know how you can invoke a web request and save the response as JSON Parser :- https://support.freshservice.com/support/solutions/articles/50000003612-sample-usecase-invoking-a-web-request-and-parsing-its-response-using-the-json-parser-node


Step 3: Implement a Condition node to check if requester.is_agent is “true.”

Next, create two Web Request nodes after the “is_agent” condition:

If the requester is an agent:
- Request type: POST  
- Endpoint: https://mycompany.com/api/v2/relationships/bulk-create  
- Body:

{
  "relationships": [
    {
      "relationship_type_id": 52000081231,
      "primary_id": {{ticket.requester.id}},
      "primary_type": "agent",
      "secondary_id": 13,
      "secondary_type": "asset"
    }
  ]
}

If the requester is not an agent:
- Body:
{
  "relationships": [
    {
      "relationship_type_id": 52000081231,
      "primary_id": {{ticket.requester.id}},
      "primary_type": "requester",
      "secondary_id": 13,
      "secondary_type": "asset"
    }
  ]
}

Please note that the “relationship_type_id” should be the actual ID of the relationship you want to create, while the “secondary_id” is the display ID of the asset, not the actual ID. To find these IDs, use a Web Request (GET) nodes with the endpoints `/api/v2/assets` and `/api/v2/relationship_types`.

If you need any more assistance, feel free to ask!

 

Check your ticket status - https://support.freshservice.com/support/tickets/17613043

Rishikesh L

Product Specialist

support@freshservice.com

01-Freshworks-brand-mark-%5BRecovered%5D-02.png

Explore our products

Chat with us for quicker resolution

 

 

Christopher L, said 3 minutes ago

Great!  I will follow-up with our system admins to see if they can help me implement the potential workflow solution.  Regardless, I still think it is worthwhile to suggest the automation of this as a feature request that would be beneficial for all stakeholders working with Asset Management.  Thank you again for you time.

View original
Did this topic help you find an answer to your question?

1 reply

Forum|alt.badge.img+1
  • Author
  • Contributor
  • 3 replies
  • Answer
  • March 5, 2025

See relevant discussion with Freshservice Product Specialist below re: potential solution using workflow settings...

 

 

Rishikesh L, said 21 hours ago

Hi Christopher,

 

I hope this message finds you well. I wanted to take a moment to inform you that, unfortunately, we are unable to automate the process you inquired about at this time. However, I would be happy to raise a feature request for consideration, so we can explore the potential for automation in the future.

Thank you for your understanding, and please feel free to reach out if you have any further questions or concerns.

 

Check your ticket status - https://support.freshservice.com/support/tickets/17613043

Rishikesh L

Product Specialist

support@freshservice.com

01-Freshworks-brand-mark-%5BRecovered%5D-02.png

Explore our products

Chat with us for quicker resolution

 

 

Christopher L, said 4 hours ago

Yes.  A feature request would be appreciated.  Thanks.

I did find an interesting post on the forum from 2 years ago re: "Add relationship as part workflow": https://community.freshworks.com/automations-11378/add-relationship-as-part-workflow-25105?tid=25105&fid=11378

That post discusses "using a series of the “Web Request” nodes in the workflow."  Are you able to shed any further light on if this type of solution is still viable in the latest version of Freshservice and if it might be applicable for my goal?

 

 

Rishikesh L, said 3 hours ago

Hi Christopher,


I wanted to let you know that the proposed solution is indeed viable and can be integrated into the workflow using the Web Request node. I suggest following the outlined steps in the community as they are very clear.

 

Let me refine it for you.


Step 1: Use the Web Request node with the following settings:

- Request type: GET  
- Endpoint: https://mycompany.freshservice.com/api/v2/requesters/{{ticket.requester.id}}

Step 2: Utilize the JSON Parser node and set the Web Request response body as the source.

 

You can take a look at the following documentation to know how you can invoke a web request and save the response as JSON Parser :- https://support.freshservice.com/support/solutions/articles/50000003612-sample-usecase-invoking-a-web-request-and-parsing-its-response-using-the-json-parser-node


Step 3: Implement a Condition node to check if requester.is_agent is “true.”

Next, create two Web Request nodes after the “is_agent” condition:

If the requester is an agent:
- Request type: POST  
- Endpoint: https://mycompany.com/api/v2/relationships/bulk-create  
- Body:

{
  "relationships": [
    {
      "relationship_type_id": 52000081231,
      "primary_id": {{ticket.requester.id}},
      "primary_type": "agent",
      "secondary_id": 13,
      "secondary_type": "asset"
    }
  ]
}

If the requester is not an agent:
- Body:
{
  "relationships": [
    {
      "relationship_type_id": 52000081231,
      "primary_id": {{ticket.requester.id}},
      "primary_type": "requester",
      "secondary_id": 13,
      "secondary_type": "asset"
    }
  ]
}

Please note that the “relationship_type_id” should be the actual ID of the relationship you want to create, while the “secondary_id” is the display ID of the asset, not the actual ID. To find these IDs, use a Web Request (GET) nodes with the endpoints `/api/v2/assets` and `/api/v2/relationship_types`.

If you need any more assistance, feel free to ask!

 

Check your ticket status - https://support.freshservice.com/support/tickets/17613043

Rishikesh L

Product Specialist

support@freshservice.com

01-Freshworks-brand-mark-%5BRecovered%5D-02.png

Explore our products

Chat with us for quicker resolution

 

 

Christopher L, said 3 minutes ago

Great!  I will follow-up with our system admins to see if they can help me implement the potential workflow solution.  Regardless, I still think it is worthwhile to suggest the automation of this as a feature request that would be beneficial for all stakeholders working with Asset Management.  Thank you again for you time.


Reply